"We live in a vibrant and connected world where together as a people we are strong. For our children and their children we should be facing the problems of the world together and not alone."
On 23 June, the UK finally settled the question that's been rumbling close to the surface of British politics for a generation: should the country remain within the European Union or go it alone.
The final result went 52 to 48 per cent in favour of Brexit - so what are the pros and cons of leaving the European Union?
How we got here
The Conservative's general election victory last year activated a manifesto pledge to hold a referendum on Britain's membership of the European Union by the end of 2017.
David Cameron made the promise at a time when he was under pressure from Eurosceptic backbenchers – and when the Tories appeared to be losing votes to Ukip. Most political commentators agree that, given a free hand, he would not have wanted a referendum.
Last winter, the Prime Minister embarked on a tour of EU capitals as he sought to renegotiate Britain's terms of membership, which concluded at a summit in February. Presenting the result as a victory, he vowed to campaign with his "heart and soul" to keep Britain inside a "reformed" EU, but several members of his own cabinet campaigned for a British exit – or "Brexit".
Minutes after the vote closed on Thursday, it appeared the UK would stay in the EU. Even Ukip's Nigel Farage said it "looks like Remain will edge it".
However, when the final results came in, it was the Leave campaign that had won, prompting Cameron to announce that he would resign as prime minister before the Conservative Party conference in October.
The pros and cons of leaving the EU
The greatest uncertainty associated with leaving the EU is that no country has ever done it before, so no one can predict the exact result.
Leaving the EU would result in an immediate cost saving, as the country would no longer contribute to the EU budget, argue Brexiters. Last year, Britain paid in £13bn, but it also received £4.5bn worth of spending, says Full Fact, "so the UK's net contribution was £8.5bn". That's about 7 per cent of what the Government spends on the NHS each year.
What's harder to determine is whether the financial advantages of EU membership, such as free trade and inward investment (see below) outweigh the upfront costs.
The EU is a single market in which no tariffs are imposed on imports and exports between member states. "More than 50 per cent of our exports go to EU countries," says Sky News. Membership of the bloc means we have always had a say over how trading rules are drawn up.
Britain also benefits from trade deals between the EU and other world powers. "The EU is currently negotiating with the US to create the world's biggest free trade area," says the BBC, "something that will be highly beneficial to British business."
Britain risks losing some of that negotiating power by leaving the EU, but it would be free to establish its own trade agreements.
Ukip leader Nigel Farage believes Britain could follow the lead of Norway, which has access to the single market but is not bound by EU laws on areas such as agriculture, justice and home affairs. But others argue that an "amicable divorce" would not be possible.
"If Britain were to join the Norwegian club," says The Economist, "it would remain bound by virtually all EU regulations, including the working-time directive and almost everything dreamed up in Brussels in future." And it would no longer have any influence on what those regulations said.
Leading Brexit campaigner Boris Johnson, meanwhile, has proposed adopting a Canada-style trade arrangement. "I think we can strike a deal as the Canadians have done based on trade and getting rid of tariffs" and have a "very, very bright future", he said. The idea was quickly dismissed by Cameron at the time, who said it would mean "years of painful negotiations and a poorer deal than we have today".
Eurosceptics argue that the vast majority of small and medium sized firms do not trade with the EU but are restricted by a huge regulatory burden imposed from abroad.
A study by the think-tank Open Europe, which campaigned to see the EU radically reformed, found that the worst-case "Brexit" scenario is that the UK economy loses 2.2 per cent of its total GDP by 2030 (by comparison, the recession of 2008-09 knocked about 6 per cent off UK GDP). However, it says that GDP could rise by 1.6 per cent if the UK was able to negotiate a free trade deal with Europe – ie to maintain the current trade set-up – and pursued "very ambitious deregulation".
Whether other EU countries would offer such generous terms is one of the big unknowns of the debate. Pro-exit campaigners argued that it would be in the interests of other European countries to re-establish free trade, but their opponents suggested that the EU would want to make life hard for Britain in order to discourage further breakaways.
France also warned recently that there would be "consequences" for Britain if it left the EU.
Inward investment was always predicted to slow in the run-up to the vote, due to the uncertainty of the outcome and its consequences: that's what happened in before the Scottish independence referendum in 2014.
In the long term, there are diverging views: pro-Europeans think the UK's status as one of the world's biggest financial centres will be diminished if it is no longer seen as a gateway to the EU for the likes of US banks, while Brexit campaigners suggest that, free from EU rules a regulations, Britain could reinvent itself as a Singapore-style supercharged economy.
Fears that car-makers could scale back or even end production in the UK if vehicles could no longer be exported tax-free to Europe were underlined by BMW's decision to remind its UK employees at Rolls-Royce and Mini of the "significant benefit" EU membership confers. Likewise, Business for New Europe said tax revenues would drop if companies that do large amounts of business with Europe – particularly banks – moved their headquarters back into the EU.
Barclays, however, put forward a worst-case scenario that might have benefitted the Outers. It said the departure of one of the EU's most powerful economies would hit its finances and boost populist anti-EU movements in other countries. This would open a "Pandora's box", said the Daily Telegraph, which could lead to the "collapse of the European project".
The UK would then be seen as a safe haven from those risks, attracting investors, boosting the pound and reducing the risk that Scotland would "leave the relative safety of the UK for an increasingly uncertain EU".
For Brexiters, sovereignty was seen as a simple win: few disagree that EU membership involves giving up some control over our own affairs.
Labour MP Kate Hoey says the EU is "an attempt to replace the democratic power of the people with a permanent administration in the interests of big business". Those on the right of the Conservative party may disagree with her emphasis, but they agree that EU institutions have drained power from the British Parliament.
"The trouble is that most of us have no clue as to how the Brussels monolith works, or who's in charge," said Stay or Go, the Connell Guide to the EU referendum. But, it said, we have only ourselves to blame. "We've made it that way" because too many of us "can't be bothered to vote" in European elections.
For those in the Remain camp, EU membership involved a worthwhile trade of sovereignty for influence: in return for agreeing to abide by EU rules, Britain had a seat around the table at which they are set - and, say campaigners, its voice was amplified on the world stage as a result.
"The truth is that pulling up the drawbridge and quitting the EU will not enhance our national sovereignty," warned Labour's Hilary Benn, who was sacked as shadow foreign secretary this week after complaining about Jeremy Corbyn's leadership. "All it would do is to weaken it by taking away our power to influence events in an ever more complex and interdependent world."
Nor, said Remainers, will UK sovereignty be absolute out of the EU: the British government would still be bound by membership of Nato, the UN, the World Trade Organisation, and various treaties and agreements with other nations.
Under EU law, Britain cannot prevent anyone from another member state coming to live in the country – while Britons benefit from an equivalent right to live and work anywhere else in the EU. The result has been a huge increase in immigration into Britain, particularly from eastern and southern Europe.
According to the Office for National Statistics, there are 942,000 eastern Europeans, Romanians and Bulgarians working in the UK, along with 791,000 western Europeans – and 2.93m workers from outside the EU. China and India are the biggest source of foreign workers in the UK.
Remainers say that, while the recent pace of immigration has led to some difficulties with housing and service provision, the net effect has been overwhelmingly positive. By contrast, Farage insisted immigration should be cut dramatically, and that leaving the EU was the only way to "regain control of our borders". Other pro-Brexit campaigners would not necessarily reduce immigration, but said that it should be up to the British Government to set the rules.
Cameron claimed that the concessions he won during the renegotiation of Britain's EU membership would reduce immigration as new arrivals will receive a lower rate of child benefit.
The effect of leaving the EU on British jobs depends on a complex interplay of the factors above: trade, investment and immigration.
Pro-EU campaigners suggested that three million jobs could be lost if Britain goes it alone. However, while "figures from the early 2000s suggest around three million jobs are linked to trade with the European Union," says Full Fact, "they don't say they are dependent on the UK being an EU member."
If trade and investment falls now the UK has voted for Brexit, then some of these jobs would be lost – but if they rose, then new jobs would be created.
A drop in immigration would, all else being equal, mean more jobs for the people who remained, but labour shortages could also hold back the economy, reducing its potential for growth.
Stuart Rose, former Marks & Spencer chief executive and a prominent pro-EU campaigner, conceded recently that wages may rise if Britain leaves – which would be good for workers, but less so for their employers.
Writing for the London School of Economics, Professor Adrian Favell said limiting freedom of movement would deter the "brightest and the best" of the continent from coming to Britain and reduce the pool of candidates employers can choose from.
Free movement of people across the EU also opened up job opportunities for British workers seeking to work elsewhere in Europe.
Britain's place in the world
For Outers, leaving the EU will allow Britain to re-establish itself as a truly independent nation with connections to the rest of the world. But Remainers fear that Brexit will result in the country giving up its influence in Europe, turning back the clock and retreating from the global power networks of the 21st century.
Brexit would bring some clear-cut advantages, said The Economist before the referendum. The UK "would regain control over fishing rights around its coast", for example. But it concluded that the most likely outcome would be that Britain would find itself "a scratchy outsider with somewhat limited access to the single market, almost no influence and few friends".
The UK will remain a member of Nato and the UN, but it may be regarded as a less useful partner by its key ally, the US. The American government said it feared that the "EU referendum is a dangerous gamble that could unravel with disastrous consequences for the entire continent".
Former work and pensions secretary Iain Duncan Smith, who was in favour of Brexit, said we were leaving the "door open" to terrorist attacks by remaining in the EU. "This open border does not allow us to check and control people," he said.
However, a dozen senior military figures, including former chiefs of defence staff Lord Bramall and Jock Stirrup, argued the opposite. In a letter released by No 10, they said that the EU is an "increasingly important pillar of our security", especially at a time of instability in the Middle East and in the face of "resurgent Russian nationalism and aggression".
Defence Secretary Michael Fallon has also said the UK benefitted from being part of the EU, as well as Nato and the United Nations. "It is through the EU that you exchange criminal records and passenger records and work together on counter-terrorism," he said. "We need the collective weight of the EU when you are dealing with Russian aggression or terrorism."
In contrast, Colonel Richard Kemp, writing in The Times, said these "critical bilateral relationships" would persist regardless of membership, and that it was "absurd" to suggest that the EU would put its own citizens, or the UK's, at greater risk by reducing cooperation in the event of Brexit.
"By leaving, we will again be able to determine who does and does not enter the UK," said Kemp, a former head of the international terrorism team at the Cabinet Office. "Failure to do so significantly increases the terrorist threat here, endangers our people and is a betrayal of this country."