The story of Donald Trump’s stunning upset victory, according to exit poll data, is very clear: He won the white working class by an unprecedented margin, and held on to a surprising majority of college-educated whites. That allowed him to flip heavily white areas of states like Wisconsin and Pennsylvania that had voted for Obama.

The big questions now are: Why this? And why now?

One answer you’ll hear is economic: that those white-working class voters were angry in the wake of the Great Recession and the ongoing job losses due to globalization, and were looking for someone to blame. This may end up being part of the general election story — we don’t have enough data to say for sure.

But preliminary data suggests it is hardly all of it. An analysis from USA Today’s Brad Heath found that Hillary Clinton got crushed in counties where unemployment had fallen in the late Obama years:

Clinton is getting crushed in the counties where unemployment has *improved* most since 2010. pic.twitter.com/qNJlvwSQDf — Brad Heath (@bradheath) November 9, 2016

There’s something deeper going on here. And to understand this part of the story, you need to look beyond American borders. It's tempting to think of Trump as something uniquely American, but the truth is that his rise is being repeated throughout the Western world, where far-right populists are rising in the polls. They’re not rising because of their economies. They’re gaining unprecedented strength because of their xenophobia.

In Hungary, the increasingly authoritarian prime minister, Viktor Orban, has started building a wall to keep out immigrants and holding migrants in detention camps where guards have been filmed flinging food at them as if they were zoo animals. In Italy, the anti-immigrant Northern League, led by a politician who has attacked the pope for calling for dialogue with Muslims, is polling at more than three times its 2013 level, making it the country’s third most popular party. And in Finland, the Finns Party — which wants to dramatically slash immigration numbers and keep out many non-Europeans — is part of the government. Its leader, Timo Soini, is the country’s foreign minister.

Those leaders were among the first to praise the president-elect. Marine Le Pen, who runs an increasingly popular French far-right party, tweeted in elation: “Congratulations to the new president of the United States Donald Trump and to the free American people!”

Politicians like Le Pen and Orban share Trump’s populist contempt for the traditional political elite. They share his authoritarian views on crime and justice. But most importantly, they share his deeply negative views of immigrants, his belief that Muslims are inherently dangerous, and his stated support for closing the borders to refugees and economic migrants alike.

These parties’ values are too similar, and their victories coming too quickly, for their success to be coincidental. Their platforms, a right-wing radicalism somewhere between traditional conservatism and the naked racism of the Nazis and Ku Klux Klan, have attracted widespread support in countries with wildly different cultures and histories.

A vast universe of academic research suggests the real sources of the far right's appeal on both sides of the Atlantic are anger over immigration and a toxic mix of racial and religious intolerance. That conclusion is supported by an extraordinary amount of social science, from statistical analyses that examine data on how hundreds of thousands of Europeans to books on how, when, and why ethnic conflicts erupt.

We cannot understand Donald Trump’s victory, then, without understanding this global wave of what CNN anchor Van Jones memorably summed up as a “white lash.”

The resentment of the privileged

Political scientist Roger Petersen has argued, persuasively, that ethnic conflict around the world is often driven by something he calls “resentment”: the feeling of injustice on the part of a privileged portion of society when it sees power slipping into the hands of a group that hadn't previously held it. Drawing on social psychology, he theorized that one of the underappreciated causes of ethnic violence was a change in the legal and political status of majority and minority ethnic groups.

In his book, Understanding Ethnic Violence, Petersen argues that his theory helps explain the causes of other cases of ethnic violence in Eastern Europe, including the carnage in the Balkans in the 1990s. Other scholars have since found that it could be used to understand communal violence elsewhere in the world.

A 2010 paper published in the journal World Politics tested Petersen’s theory, looking at 157 cases of ethnic violence in nations ranging from Chad to Lebanon. It found strong statistical correlations between a group’s decline in status and the likelihood that it turns to violence against another group.

What does any of this have to do with Donald Trump?

Petersen predicts that ethnic struggle should play out differently when governments are weak, as in the wake of a Nazi invasion, versus when they’re strong, as in modern France. In nations with strong and legitimate governments, the loss of status by a privileged group is extremely unlikely to produce large-scale ethnic slaughter.

But "resentment" on the part of the previously dominant group doesn’t just dissipate; it is simply channeled into another way of clinging to power and preventing another group from attaining it. Like, say, elections and government policies.

"Dominance," Petersen writes, "is sought by shaping the nature of the state rather than through violence."

While Petersen’s book focuses on Eastern Europe, his framework applies to all different kinds of countries. So when post–World War II Europe experienced a massive wave of immigration, in large part from nonwhite and Muslim countries, Petersen’s work would predict a major backlash. Ditto when the United States ended Jim Crow, allowing black people to participate as formal equals, and when it experienced a mass wave of Latino immigration.

What you saw in many of these countries was a very different kind of population moving in and occupying social roles that had previously been reserved for white Christians. This was the ultimate change in social hierarchy. Nonwhites, who had historically been Europe and America’s colonial subjects and slaves, were now becoming its citizens. They weren’t just moving in; they were changing its society.

