FRANKFURT/BERLIN (Reuters) - A court will decide on Thursday whether German cities can ban heavily polluting cars, potentially wiping hundreds of millions of euros off the value of diesel cars on the country’s roads.

A journalist stands in front of the Volkswagen powerplant in Wolfsburg, Germany September 23, 2015. REUTERS/Axel Schmidt

Environmental group DUH has sued Stuttgart in Germany's carmaking heartland, and Duesseldorf over levels of particulate matter exceeding European Union limits after Volkswagen's VOWG_p.DE 2015 admission to cheating diesel exhaust tests.

The scandal led politicians across the world to scrutinize diesel emissions, which contain the matter and nitrogen oxide (NOx) and are known to cause respiratory disease.

There are around 15 million diesel vehicles on German streets and environmental groups say levels of particulates exceed the EU threshold in at least 90 German towns and cities.

Local courts ordered them to bar diesel cars which did not conform to the latest standards on days when pollution is heavy, startling German carmakers because an outright ban could trigger a fall in vehicle resale prices, and a rise in the cost of leasing contracts, which are priced on assumed residual values.

The German states concerned, where the carmakers and their suppliers have a strong influence, appealed against the decisions, leaving Germany’s federal administrative court - the court of last resort for such matters - to rule on whether such bans can legally be imposed at local level.

“The key question is whether bans can already be considered to be legal instruments,” said Remo Klinger, a lawyer for DUH. “It’s a completely open question of law.”

Paris, Madrid, Mexico City and Athens have said they plan to ban diesel vehicles from city centers by 2025, while the mayor of Copenhagen wants to ban new diesel cars from entering the city as soon as next year. France and Britain will ban new petrol and diesel cars by 2040 in a shift to electric vehicles.

DIESEL? NEIN DANKE

Evercore ISI forecasts a 5 percent fall in diesel residual values could result in a drop of 1.6 billion euros ($2 billion) in operating profit across eight European and U.S. carmakers.

Analysts at Bernstein Research have said that diesel bans in Europe would hit French carmaker Peugeot hardest, followed by Renault. Among German carmakers, Daimler's global fleet exposure to diesel is around 38 percent, BMW's 35 percent and VW's VOWG_p.DE 26 percent, Bernstein said in a report from 2016.

Carmakers have sought to avert total bans by updating engine management systems to improve exhaust-treatment filters, a step only possible on vehicles equipped with software-based engine-management systems.

Environmental groups have called software updates insufficient and have lobbied for cars with Euro-6 and Euro-5 emissions standards to receive hardware updates of their exhaust treatment systems, costing at least 1,500 euros per vehicle.

Europe’s love affair with diesel is already fading, with its market share in the European Union falling from 53.6 percent at the end of 2014 to 49.9 percent at the end of 2016, European automotive association ACEA’s most recent data shows.

($1 = 0.8035 euros)