Just days after the results of Brexit, Britain’s vote to leave the EU, were announced, we’ve already begun to see some disturbing reports from Britain. Troubling stories about xenophobic incidents have been popping up across the country:

This evening my daughter left work in Birmingham and saw group of lads corner a Muslim girl shouting "Get out, we voted leave". Awful times — Heaven Crawley (@heavencrawley) June 24, 2016

My home town of Newcastle. This afternoon. I feel like I am back in the 1980s. pic.twitter.com/8THD1xsn1N — David Olusoga (@DavidOlusoga) June 25, 2016

This isn’t surprising. The pro-Leave camp claimed that Britain needed to quit the EU to close its borders to more EU migrants, that the country had reached a "breaking point," and that it needed to shut its doors. Pre- and post-election polling suggests that this was the pro-Leave argument that most resonated with British citizens, and was in large part responsible for Leave’s victory.

Now some pundits are suggesting that the real lesson of Brexit is that ordinary Britons are bearing an unacceptable economic cost from immigration, and that elites should heed that lesson and think about restricting immigration to other Western countries to prevent a similar populist backlash.

There’s just one problem: This narrative isn’t actually true. Data shows that Britain wasn’t suffering harmful economic effects from too many new migrants.

What Britain was suffering from too much of, however, was xenophobia — fear and hatred of immigrants. Bigotry on the basis of national origin.

That’s not something you give into and close the borders. It’s something you fight.

British xenophobia is not rational

Immigration has surged in the UK in recent years. The number of foreign-born people living in the UK has gone from 2.3 million in 1993 (when Britain joined the EU) to 8.2 million in 2014. This is a new thing for the UK, as you can see on the below chart:

The surge was a result (in part but not in whole) of EU rules allowing citizens of EU countries to move and work freely in any other EU member country.

Pro-Leave campaigners, and sympathetic observers in the media, argued that this produced a reasonable skepticism of immigration’s effect on the economy — and Brexit was the result.

"The force that turned Britain away from the European Union was the greatest mass migration since perhaps the Anglo-Saxon invasion," Atlantic editor David Frum writes. "Migration stresses schools, hospitals, and above all, housing."

Yet there’s a problem with that theory: British hostility to immigrants long proceeds the recent spate of mass immigration.

Take a look at this chart, from University of Oxford’s Scott Blinder. Blinder put together historical data on one polling question — the percent of Brits saying there were too many immigrants in their country. It turns people believed this for decades before mass migration even began:

Brits believed there were "too many immigrants" even when there were too few to have appreciable effects on the British economy. If Britain’s backlash to immigration was really about immigrants taking their jobs, then you’d expect hostility about immigration to be correlated to the actual level of immigration. But it’s not.

That’s not the only reason to believe Brexit was about xenophobia.

Torsten Bell, director of the UK economic think tank Resolution Foundation, set out to test the hypothesis that "areas hardest hit by the financial crisis, or those where migration is said to have held down wages, voted heavily to leave."

In other words, he tested the exact argument the pro-Leave camp is making: that people who voted to leave made a rational decision based on the real economic effects they’ve suffered from the rise in immigration. If that were the case, you’d expect places that have gotten poorer in the past decade (when mass migration took off) would have been the places that voted most heavily to leave the EU.

But that’s not what Bell found. In fact, he found no correlation at all between areas where wages have fallen since 2002 and the share of votes for Leave in the referendum:

"Some areas with big pay boosts voted to leave (such as Christchurch in Dorset)," Bell writes. "Some that have done very badly out of the last decade and a half still voted to stay in the EU (such as Rushcliffe in Nottinghamshire)."

Another point. Support for staying in the EU was concentrated among the UK’s young, whose wages were hurt most by the 2008 recession. Support for leave was concentrated among older Britons, who had less reason to fear wage competition from immigrants.

So there are lots of reasons to be skeptical that British voters’ concerns about immigration are a rational response to the effect immigration is having on the economy. Instead, it seems, British opposition to immigration stems from a long-lasting, deep-seated hostility towards new people coming into their country.

The word for that is xenophobia.

Immigrants didn’t hurt native-born Britons

The key assumption of the "rational concern" thesis is that immigrants are actually hurting the British economy. It only makes sense to see hostility to immigration as rational if immigrants are actually harming native-born Brits.

But this isn’t the case. Take Frum’s core claim — that immigration was ruining the British housing market. "The median house price in London already amounts to 12 times the median local salary," Frum writes. "Rich migrants outbid British buyers for the best properties; poor migrants are willing to crowd more densely into a dwelling than British-born people are accustomed to tolerating."

The logic of Frum’s argument is directly contradictory. He seems to be arguing that rich migrants are raising British housing costs, while poor migrants are lowering it by living in higher-density housing.

But setting aside this weirdness, the truth is that migrants aren’t transforming British housing in any meaningful sense. Most of British housing demand is domestic; foreign born-residents only make up about 13 percent of Britain’s population. And while migrants may live in different kinds of housing early on, that changes quickly. "The longer they stay," a 2011 London School of Economics study finds, "the more their housing consumption resembles that of similar indigenous households."

If anything, migrants have a positive effect on the UK housing market — specifically, because they’re both capable of doing critical construction work and actually willing to do it. "The Chartered Institute of Building points out that any caps on immigration will harm house-building rates, as not enough British-born nationals are either trained or interested in construction careers, and migrants have been filling the gap," the Guardian’s Dawn Foster writes.

