Volkswagen is cutting 30,000 jobs over the next three years as it tries to boost profits in the wake of a huge emissions scandal.

Europe's largest automaker said Friday the cuts were needed to reduce costs as it works to overhaul its plants in Germany.

The vast majority of the job cuts -- 23,000 -- will come in its home market. The company said reductions in Germany had been agreed with union leaders and will be achieved by voluntary redundancies, closing positions as they become vacant and early retirement.

The measures should boost profits by 3.7 billion euros ($3.9 billion) a year from 2020, and productivity at its German plants by 25%, the company said in a statement.

Volkswagen (VLKAY) employs more than 610,000 workers worldwide.

Related: Volkswagen chairman proved over emissions scandal

The automaker is facing tens of billions in fines and compensation payments after it was found to be cheating on emissions tests.

As part of the restructuring, it will also invest about 3.5 billion euros in areas such as electric cars, components and battery systems, creating 9,000 new positions in Germany.

-- Mark Thompson contributed to this article