The High Court has ruled a Cornish seaside town will keep its ban on new-build second homes.
In May more than 80% of residents in St Ives voted to reserve new homes for full-time residents.
A Penzance architectural firm challenged Cornwall Council's decision to allow the referendum to go ahead.
The High Court has ruled the vote, which said new homes should be occupied as "principal residences", was lawful.
The vote was part of a wider housing plan for the town.
Under the government's 2011 Localism Act, if more than 50% of voters support a neighbourhood plan it carries "real legal weight" and the local planning authority must bring it into force.
Supporters of the vote said that one in four properties in the town are second homes or holiday lets and after years of being priced out of the market, the community had spoken.
RLT Built Environment Ltd argued the policy was an attack on the town's two main industries - tourism and construction.
Chris Tofts from Stephens Scown Solicitors in Truro said: "Our client's challenge was based on whether Cornwall Council's decision to allow the referendum on the St Ives neighbourhood plan to go ahead was compatible with human rights legislation. "
The High Court has ruled the policy is compatible with human rights legislation.
Cornwall Council's Cabinet Member for Planning, Edwina Hannaford said: "This is a hugely important judgement for Cornwall, St Ives Town Council and for the residents of St Ives who wanted to ensure that any new homes in the town would be the resident's sole or main residence.
"We also know a number of other local communities, both in Cornwall and across the rest of the country, are interested in including similar policies in their own Neighbourhood Plans and have been watching this case with interest."