Were Trump voters motivated by racism or by economic anxiety? This was a running debate in the 2016 campaign that devolved into a kind of running gag. Prestigious newspapers ran long, soulful profiles of down-on-their-luck Trump supporters in Appalachia or the rural Midwest. Then the liberal wonkosphere would reply with clips of Trump supporters saying heinously racist things at a rally, as well as a little data showing they object to more non-white immigration.

My feeling has been that Trump voters were motivated by all of the above. Within the GOP, Trump's earliest supporters were far more likely than supporters of other candidates to have the cultural badges of hillbilly life: to live in trailers or in the poorest white counties. And Trump supporters are more likely to express hostility not just to continued immigration, but to existing immigrants and racial minorities as well.

But now, as the theater of nationalist backlash politics shifts back to Europe, we're beginning to see that the connection between economic hardship and nationalism is actually very close.

In France, Marine Le Pen's Front National is overwhelmingly a young person's party, and the groups that promote an unapologetic French ethno-nationalism, like Generation Identitaire, are likewise made up of youths. This has led to some facile commentary that the increased support for French nationalism must be very different from Brexit or Donald Trump.

This couldn't be more wrong. On the contrary, one very strong reason why young people may be willing to go nationalist in France is that the French economy is notoriously tough on the young.

The political class of France and most Western countries promised that economic globalization, political integration, and the free movement of people would bring wider prosperity. But that's not what happened.

Further integration with the EU and the globalized mainstream hasn't really improved France's sclerotic economy. The youth unemployment rate in France was roughly 14 percent in the mid-1980s, and it's gone up ever since. In 2016 it increased slightly from around 25 percent to 26 percent.

States and the political classes have shaped the composition of their own nationalist backlash movements. Post-1989 globalization in America was supposed to enrich everyone, but it inflicted economic pain in a concentrated way to certain regions and demographic groups. People there have responded by falling into despair, and then rallying to Trump. The same is true of young people in France, who have grown up seeing the same or worsening prospects as these political projects continue, enriching people at the very top of the social hierarchy, but doing nothing for them.

After a generation, the project of globalization is failing on its own terms. America's industrial middle class and France's youth were promised that they'd have better fortunes in the future. Political integration, global trade, and liberal immigration policies would make them wealthier and foster a spirit of peace. The result for them has been economic stagnation even as they get clearer and clearer looks at the lives of successful people through social media. Instead of a sense of peace, they have a sense of displacement and, in some cases, legitimate terror.

Motivated reasoning can also partly explain the dramatic upsurge in resentment toward racial minorities and recent immigrants. If the political policies that never enrich you are done in the name of new minorities, or for their perceived benefit, you have a strong incentive to believe those minorities to be undeserving, criminal, and dangerous.

The nationalist political backlash across the Western world cannot be defeated just by campaigning against it or calling it names. The global class has to put up or shut up. People whose lives really are getting better can reconcile themselves to the political orthodoxies of their day.

And so this nationalist backlash can only be defeated if the partisans of globalization can make good on their grandiose promises of widely shared prosperity. Until then, they are making their own enemies.