Volkswagen AG’s surprising move to dismiss its somewhat hostile chief executive officer was set in motion sometime a week ago when his support from the billionaire Porsche and Piech family began to crumble.

The Persistent support from the Porsche and Piech family that owns most of Volkswagen helped CEO Herbert Diess survive his frequent clashes with influential worker representatives. But when critical project failures united with worker discontent, the family decided it was time for him to leave the company.

In the end, Diess’s surprise sacking is a fierce reflection of the challenges faced by the great and prominent leaders of the corporate world trying to modernize for the digital age. Volkswagen’s unions hold considerable influence even by the standards of Germany, where worker representatives account for half the seats on the supervisory boards of the company. Their leaders and the state resist drastic, reasonable changes that compromise jobs.

While Diess excelled at setting a strategic direction for the company, his delivery ruffled many’s feathers, adding to that, the company’s execution has been patchy. The outsider from BMW AG in 2015 could not gather enough allies and consequently became increasingly isolated. Threats of cost cuts and delays in developing software for the vehicles of tomorrow ultimately cost him his position.

“The departure of CEO Herbert Diess should not come as a surprise, given how marginalized he had become in the last few months,” A Jefferies analyst, Philippe Houchois, wrote in a report. “The timing is unfortunate and presents another illustration of dysfunction at VW.”

Spokespeople for Volkswagen declined to comment on the events leading up to the former CEO’s dismissal.

Herbert Diess was in the US to help ensure progress in a market where Europe’s biggest carmaker has long lagged, while the idea of removing him from his position was gaining momentum back home.

While the top executive was away, some significant representatives of Volkswagen’s main stakeholders started contemplating who could replace Diess should the strains within the company worsen. There have been repeated outbursts, including late last year, when Diess warned that the company risked falling behind Tesla Inc. and wondered about significant job cuts. In December, VW revamped its management board, stripping Diess of some responsibilities while entrusting him with leading Cariad, the company’s software unit.

Since then, conflicts at Cariad have pushed back the scheduled rollout of important new models, including the electric Porsche Macan SUV. His effort to rally broader support to execute his 89-billion euro ($91 billion) electric-vehicle and software strategy started to fray support among Porsche and Piech family members.