As the Speaker of the UK’s House of Parliament invokes precedent from 1604 to try and bring order to chaotic Brexit process, it is a reminder that Britain’s history of co-operation with Europe is as long as it is complicated.

The 2016 referendum to end a four-decade long relationship with the European Union produced a seismic shift in British politics, plunging the country into a constitutional crisis and threatening it with economic self-harm. History, however, suggests that the referendum result was inevitable.

Since the end of the Second World War, the UK has only reluctantly taken part in the European project of greater continental integration. Britain’s ambitions and influence were often aimed elsewhere, first in the Empire, then in the Commonwealth, and later in the “special relationship” it cultivated with the US. The UK’s political system has long struggled to balance these ambitions with its inevitable ties to its nearest neighbors.

In 1999, Kevin O’Rourke, a professor of economic history at the University of Oxford, co-authored Globalization and History: The Evolution of a Nineteenth-Century Atlantic Economy. It explored how in the late 19th century there was a backlash against globalization, with European landowners imposing tariffs on “new world” food and Americans erecting barriers against European immigrants.

“It was a book about how if you ignore the distributional effects of globalization, the thing can go into reverse—politically,” he says. This is familiar today as populist and anti-establishment parties gain support, alongside socialist promises of greater economic protection. O’Rourke suggests that globalization can make people more dependent on markets, which makes then more vulnerable and less peaceful, as opposed to the traditional narrative that greater globalization makes almost everyone better off.

As an Irishman who lives in Dublin, works in England, and serves as a municipal councillor for a small village in the southeast of France, O’Rourke is in a good position to explain both the past and present state of European integration.

In A Short History of Brexit: From Brentry to Backstop, published earlier this year, O’Rourke offers a clear-eyed evaluation of the history of European integration—and the UK’s suspicion of it. “Brexit isn’t just about Britain, it’s about the Europe that Britain is Brexiting from,” he told Quartz. The conversation has been lightly edited and condensed for clarity.

Quartz: The book starts in 1846 because Jacob Rees-Mogg, a Brexit-supporting MP from the Conservative party, says prime minister Theresa May will end up like prime minister Robert Peel in 1846. Why?

O’Rourke: Peel splits the Conservative party in 1846 by moving Britain unilaterally to free trade. Because the Conservative party is traditionally the party of the landed class, of the aristocracy, they don’t have an interest in cheap food because their incomes as landlords depend on agricultural rents. Those are going to go down if you have cheap food. Peel carries some of the party with him when he repeals the Corn Laws but a lot of party doesn’t go with him. And so they split and then they were out of power essentially for the best part of 20 years.

This was a traumatic thing for the party. But the point is also that the party has a history of splitting over trade issues. They do it again in the 1880s, when there’s a Fair Trade League that says that Britain should only have free trade with people who treat it fairly.

David Fisher Kevin O’Rourke.

That sounds like Donald Trump’s trade policy.

Yes, exactly. It’s what you would expect to see in countries that have been dominant but are beginning to face competition. To be fair, the British were unilateral free traders then. Countries like Germany and America were protecting their industries. So the British did have something to be pissed off about.

And this issue continues into the 20th century. The Conservative party keeps dividing itself over free trade.

They do it again in 1903 with the creation of the Tariff Reform League. That’s about imperial preference, which is a system of trade policies that’s biased towards the Empire. Conservatives like the Empire, so that seems like a good idea, but to have tariffs that are better for the Empire than for the rest of the world, they have to be positive for the rest of the world. They had been zero. You have to build a wall around Britain just for the specific purpose of knocking holes in it.

At some deep level, trade policies are tough. If you’re going to have preferential trade policies, that’s not just about economics. It’s also about your identity, your place in the world. And that’s a difficult thing for these people to navigate.

This idea that the UK then was torn between the Commonwealth, its historical source of power and influence, and Europe, where its role was less dominant, is precisely the tension we’re seeing again today. So we’ve not overcome this in nearly 200 years?

A key moment in history for the UK is when the Europeans decide to go for customs union rather than a free trade area. Because if they’d gone for a free trade area, the British could have kept preferential trade relationships with the Commonwealth and they could have had this other preferential trade relationship with Europe. They wouldn’t have had to choose. But the minute the Europeans go for a customs union then they have to choose. And that’s very difficult for them.

Maybe it’s not even that surprising they tried to sabotage the thing initially. The Brits are coming to European integration with their own history that’s making them very skeptical and sometimes hostile. On the other hand, the Europeans are coming from the Second World War and they don’t want to do that again. That’s propelling European integration in this direction where there’s going to be a customs union. But in order to ensure there’s a level playing field, there needs to be supranational institutions and that, again, is a problem for the British who prefer informal decision making.

You write about something called Plan G, a plan the British came up with in 1956 to create a free trade agreement for industrial goods, avoiding a larger, broader customs union. They take it to the European Community, as the EU was then called, but they don’t go for it. It’s similar to what’s happening with Brexit negotiations, where the British come up with policies that don’t fit the rules of the EU.

