This article is more than
8 year oldAt exactly 06:00 BST it was confirmed that the UK had voted to leave the European Union. The first thing to stress is that the UK will not leave immediately. The UK is still a member of the EU and will probably remain so for several years. The process of leaving will begin, however.
In a statement outside Downing Street, David Cameron said the government would respect the result and carry out the instructions of the British people.
Although it was his responsibility to remain in No 10 to "steady the ship" - including by attending a meeting of EU leaders next week - he announced he would step down in the autumn as he was not the right "captain to steer the country to its next destination".
A new Tory leader and prime minister is expected to be elected by the end of September.
Market reaction to the referendum result has been immediate and dramatic.
The FTSE 100 index of leading shares fell 8% after opening in London. There was a big sell-off of bank shares, with Barclays and RBS down by more than 30%.
The value of the pound has also been hit hard on the foreign exchange markets, tumbling to lows not seen since 1985. At one stage, it hit $1.3305, a fall of more than 10%.
Bank of England governor Mark Carney - who is likely to emerge as a key figure in the coming days - said some "market and economic volatility" could be expected in the wake of the Brexit vote but the Bank was well prepared.
He said it stood ready to offer all necessary assistance to ensure financial stability, including £250bn of extra liquidity for the banking system and potential support for sterling.
Some in the Leave camp acknowledged there would be a short-term "blip" in the markets but insist things will quickly return to normal.
All EU leaders wanted the UK to stay in the bloc and a Leave vote has been met with dismay across the Channel.
Hastily-convened meetings are now taking place in Brussels and across foreign capitals on how to deal with the fallout of the UK's decision with an emergency summit likely next week.
European Council President Donald Tusk has called for calm, saying the vote is historic but "not a moment for hysterical reactions" - appealing for unity among the EU's 27 other members.
What will happen next is difficult to predict. A long, hard road of negotiations between the UK and EU beckons although it is unclear when this process - likely to take years - will begin.
EU leaders are worried about the prospect of "contagion", with the UK's decision already fuelling demands from populist, anti-EU parties in other countries, including France and the Netherlands - for referendums of their own on EU membership.
Europe's leaders will want a joint declaration of a determination to continue - and there will be demands for the UK to set out where it stands on key issues such as free movement, to reassure the 2.9 million EU citizens living in the UK that they will not be deported.
Mr Cameron has said it should be up to the next prime minister to decide when to activate Article 50 of the 2009 Lisbon Treaty - setting in motion the formal legal process of withdrawing from the EU.
Once Article 50 is triggered, there is no way back into the EU unless by unanimous consent from all other member states.
But quitting the EU is not an automatic process - it has to be negotiated with the remaining members. These negotiations are meant to be completed within two years but the European Parliament has a veto over any new agreement formalising the relationship between the UK and the EU.
Leave campaigners have said there is no need to trigger Article 50 immediately, suggesting that first there should be a period of informal discussions with other EU members and the European Commission to iron out the main issues and the likely timetable.
The idea, they say, would be to allow other EU leaders the time to realise they need a "friendly" trade deal with the UK to continue exporting their consumer goods into the British market without tariffs.
There is also a suggestion that Article 50 should not be invoked until after the French presidential elections in May 2017 and the German parliamentary elections next year to avoid Brexit becoming an issue in the campaigns.
Also Britain could, technically, ignore all of this, the Vote Leave campaign says, and simply write the EU out of its laws, although that wouldn't make future negotiations any easier.
As only one part of one country has ever left the European Community - Greenland more than 30 years ago (read Carolyn Quinn's feature on how they left) - we will be in uncharted territory here.
So, depending on when the prime minister triggers Article 50, perhaps at some time in late summer, or early autumn 2016, negotiations will begin in Brussels on the terms of its exit and the nature of the UK's subsequent relationship with the EU.
This would involve not only rescinding the European Communities Act, which gives primacy to EU law in the UK, but also sifting through an estimated 80,000 pages of EU agreements, which have been enacted over the past five decades, to decide which will be repealed, amended or retained - a process which Parliament will want to oversee.
After two years, the UK would no longer be bound by existing EU Treaties unless both it and the other 27 states agree unanimously to extend the process of negotiations.
The majority of the UK's 650 MPs are in favour of Britain staying in the EU and while they will have to respect the will of the British people, they will not be silent bystanders.
There are already moves among the 450 or so MPs who want to stay in the EU, across the Labour, Conservative, SNP, Plaid Cymru and Green parties, to keep the UK in the single market in any exit negotiations.
This would mean Britain would have to keep its borders open to EU workers and continue paying into EU coffers.
They say it would be legitimate for MPs to do this because the Leave campaign has refused to spell out what trading relationship it wants the UK to have with the EU in the future - and it would demonstrate the sovereignty of Parliament the Leavers were so keen to restore.
During the campaign, Vote Leave called for immediate legislation to pave the way for Britain's formal exit by the next election due in 2020, the centrepiece of which would be repeal of the European Communities Act 1972, the brief piece of legislation that brought the country into the European Economic Community, as it was then known.
Then there is the question of who will do the negotiating for Britain.
The most senior members of the government - David Cameron, Chancellor George Osborne, Foreign Secretary Philip Hammond and Home Secretary Theresa May - are all Remain supporters and some of them may choose to depart when the PM stands down.
During the campaign, the Leave side said that it would be happy for existing ministers and senior civil servants - including cabinet secretary Sir Jeremy Heywood - to lead the negotiations although they would expect senior Leave figures to play a very prominent role, as well as figures from other parties, business, law and civil society.
Now, however, it seems certain the next prime minister - whoever they may be - will take charge of the process. Could this be Boris Johnson or Michael Gove - both of whom were tipped for major promotions whatever the outcome of the vote.
As the Article 50 two-year deadline approaches after the vote to leave, the prime minister of the day will be under pressure to sort out the terms of Britain's exit and a new trade deal with the EU before the country ceases to be a member.
It is possible, say Remain campaigners, that Britain's membership could cease and the UK revert to trading with the EU under World Trade Organization rules, which would involve exporters being hit by import taxes, or tariffs.
The deal would have to be agreed by a qualified majority on the council of ministers and be ratified by the member states. It would also have to be agreed by the European Parliament and MPs at Westminster.
Under this scenario British ministers would return to Brussels, at some point, to negotiate a more favourable trade deal, which Remain campaigners have warned could take years, maybe even decades, to fully complete.
The Leave campaign insists that a favourable trade deal could be done fairly rapidly because it would not be in the interests of France and Germany to lose access to the British market for its consumer goods.
They also reject the two-year timetable for exit, saying the government should aim to complete negotiations on a new EU-UK trade deal by 2020.
The SNP warned during the campaign that if - as has happened - the UK overall voted to leave the EU but Scots voted to remain, Scotland would be taken out of the EU "against its will" and this could be the trigger for another independence vote.
Senior SNP figures have said the vote shows Scotland sees its future in the EU and the issue of its constitutional status could be revisited.
Former leader Alex Salmond has suggested a second independence referendum could take place within the next two and a half years, depending on how long it takes the UK to depart.
SNP leader Nicola Sturgeon's failure to win a majority in last month's Holyrood elections means this will be harder to achieve and there are no guarantees that an independent Scotland would be admitted into the EU.
But the Brexit vote will fuel concerns in Westminster that the future of the Union is now in serious doubt.
Newer articles
<p>The two leaders have discussed the Ukraine conflict, with the German chancellor calling on Moscow to hold peace talks with Kiev</p>