Edinburgh City Council’s strategy to crack down on Airbnb-style short-term lets has been branded “unlawful” by a judge just four months before the licensing scheme is due to be rolled out.

Four petitioners, backed by the largest crowdfunding campaign in Scottish legal history, have won a judicial review of the council’s presumption that permission for tenemented flats to operate as secondary short-term lets will not be granted.

The Scottish Government has handed councils the ability to licence short-term lets and introduce control zones.

In the capital, short-term let hosts are required to submit an application by October 1.

The city council has campaigned for tighter controls for years amid concerns that short-term lets are contributing to a housing crisis.

Campaigners and councillors have been warning for years that the explosion of Airbnb-style short-term lets are squeezing the number of homes and contributing to rising rent prices.

Housing campaigners have accused the petitioners of attempting to “hold an entire city and its housing to ransom” with the legal action.

The petitioners, who raised £300,000 and argued the policy was “onerous and oppressive”, have essentially sent council housing chiefs back to the drawing board after Lord Braid ruled in their favour following a two-day hearing at the Court of Session in Edinburgh.

Lord Braid found that the presumption against permission being granted for short-term lets in tenements was not lawful.

He said: “The rebuttable presumption will not in fact achieve consistency, nor will it assist applicants in knowing whether or not an application is likely to be granted.

“For that reason alone, that part of the policy is unlawful.

“A licensing decision in a particular case to refuse a licence because amenity would be adversely affected is lawful, if there is material to justify it; but a general policy of refusing licences on that ground is not.”

Eilidh Keay, from the Living Rent campaign group, claimed the ruling “flies completely in the face of democracy and the will of the people”.

She added: “This decision demonstrates how a small group of people can use their money and power to weaponise the legal system to their advantage and in doing so hold an entire city and its housing to ransom.

“Edinburgh needs homes, not holiday lets. In coming down in support of short term let operators, this decision seems to have forgotten that Edinburgh is in the midst of a housing crisis.

"It is disgusting that the profit of short-term let operators should be put before the needs of tenants, residents and communities for homes.

“This city is in desperate need for proper short-term lket regulation, that not only dictates how they are run, but also whether they should be operated in the first place. Every flat turned into an STL is one less home for a resident in Edinburgh and this delay to STL regulations is a delay to tackling the housing crisis in this city.”

In a joint statement, the four petitioners Ralph Averbuch, Glenn Ford, Louise Brook and Craig Douglas, said the ruling “will give common cause” to both the Scottish Government and the city council “to seek a fresh approach that aims to collaborate and work with local operators of self-catering accommodation”.

The Association of Scottish Self Caterers (ASSC) has argued that the council’s policy amounted to a de-facto ban on short-term lets in Edinburgh and would damage a key component part of the city’s economy.

Fiona Campbell, CEO of the ASSC, said: “We are pleased this decision from the Court of Session confirms that City of Edinburgh Council’s short-term let licensing policy was unlawful in respect of the rebuttal presumption and contravenes provision of services regulations.

“The impact of this will not be confined to the capital as the decision has ramifications for licensing schemes across Scotland.

“The Scottish Government need to go back to the drawing board on short term let regulation and engage constructively with industry to provide a regulatory framework that works for all stakeholders. The time to act is now and the ASSC has pragmatic, fair and proportionate policy solutions which can assist.”

Council leader Cammy Day said he was "disappointed that the court didn’t find in favour of our policy on secondary lets", but stressed he would "make absolutely no apology for seeking to protect our residents".

He added: “It’s no secret that we face unique housing pressures here in Edinburgh, with a small but densely populated city centre and fast-growing population, and it's crucial for us to strike the right balance between promoting our visitor economy while looking after the people that live here all year round.  

 “Our residents have told us that, in many cases, STLs are hollowing out their communities, reducing housing supply and increasing housing costs. We can’t forget that many have endured years of disturbance and anti-social behaviour and we will continue to work hard to get this right.

“The court acknowledged our intention to find a solution to this and agreed that it was legitimate to use both planning and licensing policy. We welcome the clarity he’s provided and will now consider our next steps in more detail.

“We remain committed to ensuring the whole city benefits from our thriving visitor economy but it has to be managed and it has to be sustainable – and I continue to believe that fair and effective STL controls would be an important step in the right direction.”