(Releads with confirmation, adds reaction, background)
BERLIN, Feb 24 (Reuters) - Germany's government, which has steadfastly opposed barring heavily-polluting diesel cars from cities, is working on changes to allow driving bans on certain routes on an emergency basis, documents seen by Reuters showed.
Junior transport minister Norbert Barthle, a conservative, disclosed the shift in a reply to a parliamentary question by the Greens party, first reported by the Rheinische Post.
The plans come days before a German court rules on whether cities can implement bans which carmakers say could cut the resale value of up to 15 million vehicles in Europe's largest car market, forcing manufacturers to pay for modifications.
German Chancellor Angela Merkel's government is under pressure to help 70 cities whose emissions violate European Union standards and is keen to find ways to avoid broad bans.
"A new legal basis is to be established that would allow ... driving bans or restrictions on certain limited routes to protect human health against particulates or emissions (nitrogen oxide)," Barthle said in the reply.
"That would make possible for the first time route-limited, emergency measures to protect against particulates," he said.
The new rules could be finalised by the end of the year.
Merkel has stressed the need to find solutions quickly for the affected cities and said she wants to avoid driving bans, which could anger drivers, by focusing on switching fleets of taxis and buses to electric propulsion.
Germany is also considering plans to make public transport free in cities suffering from poor air quality.
Germany's highest federal administrative court is due to rule on Tuesday on an appeal brought by German states against bans imposed by local courts in Stuttgart and Duesseldorf over bad air quality.
There has been a global backlash against diesel-engine cars since Volkswagen admitted in 2015 to cheating U.S. exhaust tests, meant to limit emissions of particulate matter and nitrogen oxide (NOx) which cause respiratory disease.
While other countries are also considering restrictions on diesel cars, bans in Germany would be a big blow to the car industry, and an embarrassment for Merkel's government, which has long backed the industry, which employs 800,000 people.
German carmakers have invested heavily in diesel to help cut carbon dioxide emissions and meet climate change goals, but the VW scandal has forced manufacturers to increase efforts on electric cars and invest in making diesel engines cleaner.
Oliver Luksic, transport expert for Germany's pro-business Free Democrats (FDP), said the plans were a "disappropriation for millions of drivers" and a confession from the government that they had failed to tackle the diesel scandal.
"Many people have bought diesel cars in good faith, now their vehicles will lose value and won't be used in many big cities. There is no way to avoid modifications of diesel cars at the expense of carmakers," Luksic said. (Writing by Andrea Shalal and Madeline Chambers; editing by Alexander Smith)