How borders are drawn and enforced has far-reaching consequences, whether we live on either side of them or halfway across the world.

How does a tribe live with the foreigner? Treat them too badly, and they won’t come. Treat them too well, and what is the privilege of being a citizen?

Europe has been doing a bit more than trying to tackle this dilemma; it has been running the world’s biggest open-air social-science experiment for the past two decades. In 1993, as a culmination of attempts to forge a united Europe after millennia of war, the EU not only gave birth to itself but it also quietly created—without much discussion of what it would mean—the entirely new concept of European citizenship.

Under the Maastricht Treaty, European citizenship exists “over and above national citizenship. Every citizen who is a national of a member state is also a citizen of the union.” Not everyone in the EU realizes this, but it is true. Citizenship of the EU confers a series of rights, including the unprecedented ability to live and work anywhere in the EU indefinitely. With that comes legal parity with national citizens on everything, bar the right to vote in general elections.

That means there have been two types of foreigner in EU member states—the European and the non-European.

“I don’t watch English TV because I’m not English.”

What’s more, the European immigrant doesn’t think of himself as an immigrant. He thinks of himself as a European—equal with the local citizens. This can lead to some very strange moments. In the aftermath of Britain’s vote to leave the European Union, the Labour MP Stella Creasy recalled a moment during the campaigning in her London constituency:

Walthamstow has always been a place that’s proud of its diversity, and I watched a Somali woman racially abusing a Hungarian woman, shouting at her that her daughter couldn’t get a job so that she should go back to the country where she came from.

In that story, everyone was seeing different things. The native British MP saw two foreigners, fighting. The Somali saw her years of sacrifice to make her daughter British being destroyed by a foreigner. And the Hungarian lady, in all possibility, saw herself as a European in Europe, being abused by a foreigner.

Most Europeans living in Britain probably thought they were in a country full of people who saw themselves as Europeans, too. The Brexit vote revealed that this wasn’t the case at all. This has profound implications not just for Britain, and not just the European project, but for everyone who wonders what citizenship means in a world full of tribes living among each other.

My telecoms engineer, the philosopher

Immigrants who do not think of themselves as such don’t really exist in history, because you usually need permission to be in someone else’s country. Before 1708, when Britain passed the Foreign Protestants Naturalization Act (pdf)—to give asylum to French Huguenots fleeing Catholic persecution—a foreigner could become a British citizen only through a private act of Parliament or by petitioning the king. (The concept of “Britishness” was itself fairly new—the union with Scotland had only occurred two years earlier.)

Tate/Creative Commons The invasion of Britain by the Romans, as depicted by Richard Corbould between 1757-1831.

The new act (before it was repealed in 1711) allowed, for the first time, a legal means of acquiring the same rights as a natural-born person. The reasons given for this unprecedented move were “that the increase of people is a means of advancing the wealth and strength of a nation.” The economic imperatives of allowing naturalization haven’t changed much in 300 years.

After the EU came into being in 1993, the levels of net immigration to the UK tripled in 10 years—from 75,400 in 1995 to 223,000 in 2004, according to Will Somerville’s Immigration under New Labour. Most of that was due to Tony Blair’s New Labour government (1997-2007) and its open-door policy for skilled immigrants. However, that wasn’t just because of the Maastricht citizens from Europe; the number of work permits for non-EU immigrants also tripled.

The biggest change came in 2004, when the UK became one of only three EU member states not to put restrictions on the eight eastern European countries that joined the EU that year. The government predicted only up to 13,000 eastern Europeans a year would come to the UK. Almost 580,000 came in just two years—around two-thirds of them from Poland, according to Somerville.

“After 2004 occurred the biggest influx of immigration in English history, causing the fastest increase in population ever recorded,” the historian Robert Tombs has noted.

Even now, the UK chooses to let in more people from outside of Europe than come from within the bloc. Unlike the European migrant, though, they generally come via a work permit, which bestows only the right to live in the UK while they have a job. It does not allow them access to welfare and there is no right of abode if they lose their job. To acquire most of those rights, they have to undertake a process of naturalization. That requires having worked in the UK for a certain number of years and, since 2005, passing a citizenship test (try your luck here), and an English-language test (English is no longer the first language for the majority of pupils at one in nine schools in England), and attending a ceremony.

None of this applies to European citizens. They can stay as long as they want in Britain and take as much or as little as they need; they can work without ever having to learn English (paywall). Their families can come too—with or without jobs. They can seek jobless benefits after three months. They can enter and leave freely at the border; no humiliating visa applications and border checks for them.

