FRANKFURT, Germany - Volkswagen will cut 30,000 jobs in a wide-ranging restructuring of its namesake brand as it tries to recover from a scandal over cars rigged to cheat on diesel emissions tests.

The German company said Friday the job cuts are part of a long-term plan to improve profitability and shift resources and investment to electric-powered vehicles and digital services.

Company officials at a news conference at its headquarters in Wolfsburg said 23,000 of the job cuts will come in Germany and that the measures will save some 3.7 billion euros ($4 billion) a year from 2020.

Volkswagen CEO Matthias Mueller at the automaker’s headquarters in Wolfsburg, Germany on June 16, 2016. REUTERS

CEO Matthias Mueller said it was “the biggest reform package in the history of our core brand.” In addition to Volkswagen, the company also makes cars under other brands including Porsche, Audi, SEAT, Skoda and Lamborghini.

Get Breaking News Delivered to Your Inbox

The layoffs cap a difficult year for Volkswagen, which has been embroiled in an emissions-rigging scandal that damaged the company’s reputation and cost it billions.

In response, Volkswagen has agreed to pay $15 billion to U.S. authorities and owners of some 500,000 vehicles with software that turned off emissions controls. Around 11 million cars worldwide have the deceptive software.

The scandal has been a spur for the company to address longstanding problems such as high fixed costs at its manufacturing locations in Germany and excessively top-down management that many say created an environment that enabled the cheating.

Herbert Diess, head of the core Volkswagen brand, conceded that Volkswagen had let its costs rise and “lost ground in terms of productivity.” The changes, he said, would make the company “leaner and more efficient.”

As well as addressing Volkswagen’s longstanding cost issue, the cuts underscore the company’s status as key jobs provider in the state of Lower Saxony, which owns a stake in the company.

Volkswagen Group, with its multiple brands, has more than 600,000 employees worldwide but the cuts will mainly fall on its 120,000-strong German workforce. Job cuts are also foreseen in Brazil and Argentina.

Volkswagen sells roughly the same number of cars as Toyota and General Motors, around 10 million a year. But Toyota does it with 333,500 workers and GM with 202,000.

The company has said it aims to cut nonessential costs and investments and shift resources toward battery-powered cars and internet-based services such as car-sharing and ride-sharing. The company had been slower than some competitors to move toward electric cars but has shifted its view after the scandal underlined diesel’s limitations. Volkswagen now says it plans to introduce more than 30 electric-powered vehicles by 2025, and to sell 2 to 3 million of them a year.

To make the job cuts, the company has cut a deal with its powerful worker representatives. Under the terms of the deal, Volkswagen has agreed to keep much of the future investment in new technology in Germany and to rely on voluntary departures such as early retirement, with no firings.

Top employee representative Bernd Osterloh said “the next generation of electric vehicles will be made here in Germany, not abroad.”

Volkswagen’s package of measures received a cautious welcome in markets. The company’s share price was up 0.3 percent at 129.45 euros.