In a new study that is optimistic about automation yet stark in its appraisal of the challenge ahead, McKinsey says massive government intervention will be required to hold societies together against the ravages of labor disruption over the next 13 years. Up to 800 million people—including a third of the work force in the U.S. and Germany—will be made jobless by 2030, the study says.

The bottom line: The economy of most countries will eventually replace the lost jobs, the study says, but many of the unemployed will need considerable help to shift to new work, and salaries could continue to flatline. "It's a Marshall Plan size of task," Michael Chui, lead author of the McKinsey report, tells Axios.

In the eight-month study, the McKinsey Global Institute, the firm's think tank, found that almost half of those thrown out of work—375 million people, comprising 14% of the global work force—will have to find entirely new occupations, since their old one will either no longer exist or need far fewer workers. Chinese will have the highest such absolute numbers—100 million people changing occupations, or 12% of the country's 2030 work force.

I asked Chui what surprised him the most of the findings. "The degree of transition that needs to happen over time is a real eye opener," he said.

The details:

Up to 30% of the hours worked globally may be automated by 2030.

hours worked globally may be automated by 2030. The transition compares to the U.S. shift from a largely agricultural to an industrial-services economy in the early 1900s forward. But this time, it's not young people leaving farms, but mid-career workers who need new skills. "There are few precedents in which societies have successfully retrained such large numbers of people," the report says, and that is the key question: how do you retrain people in their 30s, 40s and 50s for entirely new professions?

the U.S. shift from a largely agricultural to an industrial-services economy in the early 1900s forward. But this time, it's not young people leaving farms, but mid-career workers who need new skills. "There are few precedents in which societies have successfully retrained such large numbers of people," the report says, and that is the key question: how do you retrain people in their 30s, 40s and 50s for entirely new professions? Just as they are now, wages may still not be sufficient for a middle-class standard of living. But "a healthy consumer class is essential for both economic growth and social stability," the report says. The U.S. should therefore consider income supplement programs, to establish a bottom-line standard of living.

may still not be sufficient for a middle-class standard of living. But "a healthy consumer class is essential for both economic growth and social stability," the report says. The U.S. should therefore consider income supplement programs, to establish a bottom-line standard of living. Whether the transition to a far more automated society goes smoothly rests almost entirely "on the choices we make," Chui said. For example, wages can be exacerbated or improved. Chui recommended "more investment in infrastructure, and that those workers be paid a middle wage."

a far more automated society goes smoothly rests almost entirely "on the choices we make," Chui said. For example, wages can be exacerbated or improved. Chui recommended "more investment in infrastructure, and that those workers be paid a middle wage." Do not attempt to slow the rollout of AI and robotization, the report urged, but instead accelerate it, because a slowdown "would curtail the contributions that these technologies make to business dynamism and economic growth."

Editor's Note: Get more stories like this by signing up for our weekly robotics, AI and labor newsletter, Future of Work.