Hyundai Motor Co. will spend 20 trillion won ($17 billion) over the next six years on new technology to help make the switch to electric and autonomous vehicles.

Announcing its strategic plan to 2025, the South Korean company pledged to spend almost half the new money on electrification. Autonomous driving will soak up 1.6 trillion won of the total, Hyundai said Wednesday.

The investment forms part of a surge in spending at Hyundai, which like rivals worldwide faces an expensive future of lower-emissions, battery-powered vehicles. Competitors such as Volkswagen AG have also pledged tens of billions of dollars in investments in electrification.

If successful, the plan should create a more profitable business with a global market share of 5% in 2025, up from 4% in 2018, according to Hyundai. Yet most traditional carmakers are heading in the same direction, and all-electric rivals such as Tesla Inc. have a technological head start. That suggests competitive pressures aren’t likely to subside in the next era.

German carmakers are set to invest $45 billion in electric vehicles over the next three years, while General Motors Co. is pushing ahead with a plan to sell 20 EV models by 2023.

Shares of Hyundai rose 0.4% at 11:49 a.m. in Seoul as the company said it should be more than three times as profitable by the end of the six-year plan.

Hyundai wants to widen its operating margin to 8% in 2025 — up from 2.5% last year — a level that would make the carmaker among the most profitable on the planet. BMW AG has a margin of 9.3% and Toyota Motor Corp. 8.2%, according to data compiled by Bloomberg, with most other global automakers in the 2%-6% range.

Global Sacrifice

The transformation will come at a price. Some 27.9 trillion won of costs, the equivalent of $23 billion, will be stripped out of the company in the next three years alone, Hyundai said.

That’s part of the sacrifice being made at automakers across the world as the industry tackles a tectonic shift in vehicle technology. At the same time, trade-war tariffs hang over decades-old supply chains that serve a dwindling market.

All told, carmakers are cutting more than 80,000 jobs in coming years, according to data compiled by Bloomberg News. The industry will produce 88.8 million cars and light trucks this year, an almost 6% drop from a year ago, according to researcher IHS Markit.