It’s because you have all these drastic red lines. The UK ends up with a very clever solution for themselves and then forgets that there’s somebody on the other side of the table.

So Plan G fails, and then the UK develops the European Free Trade Association in 1960, which included Austria, Denmark, Norway, Portugal, Sweden, and Switzerland. This was a rival bloc to the European Economic Community, which had Belgium, France, Italy, Luxembourg, the Netherlands, and West Germany.

The EFTA still survives, but it’s much smaller. Back then, it probably justified British attitudes to themselves because they managed to set up an industrial free trade area very quickly with not much bureaucracy. So it was a successful enterprise. I think a lot of Brits would’ve felt vindicated when they saw how quickly it succeeded in its objectives. But it is also in some ways, according to the historians, a way of trying to get Plan G through the back door and get a European-wide free trade area. Britain eventually decides to stage a U-turn and request membership to the EEC in 1961.

What made the UK change its mind?

One of the reasons that people have said the UK want in is because of American pressure. Americans suffer discrimination when Europeans do preferential trade deals amongst themselves, whether it be free trade areas or customs unions. So EFTA is bad for them in that way, and so is the EEC, but at least the EEC promotes political integration. It turns out that the Americans are very keen on that.

This has been traditional American policy. They just fought two world wars because of Europeans fighting with each other.

Which makes Trump’s support of Brexit a detour?

He’s a real rupture with the past.

But, also, the French initially veto Britain’s request to join what eventually became the EU. They say no—twice. Why?

Because they worried that Britain is going to be a Trojan horse for America. That’s one argument. And then the other argument is a more economic one. The Europeans haven’t yet figured out how to finance the Common Agricultural Policy [a program of farm subsidies] and they’re worried that if the Brits got involved in that these negotiations it will become very difficult because the CAP is very costly for Britain. So, they think they better to get that nailed down and then have the Brits come in and present them with a fait accompli.

What impact do these vetoes have on British attitudes to Europe?

There’s a 10-year period, essentially, where the UK doesn’t know if it’s going to join the EEC or not. So there’s lots of scope for lots of people to decide that they don’t want to join. Hugh Gaitskell, then the leader of the Labour party, talks about joining as “the end of a thousand years of history.” There are conservatives who are worried about losing links with the empire. There are socialists who worry that it’s all a capitalist plot. All of those elements persist into the 1970s and give us the first referendum.

There are some similarities between the run-up to the 1975 referendum on EU membership and the 2016 one. Although, of course, there were opposite results—voters choosing to remain in 1974 and leave in 2016.

It was a much more decisive result in 1975. It was a clear majority two to one. Now, was David Cameron [the British prime minister from 2010 to 2016, who called the Brexit referendum] thinking about 1975 when he decided to do this? I don’t know. It would be an interesting thing to know about whether he was historically motivated or was he just convinced by his own persuasiveness?

Your book highlights an issue that was forgotten during the Brexit campaign—Ireland.

Brexit in a sense reveals what the EU is all about. Brexit is revealing to us that Europe is a political project and it is a peace project and it is about bringing countries closer together who have difficult pasts. It is really striking. Tim Shipman has this very good book about the campaign called All Out War and there’s not a single index entry for either Ireland or Northern Ireland. It’s a 700-page book. And that’s not a criticism of the book, because it’s accurate of the time.

I wonder why the British are so allergic to this notion that Europe is above all a political project and a peace project? One of the best examples of that proposition is the UK itself, because it’s hard to see how you would have had the Good Friday Agreement if Britain and Ireland hadn’t have been EU members jointly, because that completely normalized relationships between the two countries that had been very asymmetric and bitter.

Now, what we see is the potential for Anglo-Irish relations to really go in reverse.

How can this issue of the border between Northern Ireland and the Republic of Ireland be resolved?

It’s ultimately got to be a political solution.

These technological solutions so far have not been realistic. But you can see where they come from. One wing of the Conservative party wants frictionless trade with Europe and the other wing of the Conservative party wants regulatory independence above all. You have to keep them together and so you have to promise that you can have both, you can have your cake and eat it, which is pretty difficult. So then you need a magic solution. Technology is the magic solution. That’s its function. It’s there just as an argument to keep the Tory party together. It’s not a serious argument.

So, we are basically in this particularly precarious moment because of internal disagreement within the Conservative party? Because of Tory factions fighting about the nature of EU membership?

It’s one thing for infighting in one political party in the UK to lead to the UK leaving the EU. It would be another thing entirely for Tory party infighting to lead the EU to say we’ll forget about the integrity of the European single market we’ll forget about policing our external borders. And it’d be another thing for the whole world to say we will forget about the nondiscrimination laws at the heart of the World Trade Organization. There’s a limit to what the Tory party can expect the rest of the world to do for it.