There are 2.3 million EU workers in Britain—and more than a million of those are from Eastern Europe. Poles now outnumber Indians as the biggest immigrant group. But their circumstances are very different. Indians and Pakistanis have accounted for the largest numbers of applications for naturalization in almost every year from 1998 to 2015, according to Britain’s Home Office. Applications for citizenship from all the countries in Europe averaged less than 20,000 a year for the decade to 2010 (download, see table cz.06).

An engineer recently came to fix my broadband in London. He asked if I had the company’s TV package. I didn’t, and neither did he. “When I come home, I have my own dish—Polish TV,” he told me. “I don’t watch English TV because I’m not English.”

Reuters/John Stillwell Nadiya meets the queen.

You can’t argue with that. He is a citizen of Poland—and Europe. He can live anywhere in the (for now) 28 nations of Europe. Why should he try to become English and watch “English TV,” when he has his own language and culture? That’s not part of the deal. The EU has conferred on Europeans the rights of citizenship without any of the obligations.

The benefits of being European British

So what is the point of what has been going on for hundreds of years—migration through naturalization? It involves not just legal assimilation, which is important, but also a more nebulous type of social and cultural integration—an old-fashioned commitment to becoming part of this tribe. From the Huguenots onwards, Britain has a long history of accepting immigrant groups and absorbing them into British life.

When it works—though it usually takes several generations to get to a Benjamin Disraeli or a Zadie Smith—it works very well. Nadiya Hussain is the child of Bangladeshi immigrants, who came to Britain in the 1960s and set up a takeaway restaurant. She wears a hijab and has had an arranged marriage. She is also the country’s second-most famous Muslim (after Zayn Malik) by virtue of winning a TV baking contest watched by more than 10 million people a week. You can’t get any more British than that.

When asked about the occasional racist abuse she receives, Hussain recently replied:

I love being British and I love living here and this is my home and it always will be. Regardless of all the other things that define me, this is my home. And I want my kids to be proud of that, and I don’t want my kids to grow up with a chip on their shoulder.

Even what it means to be “British,” despite all the steps taken since 1708, is still a work in progress. How then could we expect to all become “European” so quickly? This is Europe’s citizenship problem: There is European citizenship, but not European identity. The EU has spent all its energy focusing on the economic benefits of internal migration without trying to cultivate a feeling of belonging. And so, you get things like Brexit.

In the aftermath of the referendum, in a weird irony, Europeans and non-Europeans in Britain have been brought back to parity. They may all need work permits to stay in the UK in the future.

And with fears rising across the world that Brexit may, in fact, only be the first step in a long, sustained backlash against globalization, many people across across Europe are applying for passports for them and their children in the countries where they live. What they are discovering that naturalization may, in fact, be the solution (link in French) to their post-Brexit woes.

So, really, what does being European mean? Not as much as people thought it did.

Many angry Europeans living in London suddenly understood the worthlessness of their citizenship during the Brexit campaign when, despite having lived in the country for decades, they weren’t allowed to vote in the referendum. Always a foreigner, even at home.

What Europeans have is really much closer to a kind of second-class status that dates back to Ancient Rome. After beating back a revolt in 338 BC, Rome granted the residents of neighboring towns in Latium and Campania something that may sound familiar: citizenship without the vote (civitas sine suffragio), or “Latin rights.” Mary Beard, in her history of Rome, SPQR, called it:

…a package of rights believed to have been shared since time immemorial by the Latin towns, later formally defined as intermarriage with Romans, mutual rights to make contracts, free movement, and so on. It was a halfway house between having full citizenship and being a foreigner, or a hostis.

Those Latin rights withered and citizenship became standard as Rome conquered all. You earned citizenship for serving Rome in some way: in the army, for instance, or as a local official, and slaves could get it, too, after they were freed. But this was the result of Rome becoming an empire—and a dictatorship. Perhaps there’s a lesson there for the EU—often accused of being the new Rome by Brexiteers—on just how much it would need to centralize authority to create genuine European citizenship.

Still, it was the Roman Empire that first created the idea of free movement across Europe. The empire was a place in which “people could, as never before on this scale, make their homes, their fortunes, or their graves thousands of miles from where they were born,” Beard writes.

Reuters/Toby Melville What’s left of Hadrian’s wall.

One such grave—for anyone who thinks globalization is a new phenomenon—is for a worker named Barates, who found himself in England, 4,000 miles (6,400 km) away from his home in Palmyra, Syria. His wife, Regina, was born in North London. Their graves are in the north of England near the site of what is left of Hadrian’s Wall, built in the 120s AD to separate Roman Britain from Scotland.

Which shows, if nothing else, that Britain has been both welcoming foreigners and building walls to keep to them out for an awfully long time.