ONDON — Nearly four months have passed since I joined a small group of aides in former U.K. Prime Minister David Cameron’s cramped Downing Street office to review his resignation speech one final time. Half an hour later, the man who had led Britain for six years, and the Conservative Party for more than ten, stood in front of No. 10 Downing Street’s iconic door and assumed responsibility for losing the referendum in which the United Kingdom voted to leave the European Union.

Much has been written about the causes of Brexit, most of it frustratingly simplistic. As part of the prime minister’s team during both the negotiations with the EU and in the Brexit campaign, I had a frontline seat for many of the debate’s key developments, providing Cameron with advice during all-night meetings of the European Council and helping plot our strategy during the referendum campaign. I was even responsible for putting Cameron "on Tinder," as the British press put it, when I tried to reach younger voters through apps and sites like LadBible, Tinder, Uber and Badoo.

As tempting as it might be to attribute the U.K.’s decision to “Leave” to just one cause — frustration with immigration, the reluctance of EU leaders to offer a better deal, broad disaffection with globalization and the post-crash recovery — the truth is far more complex. Real life cannot be compressed into a zip file.

The main impression of the EU across the Continent was of an enterprise no longer delivering for Europeans.

In explaining the course of history, scholars like to look not only at immediate causes of an event, but the underlying trends that made it possible, if not inevitable. The assassination of Austrian Archduke Ferdinand in Sarajevo in 1914 may have sparked World War I, but the conflagration was the expression of longstanding geopolitical rivalries.

Perhaps because of my profession — I am more a policy wonk than media spinner — I believe that the underlying causes of the Brexit decision are the most significant. The twists and turns of the 12-week campaign are no doubt important and interesting, but most of the reasons that caused British voters to choose to leave the EU were the results of decisions made long before it began.

Europe's wrong turn

o explanation of the Brexit vote would be complete without an examination of the path the EU has recently taken. That was, after all, the subject of the referendum.

Over the last couple of years, the EU — an extraordinary project of continental peacemaking and economic liberalization — has become increasingly distant from voters. It has struggled with the contradictions laid bare by the euro crisis and come up against the limits of its attraction, in Turkey and on its border with Russia. The resulting impression is of a Continent lurching from crisis to crisis.

European leaders have been unwilling or incapable of reversing an institutional logic, in which the European Commission, egged on by the European Parliament, has increasingly interfered in the minutiae of daily life, even as the European Council — where the national leaders gather — has grown ever less powerful on anything that does not regard the eurozone. In the so-called trilogues — in which officials from the three major EU institutions meet to hash out directives — the Commission and the Parliament often steamroller the Council.

This trend reached its apotheosis with the application of the concept of Spitzenkandidaten for the position of European Commission president. According to this idea — not mentioned in the EU treaties and dreamt up by federalists like European Parliament President Martin Schulz — the president would be selected by the political group that won the most seats in the European parliamentary elections. What had traditionally been an appointment by Europe’s elected leaders and approved by Parliament became the choice, in large part, of a legislature seen in most European countries, quite rightly, as less legitimate than national institutions.

As a result of changes like this one, the main impression of the EU across the Continent was of an enterprise no longer delivering for Europeans. A survey of 10,000 Europeans across 10 countries by Pew Research earlier this year found that a majority of people felt unfavorably towards the EU in Greece (71 percent) and France (61 percent). The EU was seen more unfavorably in Spain (49 percent) than in the U.K. (48 percent). A popular cause Europe was not.

The reluctant Europhiles

n their own, the EU's failures need not have necessitated a vote to Leave. Despite these developments, there were strong arguments for staying in the EU. One could, on balance, decide that the good outweighed the bad, that the EU could be reformed, that the economic benefits of staying were not worth the political advantages of leaving. Or one could conclude that the positive benefits of European cooperation compared favorably to the risk that leaving would entail, not just for the U.K. but for the EU.

But that would require knowledge of the positive case for staying. And over many years, the British public were treated to nothing but the negative: story after story — many exaggerated, some invented, others all too true — of the EU's failings. Nobody in power spoke of the positive things Europe provided. There was no counter narrative, and there hadn’t been since the 1975 referendum to join the EU.

“What kind of bloody organization is this,” I remember him shouting.

The case that it was possible to be both independent and European was not made. Instead, a country that was naturally Euroskeptic, owing to its unique history both ancient and modern, was provided with just one side of the story: by Euroskeptic politicians like Nigel Farage and Dan Hannan, building the argument for Brexit from their pews in the European Parliament.

This is where our campaign to persuade voters to stay made its first major mistake. We did nothing to change the way Britons felt about the EU. Cameron is by instinct and professional experience a pragmatic Euroskeptic. He doesn't, as he said during the campaign, “love Brussels.”

One of his proudest achievements was pulling the Conservative Party out of the European People's Party, the main center-right grouping in the European Parliament. He initially saw the EU as an odd organization, one of many that the U.K. belonged to. Only slowly did he come to appreciate how important it had become to furthering the country’s goals in the world.

Even so, Cameron remained deeply skeptical about the way the EU operated, railing against the bloc’s inequities each time the European Commission threw up yet another headline-inducing policy. “What kind of bloody organization is this,” I remember him shouting when the U.K. was presented with a budget surcharge in 2014. When other European leaders proposed tackling the EU’s problems with the invariable prescriptions of “more Europe,” he would express bewilderment. “I want less Europe,” he said on several occasions.

