Successful emerging-market countries follow a similar pattern of development. They begin as poor countries with large numbers of people living in the countryside. The young begin moving toward cities, where they hope to earn higher wages. They arrive ready to work, and this sudden surge of inexpensive labour attracts manufacturers who own factories in countries where workers are better paid. Word of new jobs reaches rural areas, creating an even bigger wave of young people headed for the cities.
This story has played out hundreds of millions of times in China, India, and across Southeast Asia, sub-Saharan Africa, and Latin America.
The next stage of development begins as these once-poor workers demand higher wages and better working conditions. Consumer classes appear in countries that have never had them. Higher pay makes the country less attractive for foreign companies, but those with capable, reform-minded governments can adapt. New technologies - purchased, invented, or stolen - allow them more productivity from each worker and more sophisticated, higher-value-added goods and services that push wages still higher. A middle class is born.
But the virtuous circle that depends on good demographics, labour mobility, economic growth, and political reform is beginning to break down. Technological change in the workplace, even on a limited scale, will reduce the low-wage advantage that helps poor countries and poor people climb the ladder.
The increasing automation of the workplace, advances in machine learning, and the broad introduction into the economy of new forms of artificial intelligence will ensure that jobs of the future require ever higher levels of education and training. Those who can pay will get the education, and those with the knowledge and skill set will have opportunities for good-paying jobs. Those who lack these things face a dark future.
As difficult as this transition may be in the US and Europe, it will be much tougher on emerging countries. If automation reduces wages in developing countries, it may become impossible for workers to gain the education needed to succeed in a world where advanced AI generates a bigger share of economic growth. Lower growth means less government revenue - and, therefore, less money to spend on education and services, infrastructure, and all the other things that middle classes expect from government. The virtuous circle becomes a vicious circle.
It's too soon to know whether the tech revolution will kill more jobs than it creates. But as in the rich countries, we know the new jobs will be very different from the old ones, that education and training for these new forms of work will make new demands on workers, and that some people won't make the leap from the old world to the new.
Where do all those energetic, ambitious young people go? The youth bulge we see in many developing countries can move from economic advantage to political threat as their path out of poverty is blocked. If they never join the active workforce, they will never have access to the education and training needed to earn 21st century jobs, and they know their children will fare no better. Those able to keep their jobs may discover they must work for less pay and fewer (if any) benefits.
It's an open question where those who lose from this next wave of change will declare their political allegiance - or whether they will declare war on the entire system.
The result may be a full reversal of the world's most important story of the last 50 years: the wealth convergence between rich and poor countries. It is the wealthy countries that have access to the game-defining technologies, the education systems that prepare citizens to adapt to new economic and social realities, the resources to spend on retraining workers, and the strong social safety nets to cushion the blows inflicted by change.
That may become the biggest story of our time.
• Ian Bremmer is the president of Eurasia Group and author of the forthcoming book Us vs. Them: The Failure of Globalism.