"It's a great day for clean air in Germany," said Juergen Resch, head of the group Environmental Action Germany which had sued dozens of German cities for failing to meet legally binding emissions limits. Resch noted the Leipzig court concluded that European legislation and people's health were more important than national regulations.
Two German states had appealed lower court decisions that suggested driving bans for particularly dirty diesel cars would be effective.
Judges rejected the appeal, effectively instructing two cities at the center of the case — Stuttgart and Duesseldorf — to consider driving bans for heavily polluting diesel vehicles in their clean air plans.
Germany's environment minister, Barbara Hendricks, said the ruling doesn't force cities to impose diesel bans and that the government hopes they can be avoided.
Still, she said the decision confirms "the population's right to clean air in cities today."
While diesel cars produce less carbon dioxide and tend to get better mileage than gas-powered vehicles, they emit higher levels of nitrogen oxides, or NOx, that are harmful to human health.
Chancellor Angela Merkel sought to downplay the prospect of widespread diesel driving bans, suggesting that many of the 70 German cities that regularly exceed pollution limits might be able to cut harmful emissions with other measures.
Experts, however, questioned whether bans can be avoided and accused the German government of ignoring the health problems caused by diesel for too long.
Fritz Kuhn, the Green party mayor of Stuttgart, which is home to automakers Daimler and Porsche, accused the federal government of leaving cities to clear up the mess by failing to provide a nationwide solution for the problem.
Stefan Bratzel of the Center of Automotive Management, a think tank in Germany, said the verdict reflects "years of strategic political failure."
He urged the government to use the verdict as the starting point for a comprehensive rethink of transportation policy that includes cleaner diesel technology.
Whatever measures German cities take, the owners of diesel cars are likely to bear some of the costs. The value of diesel vehicles already took a severe hit when carmaker Volkswagen was found three years ago to have used in-car software to cheat on U.S. diesel emissions tests, and judges in Leipzig made clear that cities won't be required to compensate drivers for being unable to use their diesel cars.
The verdict prompted anguished comments from groups representing small and medium-sized companies, many of which use diesel vehicles for their business. Berlin's Chamber of Commerce said firms in the capital would have to spend 240 million euros ($295 million) to replace their fleets if diesel cars are banned — enough to drive many out of business.
Automakers, too, can expect to cough up.
Kai Wegner, a lawmaker who speaks for Merkel's party on urban issues, said consumers shouldn't suffer because of car manufacturers' failures.
"The auto industry that caused the harmful emissions has to upgrade diesel engines at its expense," he said.
His comments were echoed by Hendricks, the environment minister, who said "automakers caused the problem and we mustn't absolve them of their responsibility."
Matthias Wissmann, head of the German automakers' association VDA, called on cities to carefully weigh what measures would be most effective in reducing harmful emissions. He noted that the cleanest diesel cars, which meet the so-called Euro-6 standard, wouldn't be affected by driving bans.
Analysts said the verdict might actually prove to be a boon for the economy if consumers who rely on their cars choose to upgrade their engines or buy a new model.
"German auto manufacturers have already started offering rebates for exchanging older diesel cars for new models," said Thomas Strobel, an economist at UniCredit Bank in Munich.