The debate over housing mirrors the broader debate over migration’s effect on Britons. Leave campaigners, for instance, frequently argued that migrants were taking British jobs. Nigel Farage, head of the far-right UK Independence Party, once infamously proposed a law that would legalize discrimination against foreign-born workers in favor of hiring out-of-work British citizens.

Yet when a 2016 study, also from the London School of Economics, analyzed this specific claim using new data, it found, conclusively, "that the areas of the UK with large increases in EU immigration did not suffer greater falls in the jobs and pay of UK-born workers."

What about wages? Is Britain being flooded by low-skill workers from EU countries, willing to work for low pay and thus undercutting native-born Brits?

The new LSE study looked at that as well. "There is also little effect of EU immigration on inequality through reducing the pay and jobs of less skilled UK workers," the LSE authors write. "Changes in wages and joblessness for less educated UK born workers show little correlation with changes in EU immigration."

This is consistent with international studies on the effect of migration on wages in other places. "Most of … the literature suggests that the effect on native workers' wages is neutral or positive," my colleague Dylan Matthews explains.

"The Mariel boatlift, when Cuba unexpectedly sent 125,000 people to Florida, did not hurt employment or wages among native workers in Miami at all. A huge spike in Russian immigration to Israel in the early 1990s appeared to give existing workers a nearly 9 percent raise."

Finally, Brexit supporters argue that migrants are taxing UK social services. EU migrants were coming to the UK to take advantage of its generous public benefits, they argued, and over-stretching the system. "EU migrants’ access to the UK’s welfare state has dominated debates about the EU membership," a paper by the Migration Observatory at the University of Oxford, notes.

That same Oxford paper actually examined some of the claims — and found little evidence that EU migrants were coming over to take advantage of British benefits.

"EU migrants are less likely to claim out-of-work benefits, such as Jobseekers’ Allowance and incapacity benefit, compared to their UK counterparts," the Oxford scholars write. "In February 2015, people who were EU nationals when they registered for a National Insurance Number made up 2.2% of the total [Department for Work and Pensions] working-age benefits caseload, but were about 6% of the working-age population."

The bottom line, then, is that there is no good evidence that immigration was doing serious harm to native-born Britons. British attitudes towards immigration once again appear untethered to a rational assessment of the costs and benefits of migration.

Brexit is xenophobia, and we should react as such

Over the past 20 years, the percentage of Britons ranking "immigration/race relations" as among the country’s most important issues has gone from near zero percent to about 45 percent. Today, 77 percent of Brits believe that immigration levels should be reduced.

The best explanation is that Britain’s xenophobia over immigration is being activated. They see immigrants around them, and they start looking for ways to prevent more from coming in. It’s not about assessing the harm immigrants are doing to Britain; it’s about being terrified that they’re changing the "character" of Britain to be more "foreign."

You can see this fear in the the language of anti-immigrant campaigners like Farage. Much of it is downright bigoted against immigrants of all kinds, from Muslims to Eastern Europeans.

Farage has called some Muslims a "fifth column living within our country, who hate us and want to kill us." He once warned Britain of a "Romanian crime wave" sweeping the nation. His party officially debuted this poster to warn of the dangers of letting in more migrants, which was actually reported to the police for resembling Nazi propaganda:

This is not the language of a rational immigration skeptic. It’s the language of a fearmonger.

The rhetoric became so heated that some native-born, nonwhite Britons are now worrying that xenophobia whipped up by Farage and others will end up targeting them.

"After an appalling referendum campaign, dominated by daily front-page scare stories regarding immigration, we’re wondering if people will again be questioning if we should be going back to our ‘own country,’" Joseph Harker, the Guardian’s deputy opinion editor (and a black man), writes. "It seems only a matter of time before the intolerance that has been unleashed, reinforced and normalised, looks for the old, easy targets of people who look different. People like me."

Its perhaps understandable why xenophobic rhetoric appealed to some Brexit supporters. Resolution’s Bell found that even though pro-Brexit voters weren't from places that had ​recently gotten poorer since the mass immigration wave, they were from places that had ​historically been poor — going back to the 1980s. These people have good reasons to be angry about the status quo. They’re looking for someone to blame, and immigrants are an easy scapegoat.

But the fact that their bigotry is comprehensible doesn’t make it any less bigoted. Nor does it excuse the politicians who catered to it — nay, encouraged it — over the course of the debate over Brexit.

Understanding this as bigotry matters. If the issue were that immigration hurt native-born populations, then it might make sense to talk about restricting immigration as a way of preventing this kind of destructive sentiment from rising to the fore again.

"Is it possible that leaders and elites had it all wrong?" Frum asks, rhetorically. "If they’re to save the open global economy, maybe they need to protect their populations better against globalization’s most unwelcome consequences — of which mass migration is the very least welcome of them all?"

But if the Brexit vote was rooted in xenophobia, rather than rational opposition to immigration, then the conclusion should be very different.

Civil rights prompted a racist backlash from Southerners, yet nobody seriously believes the 1964 Civil Rights Act or the 1965 Voting Rights Act were mistakes. You don’t give in to bigoted pressure to restrict people’s rights — in this case, the right for people to live where they want. You fight it.

That, not Frum’s kowtowing, should be the real response to the Brexit vote. British voters made an unjustifiable and irrational decision, grounded in fear of people who spoke different languages or whose skin was darker than theirs. The response shouldn’t be to restrict immigration further. It should be to figure out how better to make the case for the fundamental human right to migrate.