"There's no sector of the economy that's going to get a pass," says Martin Ford, who runs a software company and wrote "The Lights in the Tunnel," a book predicting widespread job losses. "It's everywhere."

The numbers startle even labor economists. In the United States, half the 7.5 million jobs lost during the Great Recession were in industries that pay middle-class wages, ranging from $38,000 to $68,000. But only 2 percent of the 3.5 million jobs gained since the recession ended in June 2009 are in midpay industries. Nearly 70 percent are in low-pay industries, 29 percent in industries that pay well.

In the 17 European countries that use the euro as their currency, the numbers are even worse. Almost 4.3 million low-pay jobs have been gained since mid-2009, but the loss of midpay jobs has never stopped. A total of 7.6 million disappeared from January 2008 through last June.

Experts warn that this "hollowing out" of the middle-class workforce is far from over. They predict the loss of millions more jobs as technology becomes even more sophisticated and reaches deeper into our lives. Maarten Goos, an economist at the University of Leuven in Belgium, says Europe could double its middle-class job losses.

Some occupations are beneficiaries of the march of technology, such as software engineers and app designers for smartphones and tablet computers. Overall, though, technology is eliminating far more jobs than it is creating.

To understand the impact technology is having on middle-class jobs in developed countries, the AP analyzed employment data from 20 countries; tracked changes in hiring by industry, pay and task; compared job losses and gains during recessions and expansions over the past four decades; and interviewed economists, technology experts, robot manufacturers, software developers, entrepreneurs and people in the labor force who ranged from CEOs to the unemployed.

If you liked this article you might like

What's Behind the Surge in Energy Stocks

Hillary Clinton Says Prosecuting Individuals is Key to Wall Street Reform