German cities will be allowed to ban older diesel vehicles from some areas following a landmark court ruling.
The Federal Administrative Court in Leipzig said the cities of Stuttgart and Duesseldorf could legally ban more older, more polluting diesel cars from zones worst affected by pollution.
Both the government and the car industry have opposed the bans, which set a precedent for the whole country.
They fear diesel owners' lives will be disrupted and vehicles will lose value.
The ruling by the country's highest federal administrative court came after German states had appealed against bans imposed by local courts in Stuttgart and Duesseldorf, in cases brought by environmental group DUH.
It said bans were necessary after about 70 German cities exceeded European Union nitrogen oxide (NOx) levels limits last year.
Diesel emissions containing nitrogen oxide can cause respiratory disease.
Diesel vehicles have faced greater scrutiny since VW's "dieselgate" scandal.
In September 2015 the car maker admitted it had used illegal software to cheat US emissions tests. Some 11 million cars worldwide ended up being affected by the scandal.
DUH said it hoped the bans in German cities would end the industry's "resistance" to refitting older, more-polluting cars to meet the latest EU standards.
The impact on German drivers could be marked, however, with millions being forced to leave their cars at home on days when harmful emissions are particularly high.
Of the 15 million diesel cars on Germany's roads, only 2.7 million meet the latest Euro-6 standards, according to data from Germany's automotive watchdog.
Car companies could also incur huge costs to refit vehicles at a time when consumer interest in diesel is falling.
The market share for diesel vehicles in Germany plunged from 48 per cent in 2015 to around 39 per cent last year, reports BBC.