A High Court victory by Cornwall Council means it can go ahead with a move to ban new second homes being built in the seaside town of St Ives.
The council's neighbourhood development plan which included the new restriction was backed by nearly half of voters in a referendum earlier this year.
Supporters said one in four properties in the town were already second homes or holiday lets and local people were being priced out of the market.
But a Penzance architectural firm challenged the council's decision to hold the referendum.
It said the ban on new-build second homes was an attack on the town's two main industries: tourism and construction.
Now the High Court has ruled that the vote, which said new homes should be occupied as 'principal residences', was lawful and compatible with human rights legislation.
Edwina Hannaford, the council’s cabinet member for planning, 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 that a number of other local communities, both in Cornwall and across the rest of the country, are also interested in including similar policies in their own neighbourhood plans and have been watching this case with interest.'