In its monthly report, the ministry named the issue, which broke out almost two years ago after Volkswagen (>> Volkswagen) admitted to cheating U.S. diesel emissions tests, as a threat to Germany along with Britain's decision to leave the European Union and protectionist trade policies by the U.S. government.

The car industry is Germany's biggest exporter and provides about 800,000 jobs.

"Risks linked to how Brexit will shape out and future U.S. trade policies remain," the ministry said. "In addition, the so-called diesel crisis should be classified as a new risk to the German economy even though its effects are not possible to quantify at the moment."

Strong household and state spending provided most of the impulse for the German economy in the second quarter when growth was measured at 0.6 percent. Weaker net foreign trade dampened growth, as exports grew strongly less than imports.

The ministry said it expected the industrial sector to continue its upswing also in the third quarter, pointing to robust orders and strong business sentiment indicators.

But the diesel crisis could cloud the German growth outlook, it said, adding: "Given the importance of the automotive industry they (the effects of the diesel crisis) must be classified in the medium term as a risk to the overall economic development."

German politicians and car bosses agreed earlier in August to overhaul engine software on 5.3 million diesel cars to cut pollution and try to repair the industry's battered reputation.

EU antitrust regulators are also investigating allegations of a cartel among a group of German carmakers, a measure that could result in hefty fines for the companies.

(Reporting by Joseph Nasr; Editing by Toby Chopra)

Stocks treated in this article : Bayerische Motoren Werke, Audi AG, Daimler, Volkswagen