It was presented as the silver bullet to banish the blight of empty buildings, boost house-building and liberate developers from “stealth taxes” that “hinder regeneration”. But the government’s recent planning policy – which could have resulted in property developers dodging up to £1bn in affordable housing payments – has been definitively quashed following a High Court ruling.

Introduced by housing minister Brandon Lewis in November 2014, the “vacant building credit” let developers convert empty buildings into housing without making the usual Section 106 contributions for affordable homes. It was framed as a way of encouraging empty buildings to be brought back into use, but – given that there was no detailing of how long a building had to be vacant for – the policy sparked fears of mass evictions, widespread loss of workspace, and councils losing out on the affordable homes they so desperately need.

John Walker, director of planning at the City of Westminster, described the move as “insane” and a “government gift” to the development industry. “There will be some sites where we get absolutely nothing,” he told the Guardian in February 2015. He said that the borough lost £29m on three schemes consented in January, money that would otherwise have contributed to affordable housing – a huge blow for a local authority already shipping its poorest residents elsewhere.

The developers behind a palatial apartment scheme backed by the Abu Dhabi Investment Council, complete with cinemas and billiard rooms, used the vacant building policy to cut their contribution to affordable housing in the borough by £9m – even though they had already agreed their project would be profitable if they donated £17.9m.

But a second policy, introduced at the same time, had even greater implications for small-scale housing developments. It introduced an exemption from Section 106 contributions for any scheme of 10 homes or fewer, which represents the vast majority of planning applications in many boroughs, where in-fill and pull-down schemes of just a few units make up the bulk of new homes. Under that policy, luxury housing developers were free to make even bigger profits, while local authorities were powerless to claw back any uplift in value.

Both misguided policies have now been hastily withdrawn after a High Court challenge, which was brought by the councils of West Berkshire and Reading – one Tory, the other Labour. In a powerful show of cross-party support, the two councils claimed the policies would cut the affordable homes they could build by 15 to 30% a year, and that the guidance was in direct contradiction of their established local plans. They further argued that the policies would result in a loss of 21% of affordable housing across the country, with a much bigger impact in regional areas, where tight green belt restrictions mean that much new housing is made up of small-scale developments on brownfield sites.

In a landmark ruling (PDF) – which could have far wider implications for central government’s gung-ho approach to planning – Mr Justice Holgate concluded that both policies had been implemented without a proper evidence base, against the advice of officials, and that they were simply “incompatible” with the statutory planning framework.

In a damning verdict on the vacant building credit, he said: “No consideration was given to the lack of information on the impact of this policy change, notwithstanding the advice given by officials that this was necessary.” He also highlighted the problem that the policies were introduced as guidance, rather than primary legislation, without any consultation, creating a conflict with adopted local plans across the country – which have to be robustly evidenced.

Office buildings in Manchester city centre, which were at risk of redevelopment under the quashed planning policy. Photograph: Christopher Thomond/The Guardian

“This is a very important victory for localism,” says Bob Colenutt, planning expert at the University of Northampton. “It shows that if a local authority has gone through a proper consultation process and produced a local plan, it can’t just be overridden by a central government diktat. It shows that local plans matter, with real policies driven by housing need, rather than the misguided whims of ministerial guidance.”

He hopes the ruling might encourage a review of viability assessments too, the confidential financial reports that appear to allow developers to plead poverty and dodge their affordable housing obligations. The primacy of viability is enshrined in national planning policy, but Colenutt doesn’t see why it couldn’t also be challenged by local authorities who set their own affordable housing targets.

The removal of the policies has been welcomed by politicians and planners across the board, widely seen as an encouraging sign that local authorities can enforce their own plans without central government meddling.

“It’s really good news,” says James Murray, executive member for housing at Islington, who says the borough had been preparing its own legal challenge to the policies. “In the past, when our decisions have been appealed, the planning inspector has always said central government policy trumps our well-evidenced local development plan. On a whim, the government has overturned decisions and ridden roughshod over local plans. This ruling suggests that will no longer be the case; we are free to enforce policies for the public good.”

The ruling was described as a “victory for common sense [that] will help generate more affordable homes in London,” by a spokesman for Labour Built Environment, while mayoral hopeful Tessa Jowell added: “The vacant building credit has done untold damage to London … it has been clear for months that the government got this badly wrong.”

The Department for Communities and Local Government has said it is “disappointed by the outcome” and will be seeking to appeal against the judge’s decision. Critics fear it will simply find another way to achieve the same result of eroding affordable housing obligations.

“They’ll probably be a bit cleverer next time,” says Colenutt. “I think they’re trying to scrap Section 106 entirely, so they’ll be back with another way to do it.” He points to the example of the Starter Homes programme, another government initiative that allows developers to avoid affordable housing payments, once again under the banner of removing red tape and getting Britain building.

“We may have won this battle,” says Murray. “But there is an almighty war ahead with the government. Their vision of planning is a reckless free-for-all, where land values are allowed to go through the roof.”