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 Two.
Global financial markets plunged as results from Thursday's referendum showed a near 52-48 percent split for leaving.
The pound fell more than 10 percent against the dollar to levels last seen in 1985, its biggest one-day fall in history, on fears the decision could hit investment in the world's fifth-largest economy, threaten London's role as a global financial capital and usher in months of political uncertainty.
European shares plummeted more than 8 percent, headed for their biggest ever one-day fall. Billions of dollars were wiped off European banks' market value, with Britain's Royal Bank of Scotland, Barclays and Lloyds Banking Group among the biggest fallers.
An emotional 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."
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. The United Kingdom itself could break apart, with leaders in Scotland -- where nearly two-thirds of voters wanted to stay in the EU -- calling for a new vote on independence.
The EU for its part will be economically and politically damaged, facing the departure not only of its most free-market proponent but also a member with a U.N. Security Council veto and powerful army. In one go, the bloc will lose around a sixth of its economic output. Populist leaders in France and the Netherlands demanded their own referendums to leave.
The vote will initiate at least two years of divorce proceedings with the EU, the first exit by any member state. Cameron, who has been premier for six years, said it would be up to his successor to formally start the exit process.
His Conservative Party rival Boris Johnson, the former London mayor who became the most recognizable face of the "leave" camp, is now widely tipped to seek his job.
There was euphoria among Britain's eurosceptic forces, claiming a victory over the political establishment, big business and foreign leaders including U.S. 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."
European politicians reacted with shock. "Please tell me I'm still sleeping and this is all just a bad nightmare!" former Finnish Prime Minister Alexander Stubb tweeted.
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."
Britain, which joined the then European Economic Community (EEC) in 1973, has always been an ambivalent member. A firm supporter of free trade, tearing down internal economic barriers and expanding the EU to take in ex-communist eastern states, it opted out of joining the euro single currency or the Schengen border-free zone.
Cameron's ruling Conservatives in particular have risked being torn apart by euroscepticism for generations.
World leaders including Obama, Chinese President Xi Jinping, German Chancellor Angela Merkel, NATO and Commonwealth governments had all urged a "Remain" vote, saying Britain would be stronger and more influential in the EU than outside.
The four-month campaign was among the divisive ever waged in Britain, with accusations of lying and scare-mongering on both sides and rows on immigration which critics said at times unleashed overt racism.
It also revealed deeper splits in British society, with the pro-Brexit side drawing support from millions of voters who felt left behind by globalization and believed they saw no benefits from Britain's ethnic diversity and free-market economy.
A pro-EU member of parliament was stabbed and shot to death in the street a week ago by an attacker who later told a court his name was "Death to traitors, freedom for Britain". Older voters backed Brexit; the young mainly wanted to stay in.
But in the end, concerns over uncontrolled immigration, loss of sovereignty and remote rule from Brussels appear to have trumped almost unanimous warnings of the economic perils of going it alone.
EU officials gather
The Bank of England said it would take all necessary steps to secure monetary and financial stability. Global policymakers also prepared for action to stabilize markets, with Japanese Finance Minister Taro Aso promising to "respond as needed" in the currency market.
EU affairs ministers and ambassadors from member states gather in Luxembourg by 10 a.m. (0800 GMT) for previously-scheduled talks that will provide the first chance for many to react.
Even less 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.