Environmental campaigners in Britain won a High Court legal battle on Wednesday over the government's failure to tackle air pollution to meet European standards.
The ClientEarth non-governmental organisation (NGO) argued that Britain's environment minister had failed to take action to comply with European Union law on levels of nitrogen dioxide "as soon as possible".
A judge ruled in favour of the group's case, declaring that the government's Air Quality Plan was unlawful and "must be quashed" and rewritten.
The defeat is a blow for the government as it seeks to demonstrate its commitment to the global climate change deal struck in Paris last year.
ClientEarth's case focused on claims that ministers prioritised costs over health implications when drawing up plans to cut emissions.
The government's own data estimates that air pollution causes more than 40,000 premature deaths a year in Britain.
In his ruling, judge Neil Garnham said the government's goal of complying with EU targets nationally by 2020 and in London by 2025 were too distant and its model for future emissions "too optimistic".
Limits for nitrogen dioxide were introduced by EU law in 1999, and were to be achieved by 2010.
ClientEarth says that 37 out of 43 zones across Britain remain in breach of legal limits.
Britain is one of 60 countries committed to the COP21 climate deal struck in Paris in December 2015, with Prime Minister Theresa May promising to ratify the deal by the end of the year.
However, questions about how emissions cuts will be divided among EU states have held up the deal in some countries, amid uncertainty over how Britain's exit from the bloc will affect quotas.
Responding in parliament to Wednesday's ruling, May said the government had taken action on air quality but added: "there's more to do and we will do it".
This case is the second the British government has lost in two years on its failure to clean up air pollution.
ClientEarth won a Supreme Court case on the same issue in April 2015, when ministers were ordered to draw up a plan to reduce air pollution. That plan has now been found to be legally flawed.
London Mayor Sadiq Khan, who backed the NGO's case, said the government had "let down millions of people".
"Today's High Court ruling brings sharply into focus the scale of the country's air pollution crisis and lays the blame at the door of the government for its complacency in failing to tackle the problem quickly and credibly," he said.
ClientEarth chief executive James Thornton welcomed the ruling and urged 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."
Explore further: EU court says Britain must cut air pollution