The question wasn’t whether there would be a massive electoral backlash. It was when.

The rise of the European far right

For Jean-Marie Le Pen, arguably the father of Europe’s far-right political movement, the backlash began in earnest in 1984. His political party, the Front National (FN), won about 11 percent of the French national vote in the 1984 elections to the European Parliament. It was the first major electoral victory for a party of its kind.

Le Pen had founded the party 12 years earlier. It was a populist party, one that argued that ordinary people were being exploited by a corrupt class of cosmopolitan elites. They were also authoritarian, constantly warning of the dangers of crime and the need for a harsh state response.

But above all else, the FN was xenophobic. Its members believed the postwar wave of immigrants threatened the French nation itself; stopping more from coming in was the only thing that could save the country from being overrun. The party cleverly avoided labeling nonwhites “inferior,” but instead sold their xenophobia as a defense of “French culture” — rhetoric that functioned very similarly to Trump rhetoric about Latino crime.

"Immigration is the symbolic starting point for the debate of the future of the French nation," FN politician Jean-Yves Le Gallou once said.

The FN’s success spawned imitators. In 1986, Jörg Haider — a firebrand who once praised Hitler for having a "proper employment policy" — took over Austria’s Freedom Party (FPO), transforming it into a xenophobic party along the FN’s lines. In 1999, the FPO came in second in Austria’s parliamentary elections, joining a government led by the center-right People’s Party.

In 2001, a Dutch sociology professor named Pim Fortuyn launched a new political movement — oriented entirely around opposition to Muslim immigration. "I don't hate Islam," he once said. "I consider it a backward culture."

By 2002, Fortuyn’s new party, the Pim Fortuyn List, was second in the national polls. Fortuyn was assassinated by a far-left activist that year but was succeeded by another charismatic populist, Geert Wilders.

Wilders, who declared in July that "I don’t want more Muslims in the Netherlands and I am proud to say that," leads the third-largest bloc in the Dutch parliament. Wilders’s party, the ironically named Party for Freedom, is consistently leading the polls ahead of the March 2017 national elections.

There are many others examples. The British far-right party, the United Kingdom Independence Party, played a crucial role in fueling the Brexit vote. In France, meanwhile, Le Pen’s daughter Marine has shed many of her father’s most controversial statements — his denial of the Holocaust, for instance — and turned herself into the kinder, gentler face of the party he founded decades earlier. Recent polling shows her near the top in the 2017 presidential election.

The rise of these parties has been studied extensively — and the evidence is quite conclusive. These parties’ success was driven by fear of immigrants.

"What unites the radical right is their focus on immigration," Elisabeth Ivarsflaten, a professor at the University of Bergen in Norway who studies the far right, told me in a recent interview.

In a 2008 paper, she looked at data on vote shares for seven European far-right parties, to try to figure out why people voted for them. She found that a person’s support for restricting immigration was "close to a perfect predictor" of one’s likelihood of voting for a far-right party.

By contrast, people’s views on other political questions — like economics or trust in government — didn’t have nearly the same predictive value. You can see this in the following chart from her paper. The Y-axis is the probability of voting for a far-right party; the X-axis is the level of support for restrictive immigration policies, right-wing economic views, and the like. The difference between immigration policy preferences and the others is striking:

"This study therefore to a large extent settles the debate about which grievances unite all populist right parties," Ivarsflaten concluded. "The answer is the grievances arising from Europe’s ongoing immigration crisis."

Eight years later, after running tests on newer data for a forthcoming paper, Ivarsflaten believes the thesis still holds.

Crucially, the research also suggests that these people are driven by cultural grievances rather than economic ones — Petersen’s resentment theory, almost to a tee.

The most systematic effort to assess this, to date, comes from Harvard University’s Pippa Norris and the University of Michigan’s Ronald Inglehart. Norris and Inglehart looked at 12 years of European Social Survey data, surveying a whopping 294,000 respondents, to figure out the relationship between economic and cultural grievances and support for the European far right.

They found something startling: Earlier research suggesting the European far right draws support from globalization’s losers was simply wrong. Instead, it was from exactly the kind of people who voted for Donald Trump in the 2016 election.

"The strongest populist support," they write, "remains among the petty bourgeoisie — typically small proprietors like self-employed plumbers, or family owned small businesses, and mom-and-pop shopkeepers — not among the category of low-waged, unskilled manual workers."

Only one of the five economic variables they tested — employment status — correlated well with support for the populist right. That held true even when they controlled for variables like age, sex, ethnic identity, and minority status.

Then they set up an alternative model, one that tested whether five distinct cultural factors — like anti-immigrant attitudes and authoritarian values — would predict support for the far right. Every single one did.

In short: There was no good evidence that economic anxiety was driving cultural resentment. Economics played some contributing role, but it seems much more likely that the far-right backlash is about what the far-rightists say it’s about: immigration, race, and culture.

"[Populists’] greatest support is concentrated among the older generation, men, the religious, majority populations, and the less educated — sectors generally left behind by progressive tides of cultural value change," they write.

You can’t understand Trump’s win without understanding this global movement