Low on emotion

t the World Economic Forum in Davos in 2014, we penned a speech that gave vent to some of his frustrations: “Some in the European Commission seem to think that if they’re not producing new regulations they’re somehow not doing their job. And that removing existing regulations is somehow an act of self harm. While many in the European Parliament are tempted to gold-plate every piece of legislation." Had it not been for a last-minute intervention by the Foreign Office, we would have replaced the words "some" and "many" with "nearly everyone."

As became apparent during the campaign, Cameron did not want to make big, emotional arguments about Britain’s place in Europe. He was more comfortable making practical arguments about beef tariffs, the financial services passport or security cooperation. He was of course entirely right — Britons have traditionally been more convinced by the practical benefits of EU cooperation than by any emotional arguments.

As soon as he boarded his plane after a European summit, the prime minister's attention quickly shifted back to the domestic agenda, the latest parliamentary crisis or his packed ministerial box. In contrast to his image as a chillaxing leader, I never found him anything other than extraordinarily dedicated and extremely hardworking. Only when he had worked his way through his piles of notes would he don his red Dr. Dre headphones and catch up on sleep. But little positive was said about the EU between meetings, if anything was said at all.

The prime minister was also always wary of providing Euroskeptics with the opportunity to portray the Conservative Party as “banging on about Europe,” which he worried would alienate the ordinary, non-Tory voters whom the party needed to maintain power. Throughout Cameron’s time in office, challenges by Euroskeptic MPs created a state of high tension in No. 10, eating up a lot of time and energy. As we designed the legislative programs, for example, we had to weigh which provisions, however far removed from European affairs, could fall victim to their amendments.

As a result, the government never laid the ground for a pro-EU referendum, despite numerous examples of Britain’s ability to sway European policy. We put forward proposals that blazed the trail for a digital single market and the Energy Union that eventually became the EU's response to Russia's invasion of Crimea. And we rescued the Commission’s efforts to end mobile telephone roaming charges and pushed hard on improving airline safety. A Business Task Force with six prominent British businesspeople looked at all the EU regulations that should be scrapped — and managed to get two-thirds of their recommendations implemented within a year.

Given the U.K.’s historic European skepticism ... convincing the British electorate to Remain was bound to be an uphill battle.

But Cameron never turned these victories into high politics. He preferred highlighting achievements he knew would play well in the House of Commons — vetoing changes to the Lisbon Treaty, capping the EU's budget, ensuring that the U.K. would not be liable for eurozone bailouts. These invariably portrayed him as defending the U.K. from the EU's encroachments. We did not weave similar stories to show how EU membership helped the U.K.

When the European negotiations began in earnest, this quietist instinct was reinforced by explicit policy: we would not to be too positive about the EU. Other European leaders had to believe that we were willing to walk away. We were so on guard that some CEOs interpreted our caution as a request that they be similarly circumspect in their comments about Europe. With the Euroskeptic Right of the Conservative Party watching for confirmation that Cameron was less than serious about renegotiating, the reasons for staying silent or adopting an anti-European snarl outweighed the benefits of talking up European cooperation.

And so, when the referendum campaign kicked off in May 2016, and Cameron began to argue that the EU was important to the point of being almost indispensable, the electorate had no reason to believe him. After all, this was the man who said he needed to come to every European Council with his diplomatic revolver “locked and loaded,” a man who had repeatedly said that a future for the U.K. outside of the EU was perfectly imaginable.

Rise of the Euroskeptics

iven the U.K.’s historic European skepticism, 20 years of anti-EU rhetoric, the stresses of the euro crisis, and an epochal influx of refugees, convincing the British electorate to Remain was bound to be an uphill battle.

In Reykjavik at a meeting of Nordic and Baltic leaders, Denmark's Prime Minister Lars Løkke Rasmussen, who was in the midst of a referendum in his own country, showed Cameron the latest negative polls on his iPhone and remarked, “That is why referenda are a bad idea." Of the many EU-specific referenda that have been held in Europe over the last decade — in Denmark, Ireland, the Netherlands, France and Sweden — very few have produced the outcome hoped for by the governments that called them.

Two ill-timed developments, largely ignored by most post-referendum assessments, made the hill even steeper, helping to cement in the British public's mind a view that the EU was detrimental to the U.K.'s interests.

“You didn't need to have a Cluedo set to know someone has been clubbed with the lead piping in the library” — David Cameron

The first occurred in October 2014, when the European Commission levied a €2.1 billion (£1.7 billion) surcharge on the U.K., based on the country’s revised Gross National Income figures, which showed that its economy had been performing better than previously reported. The size of revisions — part of an annual statistical exercise handled by civil servants, not politicians — was unusually large, as the adjustment went back a decade or more.

In normal times this would have been a technical issue, but it surfaced when domestic political tensions were high. Cameron was caught unaware because of a Treasury slip-up, and he came under immediate pressure from some party backbenchers who urged him to take a hard line against the EU, in order to stave off challenges by the United Kingdom Independence Party.

