(Bloomberg) — Stellantis NV swung to a profit in the second quarter on rising demand in North America for models such as the Ram 1500 pickup truck with a more powerful engine.

Most Read from Bloomberg

Net income in the period climbed to €293 million ($336 million), from a €1.87 billion loss a year earlier, Stellantis said Thursday. Adjusted operating earnings came in slightly below analyst estimates amid high raw-material costs and weak pricing in Europe, where competition from Chinese rivals is intensifying.

Chief Executive Officer Antonio Filosa plans to spend some €60 billion through 2030 on dozens of new models to help turn around Stellantis. The group wants to prioritize the Jeep, Ram, Peugeot and Fiat brands while improving quality. It’s also betting on partnerships with China’s Zhejiang Leapmotor Technology Co. and Dongfeng Motor Corp. to help fill up some of its underused plants in Europe.

The CEO is trying to rebuild Stellantis’ core North American business after years of losing market share. Sales and adjusted earnings improved there in the period, but profitability was impacted by higher recall costs. The company earlier this month named new leaders for its Jeep and Ram brands.

In Europe, where the group is partnering with China’s Leapmotor on sales, shipments increased 5% due to robust demand for smaller cars including the Fiat 500 and the Citroën C3 Aircross. Stellantis’ operating margin improved but remained below zero, with Stellantis citing negative net pricing and raw material inflation.

Companies including BYD Co. and Geely Automobile Holdings Ltd. are expanding in Europe, putting pressure on mass-market manufacturers like Stellantis and Volkswagen AG.

Filosa is meeting these challenges by trying to make the company leaner. The group targets €6 billion in annual savings by 2028 compared to last year’s level. Earlier this week, Stellantis agreed to sell its car-sharing business Free2move to a German private equity firm, part of its efforts to exit unprofitable businesses and refocus investments on core brands and regions.

Stellantis shares are still down 44% this year in Milan, the worst-performing stock in the Europe Stoxx 600 Index in the period.

Most Read from Bloomberg Businessweek