STUTTGART, Germany (Reuters) - A German court on Friday backed an effort to ban diesel cars from Stuttgart, dealing a blow to carmakers such as Daimler DAIGn.DE and Volkswagen VOWG_p.DE which had sought to avert legal curbs by modifying vehicles to cut their emissions.

A motor mechanic measures exhaust emissions in a diesel-engined car in Eichenau, Germany July 28, 2017. REUTERS/Michaela Rehle

Since Volkswagen (VW) admitted in September 2015 to cheating emissions tests, diesel cars have been scrutinized for nitrogen oxide (NOx) emissions blamed for causing respiratory disease.

Environmental group DUH went to court two months after the VW scandal broke seeking to force the city of Stuttgart, which is home to carmakers Porsche, Mercedes-Benz and auto suppliers Bosch and Mahle, to drastically improve its air quality by banning diesel cars.

The city has since said it would bar diesel cars which did not conform to the latest emissions standards, on days when pollution is heavy.

In a bid to prevent a complete ban of diesel cars, German carmakers and politicians have worked on a plan to improve air quality by updating engine management software on some older vehicles to make exhaust filter systems more effective.

Stuttgart’s home state of Baden-Wuerttemberg said it would study the court ruling before deciding if and when it would impose a ban that DUH wants by January 2018. The state could also appeal the verdict at the Federal Administrative Court.

Analysts have said they expected other German cities would follow suit swiftly if Stuttgart put a diesel ban in place.

“Safeguarding health is more important than the right to property and the general liberty of the car owners affected by the ban,” Wolfgang Kern, the presiding judge at the Stuttgart administration court, said.

Kern said in his ruling, which also applies to older petrol engine cars, that Stuttgart must ensure emissions limits were met as soon as possible and said software-based retrofits of diesel cars were insufficient and would come too late.

Germany’s powerful VDA auto industry lobby criticized the ruling that was made before an Aug. 2 summit backed by politicians and the auto industry to support the use of diesel.

“There are more intelligent solutions than a total ban,” VDA said, adding it expected an appeal at the Federal Administrative Court would reach a different conclusion to the Stuttgart court.

Stefan Weil, premier of Volkswagen’s home state of Lower Saxony, has proposed tax incentives to promote the sale of low emission modern diesels and electric cars.

“We need to create incentives to push a switch from old diesel to newer euro 6 and electric cars,” Weil told RedaktionsNetswerk Deutschland.

Lower Saxony controls 20 percent of Volkswagen’s voting shares. Lower Saxony was not immediately available for comment.

Elsewhere, the mayors of Paris, Madrid, Mexico City and Athens say they plan to ban diesel vehicles from city centers by 2025. The French and British governments have said they would end the sale of new gasoline and diesel vehicles by 2040.

To clean up diesel cars with engines designed to meet Euro-6 and Euro-5 emissions standards, DUH proposed replacing emission control systems which it said would cost about 1,500 euros per vehicle and should be fully funded by the carmakers.

Daimler on Friday said software updates would bring a “significant reduction” in NOx emissions and said driving restrictions impeded the economy, trade and traffic.

Slideshow ( 2 images )

This month, Sweden's Volvo VOLVb.ST became the first major traditional automaker to set a date for phasing out vehicles powered solely by the internal combustion engine, saying all its car models launched after 2019 would be electric or hybrids.

Transport Minister Alexander Dobrindt, who has announced plans for a fund to improve traffic flows in cities, said the benefit of retrofitting diesel engines must not be discounted.

“General driving bans are the wrong political way,” he said.

Environment minister Barbara Hendricks told German television ZDF that voluntary software updates will be decided on Wednesday, adding this in only a first step, with a more thorough technical update of cars needed to avoid bans in the longer run.

“A second step needs to follow. And the carmakers need to tell us on Wednesday, when and how they will be in a position technically to take the next step,” Hendricks told ZDF.