The prime minister expressed his anger at the “appalling” way Britain had been treated by the European Commission. In a memorable remark, which showed his love of a great turn of phrase, especially one that worked in the House of Commons, he said “You didn't need to have a Cluedo set to know someone has been clubbed with the lead piping in the library.”

Eventually, Treasury officials found a technical way for Britain to pay less while following the rules. But the damage was done. Once again, the EU looked like it was riding roughshod over the U.K., with the prime minister's murderous metaphor providing a compelling image.

The second incident was the election of the former Luxembourg prime minister, Jean-Claude Juncker, as Commission president. The idea that the veteran European politico, a contemporary of former British Prime Minister John Major, could become president because he had been selected by the Parliament’s largest political group went against everything the British government believed the EU should be about — an economic arrangement ultimately governed by sovereign nation states.

To those of us working in No. 10, it seemed like folly, given the problems the EU was going through, to turn to someone so associated with the status quo. Juncker had resigned as Luxembourg's leader after a scandal. He was nearly 60 and had a reputation for enjoying champagne — at breakfast. Hardly the face of modern Europe.

Juncker’s appointment, we believed, was a blunder. And so Cameron thought it entirely natural to oppose his appointment — in partnership with German Chancellor Angela Merkel, who had made it clear that she also disliked the Spitzenkandidaten process and believed that Juncker was the wrong man for the job.

And so we started campaigning against his appointment — in the press and in private. Hours were spent on the phone to ambassadors in Berlin, Paris and Brussels, plotting our way ahead. Convinced we would win and misreading the political momentum, which had gathered behind the Spitzenkandidaten process, we effectively provided Juncker with his introduction to the British public. And the image we provided was not a flattering one. The British press even dredged into Juncker's family history, accusing his father of Nazi sympathies.

But, of course, we lost. Merkel was forced to drop her opposition in response to a brilliant campaign run by Juncker's chef de cabinet, Martin Selmayr. And the British electorate concluded, once again, that the EU was headed in the wrong direction and that the U.K. was destined to be outmaneuvered.

Awkward neighbors

ameron’s renegotiation of Britain’s membership in the EU should have been an opportunity for European leaders to show that the arrangement could be a win-win, even for a reluctant, skeptical country like the U.K. Unfortunately, it was not to be.

Some European leaders — most notably Danish Prime Minister Rasmussen, Hungarian Prime Minister Viktor Orbán and (albeit less enthusiastically) Dutch Prime Minister Mark Rutte — wanted to keep the U.K. inside the EU and saw the renegotiation as a useful spur for broader reforms.

But most saw the talks as a nuisance to be dealt with (Merkel), dangerous to Europe (Belgian Prime Minister Charles Michel), or damaging to their political careers (French President François Hollande). Italy's Matteo Renzi looked like an ally and could always be relied on to voice criticisms of the EU. But while he might rail against the consensus in Council meetings, he usually folded quickly and agreed to whatever text had been prepared the day before.

Officials in the newly elected Socialist government in Portugal, for example, refused to budge on any of our demands and were deeply skeptical of our motives — not least because of their mistrust of conservatives. I had to get the Social Democratic Austrian chancellor's adviser to vouch for me with the Portuguese prime minister's chief of staff, so that I could make our case directly. Even then, after the frostiest meeting I have ever attended, we only managed to move Lisbon because we persuaded the newly elected president, an avowed Anglophile, to raise our concerns with the prime minister at their very first meeting.

The Swedes were another difficult negotiating partner. As a Swedish diplomat remarked to me in private, give a Swedish politician a choice between his or her principles and what works and they will always choose the former. That approach was certainly on display when Cameron met Swedish Prime Minister Stefan Löfven, a former trade union leader, on the margins of an EU summit in Riga. Sweden, he assured us, wanted the U.K. to remain in the European bloc, but could under no circumstances agree to what we were asking.

In Brussels, most of the European Parliament saw it as a bid for special treatment and, eventually, as an attempt to violate the EU's basic freedoms. Juncker seemed to be seeking to give the U.K. a fair deal — as long as it didn't require too fundamental a reform (exactly where his all-powerful chief of staff Martin Selmayr came down was never made clear).

Sherpas versus leaders

he broader European establishment — Commission officials and the Europe “sherpas,” the senior advisers to national leaders — hated the process. They often worked to complicate the negotiations, even when their political masters seemed willing to accept a compromise. Rutte, for example, would consistently tell Cameron he agreed with him, only for his sherpa to totally disavow everything. Cameron would go back to Rutte, reaffirm his agreement — only for it to unravel again.

Meanwhile, the Austrian sherpa repeatedly told us that his government could not accept any U.K. demands. It was only after a series of one-on-one talks between Cameron and then Austrian Chancellor Werner Faymann that we were assured we could safely ignore anything the sherpa told us.

Given this level of obstruction, what Cameron achieved is nothing short of remarkable. As Chancellor of the Exchequer George Osborne told him, he had started "a fight in a room by yourself" — and got the ball rolling from a standing start.

When commentators in the U.K. described the negotiation as a charade, we in No. 10 would laugh wearily.

Cameron was tireless; he visited every EU country and spoke to every leader several times. Foreign Secretary Philip Hammond and Europe Minister David Lidington worked with their counterparts, and former Prime Ministers John Major and Tony Blair were brought in to help.

