FRANKFURT — Daimler said on Thursday it will stop building Mercedes-Benz sedans in the United States and Mexico as part of cost-cutting measures to streamline production, after saying it will post a smaller-than-expected operating loss in the second quarter.

The company said it will post an operating loss of 1.68 billion euros ($1.91 billion) in the second quarter, pre-releasing earnings ahead of July 23.

“Daimler pre-released better than consensus second-quarter numbers,” Jefferies analyst Philippe Houchois said in a note late on Thursday.

A slump in demand forced by dealership closures and lockdowns due to the coronavirus crisis pushed Daimler to report an adjusted second-quarter loss before interest and taxes (EBIT) of 708 million euros during the same period.

At its Mercedes-Benz Cars & Vans unit it posted an operating loss of 1.13 billion euros, and an adjusted operating loss of 284 million euros.

Daimler said it had spent 129 million euros on restructuring efforts during the second quarter, a figure that includes staff buyouts at Mercedes. It also announced a 105 million-euros valuation adjustment on YOUR NOW, its car-sharing joint venture.

Daimler further said it had incurred 687 million euros in restructuring costs to retool its global production network of factories producing Mercedes-Benz passenger cars.

It will stop building a variant of the compact A-Class at its factory in Aguascalientes, Mexico, to concentrate on a newer, higher-margin sport utility vehicle model, the GLB.

Furthermore, Mercedes-Benz will stop making the C-Class sedan in Tuscaloosa, leaving the plant in Alabama making only SUVs, the carmaker said.

Daimler had already announced it was preparing its factory in Hambach, France, for a sale.

“Our systematic efforts to lower the breakeven of the company by reducing costs and adjusting capacity will need to continue,” Chief Executive Officer Ola Kaellenius said.