Britain has voted to leave the European Union, forcing the resignation of Prime Minister David Cameron and dealing the biggest blow to the European project of greater unity since World War II.
World financial markets plunged as complete results showed a 52% to 48% split for leaving. Turnout was 72.2%.
The vote created the biggest global financial shock since the 2008 economic crisis, this time with interest rates around the world already at or near zero, stripping policymakers of the means to fight it.
The pound suffered its biggest one-day fall in history, plunging more than 10% against the dollar to hit levels last seen in 1985.
An emotional Mr Cameron, who led the Remain campaign but lost the gamble he took when he called the referendum three years ago, said he would resign as prime minister by October.
"The British people have made the very clear decision to take a different path and as such I think the country requires fresh leadership to take it in this direction," he said in a televised address outside his Downing Street office.
"I do not think it would be right for me to be the captain that steers our country to its next destination."
The vote will initiate at least two years of divorce proceedings with the EU and cast doubt on London's future as a global financial capital.
The euro slumped more than 3% against the dollar on concerns a Brexit vote will do wider economic and political damage to the world's biggest trade bloc, stripped of its second largest economy.
Investors poured into safe-haven assets including gold, and the yen surged.
UK and EU entering 'uncharted territory'
"We're in uncharted territory," an aide working in Mr Cameron's office told reporters.
The Bank of England said it would take all necessary steps to secure monetary and financial stability.
Global policy makers also prepared for action to stabilise markets, with Japanese Finance Minister Taro Aso promising to "respond as needed" in the currency market.
Yet there was euphoria among Britain's eurosceptic forces, claiming a victory they styled as a protest against the political establishment, big business and foreign leaders including US President Barack Obama who had urged Britain to stay in.
"Dare to dream that the dawn is breaking on an independent United Kingdom," said Nigel Farage, leader of the eurosceptic UK Independence Party.
"This will be a victory for real people, a victory for ordinary people, a victory for decent people ... Let June 23 go down in our history as our independence day."
United Kingdom unity faces challenges
The United Kingdom itself now faces a threat to its survival, as Scotland voted 62% in favour of staying in the EU and is likely to press for a new referendum on whether to become independent after its 2014 vote to stay in the UK.
Sinn Féin said the result intensified the case for a vote on whether Northern Ireland should quit the United Kingdom.
The world's biggest trading bloc could even face an existential crisis as surging populist and anti-immigrant movements across the continent issue their own calls to quit.
Far-right leaders in France and the Netherlands immediately demanded referendums of their own.
French National Front leader Marine Le Pen declared "Victory for freedom!". Dutch far right leader Geert Wilders said: "We want be in charge of our own country, our own money, our own borders, and our own immigration policy."
Implications on trade after vote
Quitting the EU could cost Britain access to the EU's trade barrier-free single market and mean it must seek new trade accords with countries around the world.
President Barack Obama says it would be at the "back of a queue" for a US pact.
The EU for its part must absorb the blow at a time when it is struggling to climb out of financial crisis, deal with unprecedented migration and respond to a resurgent Russia.
It faces the loss not only of its most free-market proponent but also a UN Security Council veto and one of its most powerful armies.
In one go, the bloc will lose around a sixth of its total economic output.
Mr Cameron is expected to formally report the result to his European counterparts within days.
European Union president Donald Tusk has said the bloc was determined to stay unified after the result and warned against "hysterical" reactions.
It is not clear at this stage is what sort of relationship Britain will seek to negotiate with the EU once it has left.
To retain access to the single market, vital for its giant financial services sector, London would have to adopt all EU regulation without having a say in its shaping, and pay a substantial contribution to Brussels coffers for market access, as Norway and Switzerland do.
EU officials have said UK-based banks and financial firms would lose automatic "passport" access to sell services across Europe if Britain ceased to apply the EU principles of free movement of goods, capital, services and people.
Aside from trade, huge questions now face the millions of British expatriates who live freely elsewhere in the bloc and enjoy equal access to health and other benefits, as well as millions of EU citizens who live and work in Britain.