Volkswagen on Friday announced plans to significantly reduce its workforce over the coming years as it deals with its costly diesel emissions scandal and push into electric cars.

The cuts are expected to total 30,000, with 23,000 of these to be made in Germany. VW says the cuts are to be made in a “socially compatible way” and that no compulsory redundancies will be made. The automaker expects the reductions to come from natural turnover and partial early retirement.

Most of the cuts will come from plants where components for internal combustion engine cars are produced. Bernd Osterloh, who represents workers at VW, has previously warned that the switch to electric cars will cost jobs, as electric cars tend to have much fewer parts than combustion engines, and so don't require as many workers to assemble and install in cars.

Volkswagen I.D. electric car concept, 2016 Paris auto show

Volkswagen I.D. electric car concept, 2016 Paris auto show

But as these more traditional jobs are eliminated, VW says it expects to create 9,000 new positions in future-oriented areas, such as production of batteries, electric powertrains and possibly even electric energy storage. VW says most of its upcoming electric cars will be produced in Germany. For example, the plants in Wolfsburg and Zwickau will be responsible for the family of cars based on the MEB platform, previewed in the Budd-e and I.D. concepts.

In addition to the job cuts, VW will also eliminate low-selling models, scale back investments in non-future-oriented areas and reduce its motorsport participation.

VW hopes that with the workforce reduction and other efficiency programs mentioned, the company will realize a positive impact on earnings by as much as 3.7 billion euros (approximately $3.9 billion) per year by 2020.