Munich: BMW AG, a day after agreeing to recall diesel cars to shore up the beleaguered technology, flagged higher spending during the remainder of the year as the second-biggest luxury carmaker invests in a record number of new models and derivatives.

The company plans to introduce 40 new or overhauled autos through 2020, focusing on lucrative top-end vehicles like the new 8-Series sedan and next year’s full-size X7 sport utility vehicle. BMW, declaring it will retake the premium car market top spot in sales from Mercedes-Benz, said spending on new technology in electric mobility and self-driving cars would rise this year.

We “begin the second half of the year with cautious optimism," chief executive officer Harald Krueger said on Thursday in a statement. The Munich-based carmaker’s investments will continue rising this year “in connection with key technological and strategic projects on the one hand and the rollout of the largest model offensive in the history of the BMW group on the other."

While auto producers are shouldering increased costs, scrutiny of German manufacturers’ practices on meeting emissions regulation in diesel cars culminated in an unprecedented summit in Berlin on Wednesday. Government and auto-industry officials, including Krueger, agreed to recall more than 5 million newer diesel cars and offer incentives for customers to trade in and scrap older models to prevent cities from banning the vehicles. The fixes will be software patches, dodging expensive hardware changes. While BMW insists its engines comply with rules, the company has been caught up in turmoil that’s hurt automakers’ stocks in the past two weeks.

BMW shares rose 1.3% to €79.91 as of 9:04 a.m. in Frankfurt. That pared the stock’s decline this year to 10%, valuing the company at €51.9 billion ($61.6 billion).

Emissions elements

BMW, like Daimler AG’s Mercedes brand and Volkswagen AG’s Audi, needs to ensure diesel survives as a stopgap before the market shifts to electric cars. Because diesel burns about 20% more efficiently than gasoline, the fuel is key to meeting European Union carbon-dioxide rules that will tighten further from 2020. Still, diesel exhaust also includes nitrogen oxides, which induce smog, prompting municipalities across Europe to ready measures to keep out polluting cars.

Adding to the industry turbulence are allegations in a Spiegel magazine report that German carmakers colluded for decades on technology, including on diesel-emissions systems. BMW said last week that it’s undertaking “a comprehensive assessment" and reiterated that it doesn’t cheat on diesel emissions.

As German carmakers struggle with the backlash over bypassing emissions rules, BMW’s profit during the second quarter beat expectations, helped by the revamped 5-Series sedan. Earnings before interest and taxes rose to €2.93 billion from €2.73 billion a year earlier, the company said. That compares with the €2.82 billion average of five analyst estimates compiled by Bloomberg.

BMW stuck to a goal to slightly increase full-year deliveries and pretax profit, and raised its revenue outlook for the autos segment to “solid" from a previously expected “slight" gain. The second-quarter pretax figure jumped 9.2% to €3.06 billion.

“This solid result shows that BMW, despite the diesel discussion, is well on track operationally," said Marc-Rene Tonn, a Hamburg-based analyst at Warburg Research. “They’re doing their homework and are coming up with strong models. Bloomberg