Where German drivers of diesel cars see a problem, consumers in Italy and Austria see an opportunity.

Germany is exporting second-hand diesel cars at a record pace as buyers are confused about possible bans in cities over air quality and because of a more general image problem following the Volkswagen emissions scandal. That helped to push up exports of used diesel vehicles by a record of more than 20 percent last year, according to research from a German university. Italy and Austria were the biggest buyers last year, while sales to Croatia and Ukraine roughly doubled.

“Sentiment is really bad towards diesel engines in Germany,” said Christian Kille, a professor at the Institute for Applied Logistics, part of the University of Applied Sciences in Wuerzburg-Schweinfurt, who led the study. Foreign buyers are benefiting from a drop in prices, according to the report, which was co-authored by Björn Helmke.

Germany exported a total of 239,541 used vehicles last year, the highest since at least 2006, the study showed. Italy and Austria snapped up the most at more than 20,000 vehicles. Deliveries to France and Spain gained more than 30 percent.

This jump in exports of second-hand diesel cars from Germany coincides with a slump in new registrations. Consumers are buying more gasoline vehicles, a trend that started with revelations in 2015 that Volkswagen had rigged the emissions setups in about 11 million cars globally. While diesel demand for vehicles is difficult to assess and has been resilient because of wider commercial uses, data from the International Energy Agency show a drop in Germany’s total diesel consumption this year from levels in early 2016.

The reticence among buyers in the second-hand market is also linked to talk of bans in German cities following a court ruling earlier this year, Kille said. Restrictions on older diesel cars in parts of Stuttgart and Hamburg have already been announced, with the aim of bringing air pollution levels into line with European Union rules.

“People don’t know if and how the government will ban diesel and which diesel,” said Kille. “Most of the people will not buy diesel cars in order to play it safe.”

Kille now expects more of a move toward electric vehicles, he said. Figures from Germany’s KBA, the Federal Motor Transport Authority, already show that trend, with sales of hybrids almost doubling in July to 13,559 vehicles, giving them a market share of 4.3 percent, up from 2.5 percent in 2017.

Still, there could be a “renaissance” for diesel engines in Germany in a few years as better controlling mechanisms are developed and the current “hysteria” dies down, Kille said. The market may already be near the bottom, Facts Global Energy said in a report this week, forecasting an increase in registrations in Europe’s largest markets by the end of this year.