* Planned retrofits of diesel cars not sufficient - judge
* Carmakers sought to avert legal curbs through retrofits
* Other cities could follow if Stuttgart bans diesel cars (Adds Daimler and transport minister comments, details)
STUTTGART, Germany, July 28 (Reuters) - A German court on Friday backed an effort to ban diesel cars from Stuttgart, dealing a blow to carmakers such as Daimler and Volkswagen which had sought to avert legal curbs by modifying vehicles to cut their emissions.
Since Volkswagen (VW) admitted in September 2015 to cheating emissions tests, diesel cars have been scrutinised for nitrogen oxide (NOx) emissions blamed for causing respiratory disease.
Environmental group DUH went to court two months after the VW scandal broke to impose a ban on diesel cars in Stuttgart.
The city, which is home to Porsche and Mercedes-Benz, as well as auto supplier Bosch, has since said it would bar diesel cars on heavy pollution days if vehicles failed to meet the latest emissions standards.
German carmakers, which have invested heavily in diesels that emit less carbon dioxide, a gas blamed for accelerating global warming, proposed updating engine management software on some older vehicles to filter out more emissions.
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 criticised 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.
Elsewhere, the mayors of Paris, Madrid, Mexico City and Athens say they plan to ban diesel vehicles from city centres 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.
This month, Sweden's Volvo 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.
(Reporting by Ilona Wissenbach in Stuttgart and Markus Wacket in Berlin; Writing by Andreas Cremer and Edward Taylor; Editing by Maria Sheahan and Edmund Blair)