Sales of higher-margin sports utility vehicles and cost cuts helped Volkswagen shrug off a 1 billion euro legal charge to meet first-quarter operating profit forecasts on Thursday, sending its shares 4.5% higher.

Earnings before interest and taxes (EBIT) fell to 3.9 billion euros ($4.4 billion) from 4.2 billion a year earlier but were in line with the 3.92 billion euros expected by analysts despite the extra legal charges.

Adjusted for one-off factors, EBIT rose by a forecast-beating 14%, or 0.6 billion euros, to 4.8 billion euros, at a time when other car makers and suppliers were cutting their outlook.

Luxury brands Porsche and Audi remain key profit contributors, making up around 40% of group EBIT.

“VW is defying the odds and growing earnings while others decline,” Bernstein Research analyst Max Warburton said in a note on Thursday.

By contrast, Daimler’s adjusted operating profit had fallen 30% in the first quarter, Metzler analyst Juergen Pieper said.

Ongoing supply bottlenecks caused by difficulties getting cars certified for stricter emissions tests, as well as economic weakness in China, South America and Russia, and legal issues pose risks to VW Group’s business, the carmaker said.