German car giant Daimler reported Thursday a slump in third-quarter profits, confirming a weaker 2018 outlook as it suffered lower sales and shouldered costs for refits to polluting diesel cars.

Net profit at the Mercedes-Benz maker shed 21 percent year-on-year between July and September, to 1.76 billion euros ($2.0 billion), short of analysts’ forecasts.

Operating, or underlying profits were even harder hit, falling 27 percent to 2.5 billion euros, while revenues were down 1.0 percent at 40.2 billion.

“The automotive industry and thus also Daimler are still in a very challenging environment,” chief executive Dieter Zetsche said in a statement.

At the Mercedes-Benz cars arm, the third quarter brought a four-percent drop in unit sales to 795,000 vehicles, and a seven-percent drop in revenue.

But the flagship division’s operating profit tumbled 35 percent over the quarter as it faced “ongoing governmental proceedings and measures taken for diesel vehicles”, the group said.

Weighing on the carmaker was a recall ordered by the German government in June of some 774,000 cars Berlin said had been equipped with illegal software to conceal excessive emissions of harmful nitrogen oxide gases (NOx).

The measure was the biggest blow yet for Daimler in the industry’s “dieselgate” scandal that began with Volkswagen’s 2015 admission to manipulating 11 million vehicles worldwide.

Daimler, rival BMW and VW also face a European Commission cartel probe into whether the firms agreed not to compete with each other on anti-pollution systems.

New more stringent EU emissions tests have proven to be a bottleneck in getting new cars registered on the roads.

The group is also suffering from the US-China trade war as Beijing levies tariffs on its cars exported from America.

There was a brighter picture at Daimler’s other major unit, Daimler trucks, which revved up operating profit 38 percent.