Mercedes-Benz (MBGn.DE) posted a higher profit in the second quarter helped by tough cost cuts, pushing its ‌shares up on Tuesday, but intense Chinese competition dented the outlook for car sales and revenue.

The results were a rare respite for investors in the German automotive sector, which has been battered by mounting tariff costs and intensifying competition from Chinese rivals, prompting Volkswagen , Mercedes and BMW (BMWG.DE) to ​accelerate cuts.

Mercedes’ shares rose by as much as 5.9 per cent following the announcement, before paring gains to stand ​3.5 per cent higher at 1118 GMT.

“In an environment where some automakers are ringing alarm bells on ⁠their competitive positioning, Mercedes delivered a clear and confident message,” Morningstar analyst Rella Suskin said.

Mercedes confirmed profit guidance for ​its core car business and posted an above-forecast 4.0 per cent adjusted return on sales in the second quarter, comfortably within the ​3 per cent to 5 per cent range.

Rival BMW slashed its outlook in June as a downturn in the Chinese car market intensified pressure on sales.

CHINESE COMPETITORS NOW TARGETING EUROPE

Mercedes’ second-quarter operating profit rose 22 per cent to €1.5 billion ($1.7 billion) despite a 3 per cent revenue decline, helped by cuts to administrative and research & development ​spending, as well as strong earnings at its financial services and vans units.

It also benefited from a €131 million gain ​linked to the planned sale of its leasing subsidiary Athlon.

But the Stuttgart-based carmaker is far from safe. Having suffered heavy losses at the ‌hands of ⁠local manufacturers in the once-lucrative China market, those same Chinese competitors are now increasingly looking to export to Europe.

The full-year margin for the company’s car business is currently seen at the lower end of the forecast range, CFO Harald Wilhelm said, with higher sales in Europe for costlier to produce EVs expected to weigh on profit.

Second-quarter car sales slumped 30 per cent in ​China, the world’s largest auto ​market, prompting Mercedes to ⁠scrap forecasts of stable car sales and group revenue. It now expects a slight decline on both fronts compared to the previous year.

German factories are in the firing line of ​an intensified push for leaner production, the company said, declining to give further details ​as it talks ⁠with labour representatives.

At the same time, Mercedes is boosting its production presence in cheaper Eastern European countries such as Hungary, with the expansion of its Kecskemet plant, and Poland.

“We must continue to work flat out to reduce costs so that we can remain ⁠competitive ​on the prices of our products,” CEO Ola Kaellenius said.

As for Chinese ​entrants to Europe, he said their main target was currently volume markets rather than Mercedes’ premium segment.

“But that is not a reason to sit back ​and be relaxed.”