German carmakers and diesel drivers were dealt a blow today, when the federal court in Leipzig gave the go-ahead for German cities to ban diesel vehicles that emit unsafe levels of nitrogen oxide from entering city centers.

The court said that there should be a phased introduction of the bans, but no financial compensation for the affected car owners. The ban could be implemented in up to 70 towns and cities, and is likely to include some 12 million diesels.

It’s bitter news for Germany’s auto companies, who must now get serious about retrofitting diesels that don’t conform to emissions standards. Shares in Volkswagen, Daimler, and BMW dropped on the news. Car owners could now find themselves unable to sell their cars, or have to sell them at a loss.

The case reached the federal court after environment organization Deutsche Umwelthilfe sued the states of Baden-Württemberg and North Rhine-Westphalia in a regional court, which ruled they needed to look into diesel bans to improve the terrible air pollution in Stuttgart and Düsseldorf. The states appealed the local court ruling, and lost.

Reactions to today’s ruling have been either jubilant or furious. Germany’s Nature And Biodiversity Conservation Union said: “The car industry gambled and lost badly.”

“We are not fighting against diesel, but for clean air,” said Jürgen Resch of the Deutsche Umwelthilfe.

Meanwhile, federal environment minister Barbara Hendricks said her goal “is and remains that driving bans never have to come into effect.”

Hans Peter Wollseifer from the Central Association of German Craftsmen told Handelsblatt that the ruling wasn’t “a free ticket to exclude diesel vehicles from all over Germany” and force consumers and workmen to foot the bill, but that it was carmakers who need to update their diesel cars.

Germany’s big bad diesel problem

According to the Federal Environment Agency, diesel cars contribute around 60% of the pollution in the country. Nitrogen oxide from exhaust fumes is believed to cause thousands of premature deaths every year.

Since the emissions-manipulation scandal erupted with Volkswagen in 2015, it has engulfed all the big German automakers. Daimler, Porsche, BMW, and Audi were also found to have manipulated nitrogen-oxide emissions and issued mass recalls. This, plus looming inner-city diesel bans, has frightened drivers and punctured diesel sales.

German carmakers have tried to avoid mechanically retrofitting their diesel motors to cut down the amount of dangerous nitrogen oxide they emit, arguing that the process would be too expensive and too slow.

However, test results published last week by Germany’s Automobile Club (ADAC) said that hardware retrofitting is “not just possible but highly effective.”

“The test has finally refuted the industry’s fake news: Hardware retrofitting works,” said Dieter Roßkopf, head of the ADAC Württemberg. The ADAC ran tests (link in German) on used diesel cars of the old Euro-5 emissions standard, and found that adjusting the hardware reduced nitrogen oxide emissions by 70% to 90%. They noted that fixing these cars would mean a 25% reduction in pollution in badly-affected cities.

The ADAC fitted test vehicles were with SCR systems, which inject urea solution into the exhaust stream, and convert nitrogen oxides into harmless nitrogen gas and water vapor. That’s the more expensive solution, and not what car bosses want. They want to offer a much cheaper software update that would make the exhaust filtering systems function more efficiently, but only reduces nitrogen oxides by around 25% .

“The costs of retrofitting, ranging between €1,400 and €3,300 per car, must in no way be paid by consumers,” the ADAC wrote. A recent report by Germany’s Süddeutsche Zeitung revealed (link in German) that a group of experts recommended to the government that it—i.e., the taxpayer—should foot the bill for retrofitting the cars with the manipulated emissions.

Oliver Krischer from the Greens, a member of the Bundestag, described the notion that taxpayers would pay as a “cheek.” “I expect the federal government to compel car producers to retrofit these cars,” Krischer said. “It can’t be that in the end it will be financed by taxes, or that in the end the car owners have to pay up for it. They were the ones who were cheated.”

Germany’s powerful automakers haven’t been forced to compensate affected drivers of manipulated diesels. Angela Merkel, sometimes dubbed the “car chancellor” for how she has coddled the car industry, let car companies off with a slap on the wrist last August: They were ordered to refit around 9 million diesel cars with new software so they emit less nitrogen oxide, and pay into to a public transit fund.