FRANKFURT -- Daimler issued its third profit warning for 2019, as costs related to diesel-emissions allegations, heavy investment in electric vehicles and production issues weighed on earnings.

Earnings before interest and taxes fell by about half to 5.6 billion euros ($6.2 billion) for the year, Daimler said on Wednesday in a preliminary earnings statement.

That’s before another 1.1 billion to 1.5 billion euros in legal and governmental costs in various markets where Mercedes-Benz diesel cars and vans are sold.

Daimler said that it expects the return on sales at Mercedes-Benz Cars, which includes the Smart brand, to slump to 4 percent in 2019, compared to 7.8 percent in 2018.

At its vans division, the company expects the return on sales to decrease to minus 15.9 percent from plus 2.3 percent and to 6.1 percent from 7.2 percent at its trucks unit.

One-off costs of 300 million for a review of its vans product portfolio as well as another 300 million for the realignment of its Your Now mobility services are included in the preliminary figure, Daimler said.

The weak earnings contrast with Daimler's car sales. It sold 2.34 million Mercedes cars in 2019 for a ninth consecutive year of record sales, putting the automaker in pole position to retain the title of world's biggest-selling premium car brand.

The automaker had flagged an expected slump in 2019 earnings in October and at the time said that legal proceedings tied to diesel emissions may result in additional expenditures.

Daimler had a rough year in 2019 related to trade tensions, tariffs and a general slowdown in the global automotive market, while production hiccups affected key SUVs.

Daimler's diesel pollution levels are being investigated by prosecutors in Stuttgart, Germany, where it is headquartered, as well as by the U.S. Environmental Protection Agency (EPA) and the California Air Resources Board (CARB).

Earlier this month, investors sued Daimler for $1 billion in Germany, accusing it of concealing the use of emissions cheating software. Daimler denies wrongdoing.

The profit warning is the third since Ola Kallenius took over from long-standing Daimler CEO Dieter Zetsche in May, and the fifth in around 19 months. Kallenius will present full-year earnings on Feb.11.

Juergen Pieper, cars analyst at brokerage Metzler, said Mercedes' 4 percent margin was the weakest among German carmakers.

"Daimler is not getting its problems under control fast enough. The company is in the midst of a major crisis", he said.

Others saw scope for optimism.

"Daimler looks likely to benefit from the strong momentum of upcoming product launches from 2020 onwards, which should help achieve incremental cost savings and pricing power improvement versus peers," JP Morgan said in a note to client, adding its recommendation for the stock remained "overweight".

Reuters and Bloomberg contributed to this report