In support of these high-level efforts, we designed a diplomatic campaign for every European country unlike anything the U.K. has conducted since the run-up to the Iraq invasion. Each British ambassador was tasked with taking the argument for reform into the public realm and putting forward the key points in private to the most important decision-makers.

We looked for what we could offer our allies — a visit here, an offer of cooperation there. If senior British business leaders visited Merkel, we made sure they were briefed to push the reforms. We put more effort into the Milan Expo than anyone in Whitehall had anticipated, largely because it was a priority for the Italian government. And we used high-level gatherings, like the NATO summit in Wales, not only to lobby European leaders but also to illustrate what the U.K. offered the EU.

When commentators in the U.K. described the negotiation as a charade, we in No. 10 would laugh wearily. It wasn't staged and easy. It was hard. And despite our efforts, the negotiations failed. Europe’s leaders refused to break with the — in my view, erroneous and ahistorical — consensus around the freedom of movement of people.

The 'I' word

ronically, when Cameron launched his effort, laying out his demands in the so-called Bloomberg speech in 2013, this was not an issue. Indeed, he did not mention anything about immigration. In late 2013, a Foreign Office colleague and I wrote the first blueprint of what the European negotiations could entail. We ranked every option across every policy — from European defense to the Common Agricultural Policy and the single market — on a matrix that included political desirability, economic benefit, and diplomatic achievability. We included a range of immigration proposals, but they were by no means central to the proposition.

That changed with the opening of the borders to Romania and Bulgaria, the rise of UKIP and the relentless, shrill and occasionally xenophobic anti-immigration campaign by the British tabloids. By the time of the Conservative Party conference in late 2014, it was clear that Cameron had to make immigration reform a centerpiece of the renegotiation effort. "I will not take no for an answer and when it comes to free movement I will get what Britain needs," he said at the time.

Europe’s leaders were not only dismissive of this political reality, they declined to open discussion on the issue. During meetings, we were constantly subjected to lectures about the inviolability and indivisibility of the EU's so-called four freedoms: the free movement of goods, the free movement of services and freedom of establishment, the free movement of persons and the free movement of capital.

We thought we were projecting diplomatic legerdemain. Everyone else saw fruitless begging.

It never seemed to dawn on them that these freedoms are less real than aspirational. The energy, finance and transport markets have not been liberalized. Residency requirements, licensing rules, training requirements and other barriers make entry into many professions very difficult. As the Economist noted, "ask architects or notaries trying to set up shop outside their home country, or anyone trying to break into Germany’s heavily regulated (and low-growth) services sector. Some countries have over 400 regulated professions. A special diploma is needed to become a corsetmaker in Austria."

Nor would our counterparts in Europe acknowledge that the EU’s four freedoms are very much divisible. A country can reduce tariffs and remove trade barriers and still maintain restrictions on which foreigners are allowed to enter the country. This is what the United States has done since World War II, with NAFTA being the best example.

There are those who argue that we should have pushed Europeans harder and been willing to demand more. But I don't see how that would have worked better. We asked for a lot and even that proved too much. At one point, then Secretary of State for Work and Pensions Iain Duncan Smith suggested that we attempt to gain leverage by sabotaging any attempt by the eurozone countries to use the common EU institutions. The idea was literally laughed off the table by every lawyer and diplomat we discussed it with. The eurozone would find a legal basis for their response, they told us, and the European Court of Justice would side with them.

Perhaps we should have done as others suggested and gone straight to a referendum after the 2015 general election. I don’t believe this idea stands up to scrutiny, but I can see why it sounds reasonable. It’s not clear the negotiation effort helped sway the results of the referendum. We thought we were showing grit and determination, which we hoped would end in a sellable deal, but the public saw a British leader forced to prostrate himself before other European leaders. We thought we were projecting diplomatic legerdemain. Everyone else saw fruitless begging.

A hollow victory

he deal that Cameron achieved was actually quite profound. It consisted of a mechanism to limit the access of EU workers newly entering the U.K.'s labor market to in-work benefits. The benefits could be suspended for a total period of up to four years from the commencement of employment if the U.K., or any other country, could show that EU migrants were “putting an excessive pressure on the proper functioning of its public services.” The final deal included an acknowledgement that this was already in evidence in the U.K. and a declaration that the four-year brake would be available to Britain for “a period of seven years.”

This was a real win. But like many of our victories in the EU, it was too complex to explain to ordinary voters. The media was not impressed. And the European Parliament and some Conservative MPs began undermining the merits of the outcome even before the proverbial ink was dry.

The policy polled well during the negotiations, but appallingly afterwards. All our hard work against an entrenched European establishment and what often felt like the resistance of our own officials turned out to be for little gain. Meanwhile, the continuing influx from Bulgaria and Romania gave us little respite.

As a result of Cameron's statesmanlike position, our opponents could get away with telling a blatant untruth: that the U.K. could not veto future accessions.

As a result, we struggled during the referendum campaign to answer people's concerns about immigration. Even Cameron thought we weren’t doing well enough. After watching the television show Question Time one evening, he remarked that we didn't have a good answer to the one thing everyone kept asking. When I went out to canvass, which I did on weekends throughout the long campaign and several times a week during the short campaign, I found myself having a hard time convincing people.

