A Devon town is celebrating a "euphoric victory" in a battle to prevent a national coffee chain opening on its High Street.
Costa Coffee withdrew plans to open a large shop in Totnes, despite being granted planning permission from South Hams District Council.
Thousands of people in the town, which prides itself on having independent shops, rallied behind a campaign against the coffee giant.
Totnes Conservative MP Sarah Wollaston, who feared the place would become a "clone town", called on the coffee chain to reverse its plans to open in her constituency.
The decision was announced in a letter from Costa that was co-signed by Dr Wollaston and Totnes mayor Pruw Boswell, and addressed to "the people of Totnes".
Costa managing director Chris Rogers admitted the company had "recognised the strength of feeling" against it.
Totnes boasts 41 independent coffee outlets and has established a "unique" reputation in the South West, with a community of musicians, writers and therapists.
Mr Rogers said the decision had taken into account the "specific circumstances of Totnes" following discussion with groups in the town.
Dr Wollaston and Ms Boswell said in the letter: "As your MP and mayor, and speaking on behalf of the people of Totnes, we would like to thank Costa for being prepared to listen to our concerns and showing that they care."
Dr Wollaston added: "Totnes has a strong tradition of independent shops, which is what makes the town unique.
"Costa should be applauded for being sensitive to the strength of local opinion."
Mayor Boswell said: "This is a euphoric victory for Totnes. I want to pay tribute to 'caring Costa', to the hugely supportive Dr Wollaston, and to the community of team Totnes."
Campaign group Notocosta spent several months petitioning against the plans.
It gathered support from 5,750 people in the town of 8,000, including award-winning author and former resident Joan Brady. Opponents had pledged to boycott the new branch.
Holly Tiffen, of the Notocosta campaign, said: "If Costa had arrived, it may have opened the floodgates for other chains. Costa didn't realise what they had taken on here. It should send a very clear message to chain shops to think twice before doing the same elsewhere."
Ian Gregory, owner of Fat Lemons vegetarian, vegan and gluten-free cafe in the town, said: "I am surprised by the decision because we thought it was a done deal. This battle shows that people power can influence a decision. Costa realised its place was not here."