Far-right leaders like Le Pen have every reason to be elated by Trump’s win. He ran on an Americanized version of the European far-right platform. He essentially turned the Republican Party into a vehicle for their style of populism, and used it to win a national election in the world’s most powerful country.

Like his European counterparts, Trump has eschewed overt discussion of racial superiority during his campaign. He claims to have "a great relationship with the blacks" and tweets things like, "I love Hispanics!" He also claims to be an American nationalist standing up against a corrupt elite in hoc to "the false song of globalism." One of his favorite descriptions of his worldview is "America First," a slogan coined by World War II–era isolationists and anti-Semites.

Protestations aside, the bigotry that runs through Trump’s rhetoric is pretty blatant.

Trump first became a major political figure as leader of the birther movement — the people who questioned whether Barack Obama was really a natural-born US citizen — in 2011, taking advantage of racial anxieties about a black president to turn himself into a GOP power broker. He has claimed that a Mexican-American judge shouldn’t hear a case involving him because of the judge’s Hispanic background, described life in black communities as an unending hellscape of crime and poverty, and implied that all Muslim immigrants were potential terrorists. He deployed classic anti-Semitic rhetoric, warning of dark international banking conspiracies rigging the system against ordinary Americans.

Data from the primary shows that this kind of rhetoric was absolutely critical to his appeal. Over the summer, Michael Tesler, a professor at the University of California Irvine, took a look at racial resentment scores among Republican primary voters in the past three GOP primaries. In 2008 and 2012, Tesler found, Republican voters who scored higher were less likely to vote for the eventual winner. The more racial bias you harbored, the less likely you were to vote for Mitt Romney or John McCain.

With Trump, the opposite was the case. The more a person saw black people as lazy and undeserving, the more likely they were to vote for the self-proclaimed billionaire.

Tesler found similar effects on measures of anti-Hispanic and anti-Muslim prejudice. This shows that Trump isn’t drawing support from the same type of Republicans who were previously picking the party’s winners. He’s mobilizing a new Republican coalition, one dominated by the voters whose political attitudes are driven by prejudice.

"The party’s growing conservatism on matters of race and ethnicity provided fertile ground for Trump’s racial and ethnic appeals to resonate in the primaries," Tesler wrote at the Washington Post in August. "So much so, in fact, that Donald Trump is the first Republican in modern times to win the party’s presidential nomination on anti-minority sentiments."

It’s too soon to say how much, precisely, this explains about Trump’s stunning general election performance.

But we do have enough evidence to say that white resentment played a major role in fueling his support, even among the general population. Because the GOP nominee fit the mold of the European far right, rather than a traditional Republican, he was uniquely positioned to take advantage of racial anxieties produced by eight years of a black president and decades of mass Latino immigration.

Philip Klinkner, a political scientist at New York’s Hamilton College, found that factors like economic pessimism and income were statistically insignificant to Trump’s support. Instead, his research found that the leading driver was party identification, followed closely by racial resentment.

"Moving from the least to the most resentful view of African Americans increases support for Trump by 44 points, those who think Obama is a Muslim (54 percent of all Republicans) are 24 points more favorable to Trump, and those who think the word ‘violent’ describes Muslims extremely well are about 13 points more pro-Trump than those who think it doesn’t describe them well at all," he writes.

He also set up an interaction variable between measures of economic pessimism and "racial resentment." This tests whether people who were pessimistic about the economy were more likely to be racially resentful and support Trump.

Klinkner found bupkis. People who were racially resentful were more likely to support Trump regardless of their views of the economy.

Someone who was not very economically pessimistic but quite racially resentful was as likely to support Trump as someone who was equally resentful but much more pessimistic about the economy. Economic stress didn’t appear to be "activating" racial resentment.

Another study — whose findings were published by three researchers at Slate — took a different stab at this. They surveyed 2000 white Americans and asked them to say whether they thought whites were “more evolved” than blacks — that is, further away from apes.

They found very little differences in rates of prejudice by income. But, they write, “there is one group of whites that stands out in the degree to which it holds dehumanizing views of black people: Trump supporters.” Fifty-two percent of strong Trump supporters, they found, thought African Americans were less evolved — about twice as high as the rates among strong Trump opponents.

“We detected substantial levels of dehumanization among Trump supporters through additional survey questions as well,” they continue:

27 percent of Trump supporters said the phrase “lacking self-restraint, like animals” describes black people well, compared with 8 percent of Trump opponents. Trump supporters were also substantially more likely than Trump opponents to say that the terms “savage” and “barbaric” describe black people well.

Again, we do not know for sure how much of Trump’s astonishing general election performance this explains. Whereas the data is ironclad about Trump’s primary victory — it was clearly about racial resentment — the general election has yet to be analyzed in the same depth. There could end up being a bigger role for economic variables than there was in the primary, though the data about the European far-right militates against it.

Regardless, given these results and the broader international far-right wave, it is impossible to deny that white resentment against cultural change played a significant role in Donald Trump’s shocking victory.

The United States just elected a candidate who has employed the most racially charged language we’ve heard as a nation since the civil rights movement. And it looks like he won not in spite of his racism but because of it.