We were afforded one opportunity during the campaign to make an immigration argument by proxy — by making a clear statement about Turkey's limited prospects for EU membership. I offered a continuum of options, from a clear statement that Turkey would never join the EU to references to other countries' opposition to its membership.

There were two reasons we did not seize the opportunity as forcefully as we should have. First, Cameron believed that doing so would be detrimental to the U.K.'s security interests as it would antagonize Turkey's irascible leader. Second, we knew that we would immediately come under pressure to rule out membership for the Balkan states, many of whom had undergone serious reforms — in some cases after devastating conflicts — largely because of the prospects of EU membership. As a result of Cameron's statesmanlike position, our opponents could get away with telling a blatant untruth: that the U.K. could not veto future accessions.

Tangled up in economic language

he agreement we struck included some important changes to the way the EU was run. The most successful part of the negotiation was arguably Osborne's securing of protections for the City of London financial district and non-eurozone countries like the U.K. It was truly a remarkable package, and it meant that Bank of England Governor Mark Carney would support the deal. Carney’s private message to the prime minister earlier on, that a deal without certain protections for the Bank of England's role would not be worth having, had lit a fire under the Treasury’s negotiators.

Unfortunately, Osborne's deal required a master's degree in financial regulation to explain. The package was too complicated to become a key part of the campaign. And anyway we were wary of getting boxed into a position where it looked like we had mainly worked to get the bankers in the City a good deal.

The final elements of the deal also included a series of institutional reforms. Cameron negotiated a British exemption from the goal of being part of an “ever closer union.” The deal also introduced a “red card” system, in which EU legislation could be reconsidered with support of 55 percent of the 28 member nations. Then Home Secretary Theresa May delivered an important set of safeguards for the British police. And, on Hammond's insistence, and based in part on the work of Andrew Tyrie, then chairman of the Treasury Select Committee, we landed a mechanism to review EU legislation with a view to regularly repatriating areas of EU lawmaking.

And yet, when we finally came out of the negotiations and began to prepare for the campaign, the polling was bleak: We could not win on the package that we had achieved. And so we decided to abandon any effort at persuading people of its merits and moved to the bigger issue of the pros and cons of EU membership.

To make matters worse, we were tripped up by a leak of the draft text circulated by European Council President Donald Tusk. That meant Euroskeptics could attack the deal, claiming it was not enough, while we could not defend it publicly — as we were trying to make it better or, at the very least, stop it from becoming worse. The choreography was terrible and came to us as a total surprise.

A seasoned EU analyst told me bluntly: "I think you were wrong to abandon Cameron's deal soon after you had negotiated it, just because focus groups/media were hostile. You were then left in a very weak position ... because Cameron had said he would not want to stay in an unreformed EU. You sort of admitted that there had been no decent reforms, so how come Cameron now said we had to stay? This led to mistrust of Cameron."

That is probably true. But the timing of the announcement of the draft conclusions also meant that it would have been near-impossible to make up the lost ground and persuade people of the merits of the deal.

Misreading Europe

hy did we misread the Europeans so badly? Should we have listened more to the Foreign Office? Why did we think European leaders would offer more, and why didn't they?

Part of the answer lies in that fact that since the Conservative Party left the European People's Party — a move Cameron undertook in part to outflank his main rival, David Davis, in the 2006 Tory leadership contest — the party’s political ties with the rest of Europe have weakened.

Not being in the EPP meant that Cameron could not benefit from the traditional pre-Council EPP huddle of European leaders, where he could lobby his counterparts and understand, in a more informal setting, what their mood was. Had he been able to attend those events we might have better understood how set other EU leaders were on the Spitzenkandidaten process — or what they would have ultimately been willing to offer in the negotiations. (Similarly, we aides were not natural members of an EPP network of political operatives.)

European leaders spend a lot of time discussing issues, talking around a subject. They even vacation together.

Meanwhile, with few exceptions, direct links between British politicians and European political parties have been limited. Previous generations of Conservative MPs either fought alongside their European counterparts or worked together to build the defense against Soviet Russia. But today's Tory MPs are more locally-focused, with few international links. Nor did Conservative campaign headquarters have useful relationships across the Channel; Party Chairman Andrew Feldman had focused on turning the party into a well-financed election-winning machine.

Then there was the clash of political cultures. British politics is famously adversarial, and those who make it to the top are results-focused leaders. They start and end meetings promptly and go into a conversation with clear set of points. Once these have been made, they seek to end the conversation. Cameron is no exception; rather, he is the exemplar. He can be charming. But his style is functional, whether in telephone calls or in person.

Continental politics, on the other hand, tend to be more consensual. European leaders spend a lot of time discussing issues, talking around a subject. They even vacation together. Those differences served to maintain a gulf between what we needed and what they were willing to give — a gulf we did not bridge.

Evidence, what evidence?

ur European counterparts pointed out that the number of immigrants moving to the U.K. was relatively limited, compared to, for example, Germany.

Finally, as we tried to argue that the U.K. faced a unique set of circumstances, which required a fundamental redraft of the relevant European rules, we struggled to provide evidence to support our case.

We tried using absolute numbers: three million migrants likely to come over the next 10 years, 6 percent of Lithuania’s population living in the U.K. already. We highlighted the pressure on public services like schools and hospitals. And we appealed to European leaders to consider the impact of migratory flows on their own economies.

