Ferdinand Piech, who helped turn Volkswagen into the world's biggest carmaker before resigning ahead of one of the most tumultuous periods in the company's history, has died.

Piech led the German automotive giant in various capacities for more than two decades. Volkswagen confirmed his passing Tuesday. He was 82 years old.

The grandson of legendary carmaker Ferdinand Porsche, Piech began his career at Audi and took over as CEO of Volkswagen in 1993. He became the company's chairman in 2002 and proceeded to turn it into a global automotive powerhouse, adding brands like Lamborghini and Bentley to the fold and reviving brands like Bugatti. Volkswagen also bought Porsche in 2012.

"Ferdinand Piech brought quality and perfection down to the last detail in the automotive industry, deeply anchoring it in the Volkswagen DNA," the company's current CEO Herbert Diess said in a statement. "I look with gratitude and great respect at his life's work."

Although Piech had a big role in making the German automaker what it is today, his exit from the company was an acrimonious one.

Piech stepped down as Volkswagen chairman in April 2015 after a failed attempt to oust CEO Martin Winterkorn, who had led the company for eight years. Volkswagen said Piech resigned because an environment of trust no longer existed within the company's board.

There was more trouble brewing. Just months after Piech's departure, Volkswagen admitted it had cheated on diesel emissions tests. Winterkorn resigned in September 2015.

Piech was never publicly implicated or charged in connection with the scandal.

Four years later, Volkswagen is still dealing with fallout from the diesel scandal, although it has managed to retain its crown as the world's top carmaker by sales as of 2018. A holding company run by members of the Porsche and Piech families still controls about 53% of the Volkswagen Group.

"The life's work of my brother goes above and beyond the companies he worked for," Hans Michel Piech, deputy chairman of the holding company Porsche SE, said in a statement. "He shaped the German car industry more than any other."