Pinpoint your company's relative strengths--a hometown advantage, say--and use them to get a leg up on rivals.
A moving target is harder to attack, so innovate constantly. Then, throw up barriers to entry by obtaining patents and trademarks.
Some customers may not be worth defending. If an unprofitable market segment is under attack, consider focusing marketing resources elsewhere.
Happy customers, of course, are less likely to jump ship. Solicit and analyze customer feedback regularly, and make any necessary changes.