These arguments were quickly shot down. Our European counterparts pointed out that the number of immigrants moving to the U.K. was relatively limited, compared to, for example, Germany. Or they called attention to the fact that European migrants paid more tax and used fewer public services than British citizens, which was true.

They noted that our economy was growing, that we were almost at full employment, and thus that migration was more or less inevitable. They showed us how our rate of financial distribution to the areas under pressure was much lower than, say, Germany’s, and concluded that we should just spend a lot more money addressing the challenges there.

We were never able to counter these arguments. To be honest, we failed to find any evidence of communities under pressure that would satisfy the European Commission. At one point we even asked the help of Andrew Green at MigrationWatch, an organization that has been critical of migration. But all he could provide was an article in the Daily Telegraph about a hospital maternity ward in Corby. There was no hard evidence.

That is not to say we didn’t perceive immigration as a problem. Cameron was convinced it was a real challenge — if perhaps more of a cultural one than an economic one. And he worked tirelessly to bring immigration down to acceptable levels. But it was clear that immigration is at best just one of several factors that are putting pressure on public services, along with globalization, deindustrialization, automation and aging populations.

Our man in Brussels

f there was one person who tried to flag the gulf that existed between the U.K. and the rest of the EU it was Ivan Rogers, our permanent representative to the bloc. His essay-length emails, mainly typed while he was in meetings with his counterparts, became the stuff of Whitehall legend. With missive after missive, analyzing this position, criticizing that view, our man in Brussels filled our inboxes. He could be infuriating, but he was right on many of the big issues, including that what the Conservative Party was asking for was not something that European leaders would ever agree to provide.

Ivan's scorn for the right of the Tory Party seemed only rivaled by his hatred of the European leaders and officials who, in his view, hadn't understood that they were heading for a fall. And he had few kind words for the Whitehall departments he believed had long since given up trying to understand Europe. Tom Scholar, Cameron’s adviser on European and global issues, was his perfect foil — calm, relaxed but forensically clever — and the two fought hard but ultimately unsuccessfully to help Cameron find a path between Tory politics and European orthodoxy.

The failure to give Cameron a better deal was a strategic mistake that the rump EU will live to regret many years from now.

On the opposite side of the proverbial table were the Good, the Bad and the Ugly of European officialdom: European Council Secretary-General Jeppe Mikkelsen, Juncker chief of staff Martin Selmayr and Piotr Serafin, head of cabinet to Donald Tusk. Together — but often seemingly working against each other — the three European diplomats sought a path forward. Mikkelsen seemed to be earnestly trying to find a workable solution. Selmayr seemed to be mainly concerned with making sure European rules were not infringed upon. Serafin looked like he was often traveling his own course.

We were also over-reliant on Angela Merkel, even after she showed us that she wasn't as dependable a supporter as we might have wished. We invited ridicule with how much we feted her — inviting her to address parliament, which she did movingly, and flying to a succession of events in Germany. But our efforts yielded little.

Normally, she seems to relish the chance to do deals — for example on Ukraine where she would huddle for hours in the margins of the European Council. But I think she thought we were asking for too much. She certainly seemed to take much more of a back seat during the final, crucial weeks of negotiations, giving advice, offering support and laying out red lines, but not getting too involved.

In the final weeks of the campaign we did toy with the idea of a big offer — for example trying to get Merkel and Hollande to consider a major commitment to treaty change or pushing one more time for an offer on freedom of movement. But in a phone call with Merkel, Cameron detected no willingness to offer what had previously been on the table. And so we left it.

After the referendum, when Cameron met Merkel at what would be his swan song European Council, Merkel made clear there would have been no other offer forthcoming — whatever we had offered, threatened or pleaded. Ending freedom of movement for an EU member was, at the time, not possible for her politically or philosophically.

We probably expected too much of her but the truth is that in today's EU, you either rely on Germany, or you have nobody to rely on at all. And as it turned out, Merkel was willing to give us some of what we asked for, but not all of it. And as a result, other European leaders were willing to go an extra mile, but not two or three.

The failure to give Cameron a better deal was a strategic mistake that the rump EU will live to regret many years from now. I believe that the U.K. would have been better off inside an EU in the process of reforming; and I think the 27 remaining EU governments would have benefited from having the U.K. stay inside the bloc. I don't think the U.K.'s departure by itself will destroy the rest of the EU, and it is similarly clear that the U.K. will survive Brexit. But we were all better off together.

Hands up, we made mistakes

iven that most commentators considered the outcome from the negotiations to be too limited, we needed to make up for lost ground during the actual campaign. But here we made a number of mistakes that hindered our efforts.

The first had to do with the electoral franchise. Intent on getting the Referendum Bill through parliament, we wanted to make its passage as easy and simple as possible, minimizing any tensions with the Conservative Right. Those considerations, along with worries about the pressure to do the same during the next general election, caused us to reject a proposal to lower the voting age to 16. Had we done so, we would have brought 1.2 million voters into the decision-making process, the vast majority of whom would have been pro-Remain.

As negotiations with the EU entered their final phase, Cameron realized what a mistake we had made.

