The High Court has ruled against the Government over its failure to tackle illegal air pollution.
Environmental legal group ClientEarth described the decision as a "damning indictment of ministers’ inaction on killer air pollution".
Mr Justice Garnham decided the Environment Secretary had failed to take steps to bring the UK into compliance with the law "as soon as possible".
In an echo of the Volkswagen vehicle emissions scandal, the judge said ministers knew an overly optimistic model of pollution was being used, ClientEarth said in a statement.
ClientEarth's chief executive James Thornton said: "I am pleased the judge agrees with us that the Government could and should be doing more to deal with air pollution and protecting people’s health. That’s why we went to court.
"The time for legal action is over. This is an urgent public health crisis and the Prime Minister must take personal control.
"I challenge Theresa May to take immediate action now to deal with illegal levels of pollution and prevent tens of thousands of additional early deaths in the UK. The High Court has ruled that more urgent action must be taken. Britain is watching and waiting, Prime Minister.”
According to Government estimates, some 40,000 people die prematurely in the UK as a result of air pollution.
However, in his judgment, Mr Justice Garnham said the Department for Environment, Food and Rural Affairs appeared content to delay action.
"It is apparent that Defra recognised that they were adopting an optimistic forecast as the foundation for their modelling," he wrote, saying this was used to justify putting off the creation of several low-emission zones in urban areas until 2020 or 2025.
But the judge pointed to a Cabinet briefing note from last year which said "emerging findings from real-world testing by independent experts ... suggest emissions for Euro 6 [a group of vehicles] are significantly higher than previously thought".
This, he said, was "remarkable". "It means that the Government is acknowledging that its plan is built around a forecast based on figures which 'emerging data' is underminin g and that if higher, more realistic, assumptions for emissions are made the number of zones which will not meet the [air pollution] limit value in 2020 increases substantially," Mr Justice Garnham said.
"It seems to me plain that by the time the plan was introduced the assumption underlying the Secretary of State's assessment of the extent of likely future non-compliance [with legal pollution limits] had already been shown to be markedly optimistic."
The worst countries in the world for air pollution deaths
At a hearing last month, ClientEarth presented evidence which it said showed that George Osborne had illegally blocked stricter controls of air pollution when he was Chancellor on the grounds it would cost too much.
However the judge said this criticism was "misplaced" as it was "wholly unsurprising" that the Treasury should seek to "manage and limit the extent of public expenditure. That is what the Treasury is there for".
Mr Justice Garnham ruled the Environment Secretary "fell into error by adopting too optimistic a model for future emissions" and also by deciding to comply with the law only by 2020 – and 2025 in London.
He quashed the Government air quality plan, saying the Environment Secretary must "aim to achieve compliance by the soonest date possible".
This is the second time ClientEarth has won a court battle with the Government over air pollution. In 2015, the Supreme Court decided the Government was not doing enough to reduce pollution levels to within legal limits. Ministers were forced to draw up a new air quality plan, the one that has now again been ruled illegal.
Barbara Stoll, an air pollution campaigner at Greenpeace, said: “This judgment matters to every person breathing in the UK but it can only be called a victory when the levels of toxic air actually start to go down.
"Which means the Government needs to properly police the car industry who are still permitted to produce cars that emit up to 14 times over the legal limit.
"Getting to grips with this scourge means action locally as well as nationally, and the Government needs to provide adequate resources to enable cities to phase out diesel vehicles from our roads, and help people make the switch to cleaner alternatives."
The court's ruling came as Greenpeace called for diesel vehicles to be phased out, after a report by the Institute of Public Policy Research think-tank found they were responsible for nearly 40 per cent of emissions of the air pollutant, nitrogen dioxide.
London is currently breaking World Health Organisation limits for nitrogen dioxide and small particles, which is estimated to result in 10,000 premature deaths a year and cost an annual £3.7bn.
In a statement, Defra said: “Improving air quality is a priority for this Government and we are determined to cut harmful emissions.
“Our plans have always followed the best available evidence – we have always been clear that we are ready to update them if necessary and have been at the forefront of action in Europe to secure more accurate, real-world emissions testing for diesel cars.
“Whilst our huge investment in green transport initiatives and plans to introduce Clean Air Zones around the country will help tackle this problem, we accept the court’s judgment.
“We will now carefully consider this ruling, and our next steps, in detail.”