The Welsh Government has agreed to work on new plans to tackle high levels on air pollution, the High Court has heard.
Campaign group ClientEarth went to court claiming a failure to properly address nitrogen dioxide levels in towns and cities which break EU law.
The Welsh Government said ministers would work with ClientEarth on a legally-binding agreement.
It also announced in December a new air quality assessment centre would open.
Speaking outside court, ClientEarth chief executive James Thornton said: "People across Wales have been breathing illegal levels of air pollution for years and we hope the Welsh Government will waste no time now in committing to strong and decisive action to cleaning it up."
The Welsh Government said it was committed to improving air quality across Wales, in line with EU law.
A spokeswoman added: "Our recently announced clean air plan for Wales will include a clean air zone framework to ensure the consistent and effective implementation of clean air zones by local authorities, improvements to local authority reporting and the establishment of a national air quality assessment and monitoring centre for Wales.
"We will also be re-launching our air quality website to include improved air quality forecasting capability, new sections for schools and health advice.
"It would not be appropriate for us to comment further on ClientEarth's case before we have received the outcome of the court hearing."
The judgement has been reserved to a later date.