The EU's General Court "annuls in part the Commission’s regulation setting excessively high oxides of nitrogen emission limits for the tests for new light passenger and commercial vehicles", a statement said.
The commission had raised the limit on road tests on light passenger and commercial vehicle for highly polluting NOx emissions to more than twice the level for laboratory tests.
Diesel motors are primarily responsible for NOx emissions.
The move was approved by the European parliament in 2015, just weeks after the Dieselgate scandal, in which Volkswagen was found to have cheated emissions tests.
On Thursday, the court conceded that conditions while driving in the open air are different. But it found that the change made it impossible to know whether the Euro 6 standard, adopted in 2007, was being complied with during the tests.
It rejected the commission's claim that the city councils could not bring the case and ordered the decision to be annulled.
However, the commission may appeal and, even if that appeal is rejected, there will be a 12-month period in which a substitute law must be drawn up and approved, meaning that a final ruling may not be delivered until the end of 2020.
Environmental campaigners joined the city council leaders in enthusiastically welcoming the ruling.
Paris mayor Anne Hidalgo hailed it as historic.
Paris mayor Anne Hidalgo hails a "historic victory for the #environment"
Victoire historique pour l'#environnement, les consommateurs et la démocratie européenne ! Le Tribunal de l'#UE donne raison aux Maires de Paris, Bruxelles et Madrid face à la Commission européenne et annule le "permis de polluer" accordé aux constructeurs automobiles ! 👏👏 pic.twitter.com/CIf8dM2zK4Anne Hidalgo (@Anne_Hidalgo) 13 décembre 2018
The C40 cities group was also positive.
This is a historic decision! Cities of Paris, Brussels & Madrid, represented by the lawyer Jérémie Assous, won a major legal victory against the European Commission to make sure cars and vans on our streets don't poison the air we breathe: https://t.co/QfK4FThSXm #Cities4Climate pic.twitter.com/0V5k5Wo8a2C40 Cities (@c40cities) 13 décembre 2018
And so was Belgian Greenpeace spokesperson Joeri Thijs.
Belgian Greenpeace spokesperson welcomes decision
THIS IS BIG, and probably the end of new #diesel cars soon.Joeri Thijs (@JoeriThijs) 13 décembre 2018
The European Court of Justice says that too relaxed norms (conformity factor) for EURO 6 diesels are ILLEGAL.
Car industry will have to accelerate shift to electric now.https://t.co/m1NnTIRlCh@StadBrussel
There was one crumb of comfort for the commission, however.
The court rejected Paris's claim for one euro in nominal damages for harm to its image and legitimacy on the grounds that " such damage is not proven, but would in any event be sufficiently compensated for by the annulment of the provision at issue".