First They Came for the Immigrants. Then They Came for the Robots.

The phrase “you ain’t seen nothin’ yet” has been used as the title of several pop songs and a French film. It could also aptly describe the future of politics across the globe as the twin specters of nationalism and populism intensify and people grapple with the social and economic impacts of increased automation and the spread of artificial intelligence.

In key respects, this future has already arrived. In 2016, there were already 309 installed industrial robots for every 10,000 manufacturing workers — a measurement known as robot density — in Germany, 223 in Sweden, and 189 in the United States. The use of robots had risen 7 percent in the United States, 5 percent in Sweden, and 3 percent in Germany in just one year. That may not sound like much, but at that rate, robot density would double in the United States in about a decade. And these numbers are only likely to grow because next-generation robots are already highly cost competitive. The average hourly cost of a manufacturing worker in Germany as of 2013 was $49, in France it was $43, and in the United States $36. The hourly cost of a collaborative robot — a machine that does not require skill to interact with — was $4, according to a recent study by Bain & Company.

That same Bain study estimates that advances in automation could displace up to 25 percent of the U.S. labor force over the next two decades. This would mean nearly 2.5 million Americans would have to find new work each year. By comparison, only 1.2 million Americans were displaced annually in the transition from agriculture to industry in the first part of the 20th century. Estimates for other countries vary widely, but all suggest significant displacement can be anticipated thanks to the rapid adoption of robotics and AI in both the manufacturing sector and, increasingly, the provision of services.

To say that publics are wary of these impending technological changes would be an understatement. In Europe, 70 percent of respondents to a 2015 Eurobarometer survey agreed that “robots steal people’s jobs.” This included 89 percent of Spanish, 75 percent of French, and 72 percent of Germans. In the United States, according to a recent Gallup report, 73 percent of those surveyed worried that artificial intelligence would eliminate more jobs than it created.

Societal unease at the prospect of rapid change is not new. Over the past several decades, globalization — and the ever-denser, ever-wider networks moving ever-larger volumes of information, money, goods, and people across national borders — has left sizable shares of the publics in industrial countries reeling from the pace of change, uncertain about their future and nostalgic for the past.

Three in 10 Europeans and roughly 4 in 10 Americans told the Pew Research Center in a recent survey that life was worse today than it was 50 years ago for people like them. As of 2007, 70 percent or more in Spain, the United Kingdom, Poland, France, Germany, and the United States already said their traditional way of life was getting lost. And significant portions of the publics in Europe and the United States — 49 percent of Americans, 45 percent of French, 44 percent of Italians — say their country’s involvement in the global economy is a bad thing because it lowers wages and costs jobs.

Popular reactions against globalization help explain the nationalist and populist currents in today’s politics. In contrast to widespread support in the past, only about one-third of U.S. Republicans today say trade agreements are a good thing for America, according to a Pew survey, echoing the oft-repeated sentiment of President Donald Trump. Those most critical of trade deals are white men over the age of 50, a demographic group quite likely to have lost manufacturing jobs because of globalization and who various polls show are among Trump’s strongest backers.

Similarly in Europe, those who have a favorable view of populist parties — such as the National Front in France, the Alternative for Germany party, the Party for Freedom in the Netherlands, and the Sweden Democrats — are much more likely than others to believe that life is worse today than 50 years ago. And they are also more likely to believe that involvement in the global economy is a bad thing.

Of course, global economic integration is not the only consequence of globalization. International migration, resulting in the growing diversity of Western societies, is another. In 1990, roughly 23 million people living in the United States were born in another country. By 2017, that number had more than doubled to nearly 50 million. Over the same time period, the number of foreign-born residents in Germany had doubled and more than doubled in the United Kingdom. In France, that total grew by roughly a third.

Reactions to these population changes have been stark in some cases. Nearly half (47 percent) of the U.S. public believes that immigration should be a top priority for the president and Congress, up from 40 percent in 2010. And 72 percent of Republicans favor substantially expanding the wall along the U.S. border with Mexico to deal with this issue, according to recent Pew surveys.

In Europe, a median of 34 percent of people across 10 European countries believe that an increasing number of people of many different races, ethnic groups, and nationalities make their country a worse place to live. Supporters of populist parties in France, Germany, Italy, and Sweden are much more likely than others in their societies to say such diversity is a bad thing.

Given the populist backlash against globalization, it is only a matter of time before voters begin to react to increased automation and the spread of AI. They may react mildly at first. A Pew poll found that while majorities thought robots and computers would replace fast food workers and insurance claims processors in their lifetime, only 30 percent of U.S. adults thought their own jobs were at risk. Rather than a reassuring finding, however, such attitudes could foreshadow a rude awakening for workers, voters, and politicians in the years ahead, if and when people find their own jobs are being taken by machines.

In the United States today, nearly 60 percent of Americans already think there should be limits on the number of jobs businesses can replace with machines. Support for such limitations is particularly strong among those with only a high school education or less (70 percent) and Democrats (60 percent). Moreover, 77 percent of Democrats — but only 38 percent of Republicans — support a universal basic income, a guaranteed annual sum of money sufficient to meet a person’s basic needs, as a way to help Americans who lose their jobs because of advances in AI. Among the less educated, there is clear support: Some 69 percent of Americans with high school diplomas or less back such a scheme.

Future demands for the protection of human workers will, of course, vary from country to country and have their own unique political characteristics. But the adverse populist response to globalization over the last few years is a sobering warning that the economic and social changes transforming the labor market in the United States and Europe may well provoke a political backlash. Governments would do well to better prepare their publics for the changes ahead. Otherwise, it may not be long before some populist politician promises voters what they say they want: governmental limits on job-replacing automation.

This article originally appeared in the July 2018 issue of Foreign Policy magazine.