Daimler, the parent company of Mercedes, announced a series of cost-cutting measures that includes axing at least 10,000 jobs by 2022 in a bid to free capital for the shift towards electric cars.

The German car maker said that it’s aiming to cut staff costs by around $1.54 billion (1.4 billion euros) worldwide, following an agreement with labor unions.

“Daimler will, among other things, use natural fluctuation to reduce jobs. In addition, the possibilities for part-time retirement will be expanded and a severance program will be offered in Germany in order to reduce jobs in the administration,” the company said in its statement.

Related: Mercedes To Start Deliveries Of The AMG One Hypercar In 2021

The details of this initial agreement with the labor unions will be finalized in the coming weeks, while Daimler will also reduce the number of management positions worldwide by 10 percent. The announcement comes days after Audi announced it will cup up to 9,500 jobs by 2025 for the same reasons.

Daimler, along with the other German manufacturers, ramps up the effort to reduce costs in order to fund the huge investments required for the development of electric vehicles and autonomous driving while dealing with weakening sales.

“The automotive industry is in the middle of the biggest transformation in its history,” Daimler added. The car maker has repeatedly cut its profit outlook over the past few months, partly in order to cover costs related to a diesel emissions investigation and also because of the slowing market. Last month, Daimler said that they expect their operating profit to be “significantly lower” than last year’s.

In addition to the job cuts, Daimler will also start offering shorter working weeks and reduce the use of temporary workers.