FRANKFURT — Daimler said a late-quarter recovery in demand spared the automaker from losing as much money as analysts were expecting.

The company reported a preliminary second-quarter loss of 1.68 billion euros ($1.9 billion) before interest and taxes in a statement Thursday.

Daimler said that this was an improvement on the consensus estimate for 2.1 billion euros ($2.4 billion), and that free cash flow and liquidity also held up better than expected.

Daimler and its peers were decimated by the coronavirus pandemic, with measures to contain the disease sending production plunging to levels last seen in the wake of World War II.

Although plants and showrooms have now largely reopened, business is returning unevenly, with car sales in Europe coming back more slowly than North America or China.

The results are “consistent with a generally improving commentary from German manufacturers in recent weeks,” Philippe Houchois, a Jefferies analyst said in a note.

Volkswagen Group said Wednesday that orders have been gradually ticking up in Germany but warned the recovery remains shaky and future developments are difficult to predict.

Analysts say German automakers are well positioned to weather the fallout from coronavirus pandemic because of their diversified global footprints.

Bouncing back

Mercedes-Benz deliveries in China, the brand’s largest market, climbed to a record in the second quarter, and retail sales of its cars edged higher in June.

To keep the momentum going, the company is preparing to roll out new iterations of its flagship S-Class sedan, a key profit driver that continues to out-sell rivals including BMW’s 7 Series.

The S Class will be flanked by an all-electric sibling, dubbed EQS, the first car to be based on a dedicated electric-car platform with a battery range of more than 435 miles.

CEO Ola Kallenius has said Mercedes plans to shore up its offerings especially in the lucrative segment of larger luxury vehicles.

No letting up

It remains to be seen whether demand is improving fast enough to make a meaningful difference in Daimler’s outlook for the full year. The world’s top seller of luxury cars and commercial vehicles has said it expects vehicle deliveries, revenue and profit to decline from 2019, when results were dragged down by legal woes and production miscues.

Kallenius, 51, said during Daimler’s annual general meeting last week the automaker must sharpen its cost-cutting efforts to shore up returns.

In reviewing its global manufacturing network to get rid of excess capacity, it may sell a factory in France and has already halted plans to expand a site in Hungary.

The company also might shed a small assembly facility in Brazil and is discussing options for plants in South Africa and Mexico, Handelsblatt reported.

Daimler’s personnel chief Wilfried Porth said this month the automaker must eliminate more than 15,000 jobs, a more drastic reduction than the company announced in November. Its sweeping restructuring plan mapped out last year was rendered insufficient by the virus crisis.