The UK has voted by 52% to 48% to leave the European Union after 43 years in an historic referendum.
London and Scotland voted strongly to stay in the EU but the remain vote has been undermined by poor results in the north of England.
UKIP leader Nigel Farage hailed the result as the UK’s “independence day”.
The pound fell to its lowest level against the dollar since 1985 as the markets reacted to the results.
The referendum turnout was 71.8% – with more than 30 million people voting – the highest turnout at a UK election since 1992.
Wales and the majority of England outside London voted in large numbers for Brexit.
Labour’s Shadow chancellor John McDonnell said the Bank of England may have to intervene to shore up the pound, which lost 3% within moments of the first result showing a strong result for Leave in Sunderland and fell as much as 6.5% against the euro.
UKIP leader Nigel Farage – who has campaigned for the past 20 years for Britain to leave the EU – told cheering supporters “this will be a victory for ordinary people, for decent people”.
Mr Farage – who predicted a Remain win at the start of the night after polls suggested that would happen – said Thursday 23 June would “go down in history as our independence day”.
He called on Prime Minister David Cameron, who called the referendum but campaigned passionately for a Remain vote, to quit “immediately”.
A Labour source said: “If we vote to leave, Cameron should seriously consider his position.”
But pro-Leave Conservatives including Boris Johnson and Michael Gove have signed a letter to Mr Cameron urging him to stay on whatever the result.
Labour former Europe Minister Keith Vaz told the BBC the British people had voted with their “emotions” and rejected the advice of experts who had warned about the economic impact of leaving the EU.
He said the EU should call an emergency summit to deal with the aftermath of the vote, which he described as “catastrophic for our country, for the rest of Europe and for the rest of the world”.
Germany’s foreign minister Frank Walter Steinmeier describes the referendum result as as “a sad day for Europe and Great Britain”.
But Leave supporting Tory MP Liam Fox said voters had shown great “courage” by deciding to “change the course of history” for the UK and, he hoped, the rest of Europe.
London has voted to stay in the EU by around 60% to 40%. However, no other region of England has voted in favour of remaining.
The referendum has underlined the social and cultural gap between London and provincial England.
Britain would be the first country to leave the EU since its formation – but a leave vote will not immediately mean Britain ceases to be a member of the 28-nation bloc.
That process could take a minimum of two years, with Leave campaigners suggesting during the referendum campaign that it should not be completed until 2020 – the date of the next scheduled general election.