When Rudolf Diesel, the inventor of the engine that bears his name, jumped (or was pushed) over the railings of a ship bound for England in 1913, he couldn’t have had any inkling how his invention would eventually power the ships, trains, buses, trucks, and cars of the global economy.

The diesel engine is almost sacred in its homeland Germany, where the first diesel cars were developed in the 20s and 30s. Diesel drivers loved them for their amazing fuel economy, but they really started taking off after advancements in engine tech, especially the development of turbocharged direct-injection in the 1990s, meant they could deliver more performance at different speeds. No longer noisy, smoke-belching clods, the new diesels were driveable cars with great mileage—the sensible choice. Diesel passenger cars took off in Europe in a way they never did in the US, mainly because gasoline prices were cheaper there, and carmakers didn’t invest in the technology.

After the Kyoto Protocol in 1997, European governments threw their weight behind diesel cars as a way to hit their CO2-reduction targets, since they emitted way less CO2 than their gasoline-powered brothers. Governments have since spent billions subsidizing the fuel to make it cheaper than petrol, and other incentives, like taxing new diesel registrations at lower rates than petrol cars.

The World Heath Organization published a report in 2012 saying that diesel fumes do cause cancer, thanks to their higher levels of nitrogen oxides and particulates. No one seemed to be listening: From a 13% market share in Western Europe in 1990, diesel shot up to dominate over half of the market.

Then, in 2015, Volkswagen’s emissions-cheating sins gave us Dieselgate and hammered a stake not just through the company’s reputation, but into the image of diesels everywhere. Its impact on health was suddenly front and center. People felt betrayed and confused, and car buyers started backing away.

And then there was a U-turn

In 2017, diesel sales in the UK plunged by a whopping 17%. In Germany it was 7%. In France, the share of new diesels dropped to under 50% of the market for the first time in 17 years. From making up 45.9% of the car market in Germany in 2016, they now account for 38.8%. Last year, sales of petrol cars outstripped diesel in the first half of the year for the first time since 1999.

“For heavy duty vehicles, and for maybe very large cars I could see the diesel surviving for a few more years, but in the small and medium segments it will fade away,” Peter Mock, EU Managing Director at the International Council for Clean Transportation, told Quartz.

“If you focus on the CO2 emissions instead of on the fuel consumption, the diesel cars do not have such a big advantage over the petrol cars any more. If you look at modern petrol cars they have about the same CO2 or in some cases even lower CO2 than a diesel car.”

With diesel bans on the horizon in many highly-polluted European cities, people are anxious about being stuck with a car that will be unsellable or unusable a few years down the line.

Demands for diesel bans in diesel’s homeland are growing too, especially in the cities of Stuttgart, Munich and Berlin, where pollution is a real problem. Germany’s top administrative court meets in February 2018 to discuss—and, of course, German auto firms are terrified of such a thing.

Scrambling to stave off bans and keep selling their profitable diesels, auto chiefs met with the government in Berlin in August 2017 to see what they needed to do. They were ordered to refit around 5 million diesel cars with new software so they emit less nitrogen oxide. That was widely regarded as just a slap on the wrist from a government that has been accused of treating the industry with kid gloves, not only because it employs more than 800,000 people, but also because it generates billions in revenue—more than €400 billion ($489 billion) in 2015.

At another diesel summit in Berlin this month, mayor Michael Müller recommended a diesel ban should be avoided (link in German) at any cost.

Stalling all the way to the bank

While hardly a day goes by without Germany’s auto giants trumpeting their big e-mobility plans, they have invested billions in diesel-engine development and in upgrading the tech to clean up emissions, so they are loath to walk away from the technology.

They simply won’t make as much money on e-vehicles as they do on diesels, which are more expensive than petrol models. “Electric cars in general won’t be as profitable as cars with combustion engines,” BMW CEO Harald Krüger said in September.

Daimler has drawn up a €4 billion cost-cutting plan to offset lower profitability from its electric cars. Honda CEO Takahiro Hachigō, told the Financial Times (paywall) that profitability won’t be great until electric cars achieve mass scale.

Apart from profits, the other main reason why legacy carmakers in Germany are clinging on is that they need diesels in their portfolio in order to comply with the EU’s 2020 emissions regulations—or face huge fines. They argue that diesel technology is needed to bridge the gap until it’s possible to fully migrate to electric vehicles.

Volkmar Denner, the chief exec of Bosch, the world’s largest automotive supplier told Handelsblatt that people shouldn’t be so fast to write off diesels.

“With the technology available today, a diesel engine can achieve the same emission values on the road, under real driving conditions, as on the test bench, Denner said. “Without the diesel engine, Germany will probably not achieve its national climate targets for CO2 emissions.”

“Last year, more Mercedes customers opted for a diesel-powered car than in 2016,” Daimler CEO Dieter Zetsche said on Jan 18. In Berlin, noting that after losing the public’s trust, it turned out to be worthwhile to improve diesel engines instead of banning them.

Given the complete loss of trust among consumers, and the resulting downward slide of diesel sales overall in the last year, that sounds more like wishful thinking that reality.