BMW’s profit margins on cars fell in the third quarter, hit by spending on more engineering staff and new electric car technologies against a backdrop of stiffer price competition in the U.S. luxury car market.

BMW and its rivals are struggling to maintain profit levels amid heavy investment in new technology including electric and self-driving cars, cleaner diesel engines as well as new ride-hailing business models to rival Uber.

The Munich-based carmaker reiterated its full-year target of a slight increase in group pretax profit but warned that margins would remain under pressure due to continued investment.

“Costs generally rise towards the end of the year so we expect this to have a dampening effect on earnings,” Chief Financial Officer Friedrich Eichiner told analysts on a call on Friday to discuss BMW’s results.

“Capital expenditure will also be higher in the last three months of the year, mainly due to the start of production and ramp-up of the new BMW 5 Series,” Eichiner said, adding that research and development spending would remain high into 2017.

While sales of BMW, Mini, and Rolls-Royce cars rose 7.1 percent in the quarter ending in September, the return on sales at BMW’s core automotive division fell to 8.5 percent from 9.1 percent a year earlier.

By contrast, archrival Mercedes-Benz Cars’ third-quarter operating margin was 11.4 percent while Audi’s was 6.9 percent for the first nine months of the year.

BMW said the dip in automotive profits was mainly attributable to higher personnel expenses as staff numbers rose 3.6 percent, along with changes in the mix of vehicle models sold.

Customers are migrating to less profitable smaller sport utility vehicles (SUVs) while BMW’s popular 5-series is at the end of its lifecycle and competing with a brand new Mercedes-Benz E-class.

BMW said sales in the United States, a market where sales of highly profitable large sport utility vehicles has been strong, had fallen 3.6 percent in the quarter.

“Pricing remains a challenge in North America in particular,” Eichiner told analysts.

BMW Group’s Vision for Its Next 100 Years

The more competitive sales environment has already forced German premium auto maker Audi to cut its sales forecast for the year and to warn that its operating margin would remain below its 8 to 10 percent target range this year.

BMW said it plans to keep the return on sales at its automotive division between 8 and 10 percent, a goal it has achieved for the last 26 quarters in a row.

At a group level, BMW said third-quarter earnings before interest and taxes (EBIT) were 2.38 billion euros ($2.6 billion), in line with a 2.37 billion consensus forecast in a Reuters poll and little changed from 2.35 billion last year.

The group benefited from a profit boost from its financial services business and a gain from derivatives hedging.

“Operational performance on a group level came in as expected but for automotive below expectations,” DZ Bank analyst Michael Punzet said in a note on Friday.