BERLIN — BMW AG reported a higher earnings margin for its cars segment, with a rise to 12.1 percent in the first quarter from 8.9 percent a year earlier.

BMW benefited from continued stable pricing for both new and used cars, it said in a statement on Thursday.

The automaker attributed a drop in first-quarter earnings before tax to 5.1 billion euros ($5.65 billion) from 12.2 billion last year to the impact of last year’s full consolidation of its Chinese joint venture, BMW Brilliance Automotive.

The company kept its outlook unchanged in the face of ongoing high costs and rising competition.

“The geopolitical and macroeconomic situation remains unpredictable and tense. Inflation and interest rates in key markets are high. The same applies to material and commodity prices,” BMW Chief Financial Officer Nicolas Peter said in the statement.

Sales were down 1.9 percent in Europe and 6.6 percent in China, attributed to inflation and the after-effects of the coronavirus pandemic — but an upward trend was visible in March and April, BMW said.

The company continues to expect slight growth in Europe, robust sales in the US, and a stabilizing economy in China.

Premium automakers have proven to be more resilient in the face of slowing global demand, persistent inflation and higher raw-material costs. With supply chain bottlenecks easing, BMW, Mercedes, Volkswagen and others still have significant order backlogs to work down.

Like German rival Mercedes-Benz, BMW has shifted resources toward the development and marketing of its most expensive models to help finance the shift to electric vehicles.

The automaker sold almost a fifth more of its high-performance M-badged cars, while sales of its compact Mini brand vehicles declined. Its ultraluxury Rolls Royce cars also saw an increase in orders.