And with them energized, more 18-, 19- and 20-year-olds would likely have voted. Moreover, the move might have changed the tenor of the BBC's coverage, as journalists spent hours interviewing younger voters about the issues that they care about, including the right to travel freely and how to tackle climate change, which would have benefitted Remain.

The other mistake was not keeping the promise we had made in the Conservative manifesto to enfranchise voters who had lived overseas for more than 15 years. After the general election, the issue of overseas voters quickly slipped down the list of priorities. And so, when the first session of parliament was announced by Her Majesty, there was no Overseas Voters Bill.

As negotiations with the EU entered their final phase, Cameron realized what a mistake we had made. Hundreds of thousands of voters living in Spain, Portugal and France who might be disposed to vote Remain would remain disenfranchised.

To be sure, extending the franchise would give a vote to thousands of Britons living in places like the United States, Australia and Dubai who might have been less inclined to support U.K. membership of the EU. But I nonetheless began to push the system to provide us with options.

I quickly ran into trouble. The Electoral Commission didn't believe we would have time to locate voters and give enough of them a chance to vote — and so believed that the referendum might be vulnerable to judicial review. The party whips were also against the idea of linking the reform to the referendum, believing it would create more bad blood between the prime minister and Euroskeptics in the party. And since we could not provide numbers to show that the reform would definitely favor a Remain vote, we dropped the idea.

Late to the party

p until this point, our major problems were self-made. The hardline Euroskeptics had boxed us in and helped create the climate in which we had to make our case. They had constrained the government through amendments to the Referendum Bill, an avalanche of parliamentary questions and cynical use of select committees (at one point, two select committees were trying to force me to give evidence in a thinly disguised attempt at forcing my resignation). But it was only as the referendum drew nearer that the tactics adopted by the Euroskeptics really began to trip us up.

The “Vote Leave” campaign started much earlier than our “Stronger In” campaign. Indeed, you could argue that most of its leading lights had been campaigning for the cause for years, if not decades. Meanwhile, we were busy attending to a range of other government issues, as well as being under a host of self-imposed restrictions so as not to undermine the negotiations. We could, after all, hardly be out in public arguing for the need to remain in the EU when the prime minister hadn't officially decided what he would recommend to the country.

There was also a view — mainly held by the prime minister’s press office — that voters would take a quick look at the question and opt for the status quo. I lost count of the number of ex-colleagues who confidently told me that the U.K. would never vote to leave the EU. One aide to a cabinet minister put the likely outcome at 60-40 and didn't budge from that until the results were out.

We were fighting with one hand tied behind our back, and the other hand was only untied very slowly. In 2015, Mats Persson, another special adviser, and I had suggested that we quit No. 10 to set up a movement which could morph into the Remain campaign much as the political strategist Matthew Elliott, a contemporary of mine at university, had done with Business for Britain, which became a large part of Vote Leave. We discussed a range of similar ideas, but nothing came of them. We were too busy with our day jobs and, in hindsight, we thought we had more time.

The effect was immediately visible when the campaign began in earnest. As the short campaign began and voters began to tune in, Boris Johnson was out and about, driving a bus through the English countryside while we were still deciding when the prime minister's aides would leave No. 10 to campaign, for how many days a week, and who would pay our salaries for those days. Osborne was chomping at the bit, haranguing us for not being faster to get out there. He was right.

Has anyone seen Labour?

tronger In was by necessity a cross-party affair created by merging the lobby group Business for a New Europe with a team of Labour, Liberal and Tory operatives led by the excellent Will Straw. The No. 10 team, led by Cameron’s director of communications, Craig Oliver, attached itself to it as we drew closer to the date of the referendum.

Given its composition, I was struck by how congenial and well-run an operation it was. But the campaign did suffer from a range of problems. The social media operation, run by the team behind the Conservative general election effort, was very good and their work targeted. But the rebuttal operation took ages to assemble and never hit its stride. Too few people at Stronger In knew the key facts and killer arguments about the EU, in marked contrast to the people working for Vote Leave.

Stronger In’s ground operation was impressive — at one point, it was the fastest growing grassroots movement in the world — but it didn't have the enthusiasm of Vote Leave's. To give one example, Vote Leave erected ten times as many placards in fields as Stronger In did.

But the biggest problem facing the campaign was the failure of Labour to pull its weight. We could not rely on the party to fill the airwaves with stories, to follow a common script or even appear like they agreed among themselves. I lost count of the times we tried to help Labour, and even produced stories for them to use.

At one point, Persson and Cameron’s speechwriter/strategist Ameet Gill and I sat with a number of ex-Labour advisers to develop policies and announcements that would work for the party’s spokespeople. It was fun to play a left-winger — you didn't have to worry about the cost or viability of any of the policies. But what we developed was not put to good use.

Labour’s problem was structural. In many constituencies, especially in the North, Labour MPs never really needed to canvass the electorate. These constituencies had returned Labour MPs to the House of Commons since time immemorial. And so they remained largely uncavassed.

Many Labour MPs also did not seem to me to have the intellectual tools to have serious arguments about Europe with their constituents. They just hadn't had to do it before. Whereas every Tory MP and would-be politician had been forced to hone his or her views on Europe, Labour — though historically and nominally pro-European — was full of MPs who struggled to make the case for the EU.

