An environmental activist demonstrated last week in front of the Federal Administrative Court in Leipzig, eastern Germany, where the court is considering the legality of banning driving diesel cars when pollution reaches high levels.

A top German court on Tuesday ruled that cities can impose diesel driving bans to combat air pollution, in a landmark decision that could shake up the auto industry and upend transport policies.

Judges at the Federal Administrative Court in Leipzig found that local authorities have the right to ban older, dirty diesels from their city centres—plunging millions of drivers into uncertainty.

The court did not impose such bans itself, leaving that up to city and municipal authorities. The judges did however urge them to "exercise proportionality" in enforcing the bans, and said any curbs should be introduced gradually.

The case centred around the smog-clogged cities of Stuttgart and Duesseldorf, but could have nationwide repercussions.

The outcome marks a major victory for the environmentalist group Deutsche Umwelthilfe (DUH), which sued Stuttgart and Duesseldorf to force them to take action against the toxic nitrogen oxides and fine particles emitted by older diesel engines.

Lower-level judges had already backed their demand for driving bans but the states of Baden-Wuerttemberg and North Rhine-Westphalia appealed the rulings, saying such curbs should be decided at the federal level.

But judges at the nation's top administrative court again sided with the environmental campaigners.

"It's a great day for clean air in Germany," said DUH chief Juergen Resch.

Greenpeace also welcomed the verdict. "Every city can now defend its citizens' right to clean air," the environmental group's spokesman Niklas Schinerl said.

The ruling will come as blow to the government and the nation's mighty auto industry who strongly oppose driving bans, fearing outrage from diesel owners whose lives stand to be disrupted and whose vehicles could lose their resale value.

In a nod to those concerns, presiding judge Andreas Korbmacher said "certain losses will have to be accepted".

He also urged city and municipal authorities to avoid "a patchwork" of local measures.

Critics had earlier argued that the bans would be complicated to enforce and cause confusion among drivers.

Harmful fine particles and nitrogen oxides (NOx)from diesel engines has made it difficult for many cities to meet pollution targets.

10 million cars

Analysts at EY consultancy said drivers of all but the latest diesel models that adhere to the Euro 6 standards "can no longer be certain of being allowed to drive at any time, 365 days a week".

It estimates that some 10 million vehicles will be affected across the country.

Ahead of the closely-watched court decision, the German transport ministry had signalled it was already preparing for possible bans, with plans for slimmed-down version of diesel curbs appearing in the media over the weekend.

According to the proposals, the ministry could later this year update traffic regulations to include the option of city-ordered diesel bans on certain routes.

Concerns over the harmful effects of diesel have soared since Volkswagen admitted in 2015 to installing cheating devices in millions of cars that allowed them to secretly spew far more nitrogen oxide than legally allowed.

The poisonous gases have been linked to respiratory illnesses and heart problems, and are responsible for thousands of premature deaths each year.

Other carmakers have also come under suspicion for curbing or shutting off emissions controls, shattering diesel's "clean" reputation.

Mounting pressure

The industry has responded to "dieselgate" by offering software upgrades and trade-ins for newer, cleaner models but it has resisted calls for costly hardware fixes.

DUH chief Resch however said Tuesday's ruling could finally put real pressure on automakers to retrofit older cars with properly functioning emissions controls.

"I now expect the auto industry to deliver," he said.

Chancellor Angela Merkel's government meanwhile has offered a billion-euro fund, partly paid for by industry, to improve public transport or upgrade fleets to electric buses.

Such measures are intended at least as much for eyes in Brussels—where Germany and a slew of other EU member states risk legal action after sailing past a deadline to reduce air pollution—as for those in town halls.

Some 70 German cities including Munich, Stuttgart and Cologne recorded average nitrogen dioxide levels above EU thresholds in 2017, according to the Federal Environment Agency.