STUTTGART, Germany (Reuters) - Mercedes-Benz sales overtook BMW BMWG.DE last year for the first time in more than a decade, a feat achieved, ironically, only after parent company Daimler DAIGn.DE stopped chasing market share and focused on making stylish high-tech cars.

A view shows the logo of Mercedes-Benz on a car in Moscow, Russia, July 6, 2016. REUTERS/Maxim Zmeyev

On Monday, Bavaria-based BMW said it sold 2,003,359 cars in 2016, less than the 2,083,888 by Stuttgart-based Mercedes. BMW had outsold Mercedes every year since 2005.

The achievement is a coup for Daimler Chief Executive Dieter Zetsche, who struggled to revive the company following a messy divorce from mass-market brand Chrysler in 2007. Less than four years ago, Zetsche faced restive shareholders, worried Daimler was lagging BMW and Volkswagen's VOWG_p.DE Audi brand.

“We had some deficits, cost and quality problems. Design was not top-notch. And with Chrysler we were no longer a pure premium carmaker,” Zetsche told Reuters in an interview late in 2016 in his office at Daimler’s headquarters.

Zetsche has presided over a renaissance in the design and technology of Mercedes vehicles, refocused the company on technological excellence and autonomous driving instead of short-term sales goals, and adapted the entrepreneurial mindset of Silicon Valley to the traditionally risk averse culture of Stuttgart.

Daimler is also preparing for a new era when the auto industry’s business model moves beyond manufacturing and selling cars to luring customers interested in pay-per-minute transport solutions provided by self-driving cars.

At the company’s 125th anniversary in 2011 - a year when Audi sales overtook those of Mercedes, pushing it into third place - Zetsche forecast his improvements would make Mercedes the best-selling luxury carmaker by 2020.

“Since then we worked hard and today we are leading or among the leaders when it comes to innovation, quality, design and security,” Zetsche said.

Daimler traditionalists were shocked by the volume forecast, fearing that selling too many vehicles could dilute the exclusivity of their cars and reduce the appeal of the Mercedes brand in the long run.

But consumer electronics companies such as Apple AAPL.O had already proven the pull of their brands did not suffer with increased sales volumes.

Daniel Binns a managing director at branding agency Interbrand, said advances in technology have made a product’s scarcity less of a selling point.

“I’ve got it and you haven’t, is what used to make premium. Now it is much more about having a better quality experience. So much of what defines an experience to the current generation is about what the technology delivers. The autonomous vehicle is the pinnacle of that,” he said.

The overhaul of Mercedes began in earnest in May 2013 with the launch of a new flagship S-class. To burnish its credentials as a technology leader, Mercedes developed a prototype version which drove around 100 kilometers (62 miles) autonomously the same year.

Rather than designing a limousine which appealed mainly to rear seat passengers, the new S-Class featured large digital display screens on the dashboard, a deliberate attempt to appeal to a younger, driver-focused audience.

The same youthful design approach was used for the new C-Class and E-class designs, which are now the company’s big sellers.

To counter the threat from Audi, Zetsche appointed a young designer, Gorden Wagener, to head up Mercedes design. He introduced an elegant and sporty style to spruce up Stuttgart’s Teutonic limousines. Mercedes cars were also equipped with state-of-the-art digital display technology, luring smartphone savvy customers.

It was a change for Mercedes where engineers always believed they were producing the best cars in the world, but measured quality mainly using technical or engineering criteria, a strategy which often led to powerful cars with expensive and complex technical innovations.

Today, Mercedes-Benz follows its motto “the best or nothing” by thinking about whether customers would notice or benefit from a new technological innovation, and by benchmarking the brand against competitors, Zetsche said.

Mercedes also revived the Maybach brand, a marque targeting the ultra-luxury sector which the company had stopped making after the prior bespoke design failed to gain traction, leading the car to sell only 200 times in its final year of production.

Since Maybach’s latest revival in February 2015, Daimler has sold 15,000 cars.

“The rewards we are reaping today are the logical consequence of careful preparation,” Zetsche said.