Korea Advanced Institute of Science and Technology students work on a robot in the lab.

Few countries in the world are embracing automation like South Korea.

The government is spending hundreds of millions of dollars each year to help automate and upgrade its industries and last year teamed up with Samsung Electronics Co. to create a 100 billion won fund that would help 2,500 companies make the leap to “smart factories.”

That push comes because the country’s working-age population is already in decline. South Korea is aging at the fastest rate among members of the Organisation for Economic Cooperation and Development, meaning productivity growth is vital to maintaining competitiveness and rising living standards.

It helps explain why South Korea has already embraced robots, particularly in its manufacturing sector, where “robot density” ranks highest in the world, according to the International Federation of Robotics.

Even as automation gathers pace, the nation’s reliance on imports for core machines and software is heavy, according to the Korea Institute of S&T Evaluation and Planning. The Institute estimates South Korea falls about 20% to 30% behind more developed nations such as the U.S. and Japan in automation technology.

Accelerating investment in smart factories is aimed at closing that gap. Aiding the quest: South Korea’s lead in fifth-generation wireless networks—commonly referred to as 5G. These networks promise speeds dozens of times faster than earlier generations, allowing machines to communicate with each other in ways that were previously impossible.

And local firms are benefiting. Samsung SDS, which provides automation solutions for its affiliated electronics behemoth, has seen its revenue double since 2011. HyosungITX, which leads smart-factory efforts at manufacturing giant Hyosung Corp., has also doubled its revenue.

The other side of that coin though is job losses. The Drivers and Disrupters Report ranks Korea as one of the countries most exposed to risk from automation.

How South Korea Scores on The New Economy Forum Drivers and Disrupters Index Higher score indicates better performance High-income averages Low- and middle-income averages DisruptErs Drivers High-income average Low- & middle-income average DisruptErs Drivers High-income economies average Low- and middle-income economies average DisruptErs Drivers

The manufacturing sector has already been shedding jobs for years. Almost 3 million people, or 67% of workers in manufacturing, face “high risk” of getting laid off, according to a report last year from LG Economic Research Institute.

It’s not just factories being reshaped by the robot revolution. The services sector—which employs about 70% of the nation’s workers—is also being automated. One example: Lotteria, South Korea’s biggest hamburger chain, where more than half of its joints use digital kiosks to take orders.

Aware that low-skilled workers will face greater difficulties in getting hired, the government is trying to tackle the threat. One initiative: “learning factories” where about 50,000 people will develop skills to handle robots and automated machines by 2022.

With more robots on the way, that training can’t come soon enough. “There’s no way to meet productivity targets without automation,” said Jeong Jong-pil, a professor teaching factory automation at South Korea’s Sungkyunkwan University. “That’s why more and more robots are coming.”