The relationship between Stronger In and Labour leader Jeremy Corbyn appeared to me the most dysfunctional of all. He certainly did nothing to help the cause and often ended up undermining it, for example going on television to say that he would rank the EU 7.5 out of 10. In modern politics, so much is about posture, and Corbyn's EU posture was clear: he didn't look like he cared.

[Boris] Johnson did make the case for leaving the EU more mainstream, but the movement was still able to portray itself as an insurgency.

Could Cameron have done something to destabilize Corbyn? We did discuss strategies, like scheduling a vote on the Trident nuclear program before the referendum. But we decided against it; we didn't want to play politics with an issue like Trident and also because we thought Corbyn would ultimately be helpful.

There was of course one other person who played a key role in the campaign: Boris Johnson. Long before the campaign began, we knew we had to try hard to bring the then Mayor of London on side. Our polling showed that he would be a crucial player. And so Cameron did everything he could to persuade Johnson to support staying in the EU. Little did it help. Johnson opted for Leave and gave a huge boost to the Euroskeptic campaign.

Initially, I thought that having the country's most popular politician and several cabinet members supporting the effort to Leave would undermine the anti-establishment image that was core to the Brexit message. I was wrong. Johnson did make the case for leaving the EU more mainstream, but the movement was still able to portray itself as an insurgency.

Living in fear

hat about "Project Fear," as part of our electoral strategy was called by the media. Did it contribute to our defeat? I don’t think so.

Our strategy during the campaign was based on two tenets we had developed after the Scottish referendum and the 2015 general election. The economy, we had concluded, would always trump immigration. And people’s concern for their economic circumstances would sway their votes.

The surveys carried out by our pollster Andrew Cooper confirmed our suspicions. Nobody was going to be persuaded to love Europe, it was argued, or at least not the voters we needed on side. Given the prime minister's stance on Europe, we also did not have much ammunition to fire in that direction. What we did think we could do, however, was persuade voters to act out of economic self-interest — which we believed would lead them to decide to stay in the EU.

Part of this strategy involved highlighting the economic risk. As it turned out, that was really easy: the vast majority of economists and businesspeople believed that voting to leave the EU would not be in the country's economic self-interest. I organized letters from CEOs, and provided choice quotes and articles for them to place. We wanted to own the economic argument as we had done in the general election and in the Scottish referendum.

The European single market was too esoteric a concept.

We did not have to invent the dangers. We used assessments by the Bank of England, the International Monetary Fund and the OECD and extrapolated different outcomes. What would be the effect of Brexit on the housing market or on pensions?

In the end, of course, it didn't work. We won the economic argument so comprehensively and so early that it was seen as a given, rather than core to the decision. And so when the campaign began in earnest, we had no new ammunition or at least no new missiles that the media and especially the newspapers would report.

I think we were right to focus the campaign on the economic case. Where we went wrong was in our inability to connect the economic costs and benefits of the decision to ordinary people's lives. The European single market was too esoteric a concept.

Meanwhile, Vote Leave happily ignored the facts and distorted the figures. Voters didn’t believe us when we told them that we had calculated that leaving the EU would make the average household some £4,300 worse off. But Leave's argument that Britain was “sending” £350 million a week to Brussels was believed.

When people ask me whether I think Project Fear lost us the referendum, I answer that Project Fear did in fact win. Just not ours. Our problem is that the other side was much better at fear-mongering. Their threats — of mass immigration, Turkey's membership, and a European army — were far scarier to the British voters than our warnings of an economic slowdown.

Down and out

ould we ever have won the referendum? We lost by a serious margin. Outside of London, Scotland and Northern Ireland, every major region in the country voted to leave the EU. A recent analysis by the London School of Economics suggests that once methodological artifacts are controlled, Leave was almost certainly ahead of Remain during the entire last month of the campaign — and maybe during all of 2016. At the same time the margin of victory was not so large as to in hindsight appear completely unbridgeable.

To be sure, it would certainly have been extraordinary if we did win. Britain has a long history of Euroskepticism, and these are populist times, in which voters are ready to reject the status quo. It also has to be said that we faced an extraordinarily hostile media. Team Cameron was used to having the main broadsheets and key tabloids on its side. We weren't used to a campaign where we could land next to nothing in the newspapers because of their Euroskeptic viewpoints and had to contend with a BBC position on impartiality that was bordering on the absurd. We kept trying to win the 6 and 10 o'clock news with big stories but with little success.

Winning would have required a much greater effort, much earlier on, to sway the electorate. One more attack on Boris Johnson, or another speech by Cameron would not have been enough. There were loads of things in hindsight that we should have done — such as deploy Ruth Davidson and Sadiq Khan much earlier or have gotten Cameron out on the road earlier — but I doubt they would have been critical. And while all of Cooper's focus groups said it was a head (economics) vs heart (immigration) contest, it was a mistake not to attempt to engage emotionally. We may never have been able to win those arguments but we should not have vacated the ground entirely.

But our biggest mistake was our failure to deliver the kind of deal we — and especially the media — had given the impression was possible. From the moment Cameron promised a referendum we should have built up the case for European cooperation, preparing the electoral battlefield we would eventually have to fight on. We didn’t. And so a better organized, more passionate adversary won.

Daniel Korski was deputy director of the policy unit in David Cameron’s government.