Mercedes-Benz narrowly beat BMW AG for the title of world’s best-selling luxury-car brand in 2020, a year in which cracks started showing in German dominance of the all-important China market.

BMW said Tuesday worldwide deliveries for its namesake division fell 7.2 per cent to 2.03 million, coming within 136,000 units of Daimler AG’s main passenger-car line. While Mercedes outsold its archrival and topped the premium auto ranks for a fifth consecutive year, electric-vehicle companies led by Tesla Inc. made serious inroads in the world’s largest market.

Tesla, Nio Inc. and Li Auto Inc. emerged as forces to be reckoned with in China, where BMW, Mercedes and Volkswagen AG’s Audi have long controlled more than 60 per cent of the luxury segment. The market was a source of growth for the Germans last year, though they still gave up some of their share to the electric upstarts.

“The historically untouchable German brands have begun ceding market share to Tesla and other luxury EV specialists,” Alexander Potter, a Piper Sandler & Co. analyst, wrote in a report. He predicts the trend will only get worse for BMW, Mercedes and Audi. “Bottom line: whenever Tesla opens a store in a new city, the Germans lose share... and there’s still lots of headroom for opening new stores.”

The German carmakers are responding to the threat by rapidly expanding their electric offerings. Daimler will introduce the EQA compact this month, one of four purely battery-powered vehicles it’s launching in 2021. BMW will almost double the number of all-electric and plug-in hybrid models it offers to 25 by 2023.

While Mercedes beat BMW in overall vehicle sales, it lagged on electric and plug-ins, with the latter selling almost 193,000 last year. More than half of Mercedes’s roughly 160,000 deliveries came in the fourth quarter, helping the company meet Europe’s CO2 targets. Audi delivered more than 47,000 of its battery-powered e-tron SUVs.