LONDON — The UK has voted to leave the European Union in a historic referendum that triggered the resignation of British Prime Minister David Cameron and wreaked havoc on global markets.
There was a mixture of jubilation and tearful disbelief in the UK as people awoke Friday to the final verdict in the extremely close vote that deeply divided the nation.
Europe was plunged into uncertainty following the result, with calls for further referendums from emboldened far-right groups who see it as a boost for their anti-EU, anti-immigration policies.
It also reverberated across financial markets, causing huge losses in Asia, Europe and the United States as traders weighed the consequences for the world's biggest economic zone.
Within hours of Thursday's ballot outcome -- 51.89% in favor of leaving the EU, with 48.11% against -- Cameron delivered an emotionally charged statement outside the door of 10 Downing Street, announcing his intention to stand down.
He said that "the British people have voted to leave the EU and their will must be respected... the will of the British people is an instruction which must be delivered."
"There can be no doubt about the result."
Cameron gave no timetable for his departure, but said that he wanted a new leader to be in place by October when his Conservative Party holds its annual conference.
He said the country needed a pro-exit leader to steer it out of the organization it has been a part of since 1973 -- a process likely to take at least two years.
Boris Johnson, a former London mayor who campaigned for the UK's departure from the EU, is tipped by bookmakers as Cameron's likely successor.
Johnson, who was greeted by a booing crowd when he left his home on Friday morning, thanked voters for their decision, pledged that the UK would remain committed to Europe and urged unity.
"I think the electorate have searched in their hearts and answered as honestly as they can," he said. "They have decided to vote to take back control from a European Union that has become too remote."
In Scotland, where support was overwhelmingly in favor of remaining in the EU, Nicola Sturgeon, Scotland's First Minister and leader of the dominant Scottish National Party, said the outcome threw into doubt the future of her country's place in the UK.
She said she intended "to take all possible steps and explore all the options" to remain in the EU, raising the prospect of a new Scottish independence referendum.
The pro-independence Sinn Fein party in Northern Ireland also called for an Irish unity referendum -- taking Northern Ireland out of the UK.
As European leaders faced their own crises, German Chancellor Angela Merkel stressed the "need to make sure that European people feel that the EU wants to improve all our lives."
She said she greatly regretted the UK's decision, but added: "The EU is strong enough to find the right answers today."
French President Francois Hollande called it a "painful choice which I deeply regret for the UK and Europe."
Italy's finance minister, Pier Carlo Padoan, warned of a domino effect amid calls for further exit votes.
Far-right Dutch politician Geert Wilders congratulated the UK on its decision, and called for a Dutch referendum on EU membership.
"We want to be in charge of our own country, our own money, our own borders, and our own immigration policy," he was quoted as saying in a statement on his website.
Marine Le Pen, who will next year run for the French presidency as leader of France's National Front party, also congratulated the Brexit side.
Her party has suggested that the French would also hold an "out" referendum if she assumed the presidency. France is holding presidential elections next year.
Passions continued to run high in the UK in the hours after the vote, with pro-independence UKIP party leader and Leave campaigner Nigel Farage declaring the EU a "dying" institution.
"We've given ourselves the chance to rejoin the world," he told journalists. "June 23rd needs to become a national bank holiday and we will call it Independence Day."
The referendum followed one of the most divisive political campaigns in recent memory. Polls had consistently shown voters split down the middle, with the outcome too close to call ahead of the referendum.
But news of the decision sparked strong emotions, with those in favor and those against reflecting on a campaign marred by allegations of lies, distrust and hate.
"This is so sad," said Daniel Trilling on Twitter. "Millions of people aren't going to feel any more in control of their lives or their country because of this vote."
"People vote on emotion," another Twitter user, @cemanthe, posted. "This was won on false promises and emotive texts about immigration. Not on facts."
"I am SO happy this morning," wrote another, Gemma.
An online petition calling for a second referendum gathered more than 120,000 signatures within hours of being posted.
Leading political figures gave mixed reactions.
Tony Blair, the former UK prime minister, called the decision a divided result.
"It's going to be a complicated process but it's important to bring our country together and stabilize our country," he told CNN's Becky Anderson. "It's still a resilient country and it's a strong country."
Sadiq Khan, the mayor of largely pro-EU London said that the decision was a "clear message" and urged calm.
'Taking back control'
European Council President Donald Tusk said the decision was "historic, but not a moment for hysterical reactions.
U.S. President Barack Obama has been briefed on the results and expects to speak to Cameron later in the day, the White House said.
Donald Trump, the presumptive Republican presidential nominee for the U.S. presidential elections, hailed the UK's decision to "reassert control over their own politics, borders and economy."
In a news conference Friday as he attended the official opening of a remodeled golf resort bearing his name in Turnberry, Scotland, Trump called the decision of the voters "a great thing."
"They're angry over borders, they're angry over people coming into the country and taking over, nobody even knows who they are," he said. "They're angry about many, many things. They took back control of their country."
Markets start freaking out
The effects of the vote outcome are already being felt in markets and economies around the world.
In New York, the Dow tanked 500 points as trading opened. London's FTSE index shed $164 billion of its value in the first 10 minutes of trading, but regained ground later in the day.
The pound at one point plunged more than 12% to below $1.34, its lowest level since 1985. Japan's Nikkei tanked 6.7%, and Hong Kong's main index dropped 3.7%.
Bank of England Governor Mark Carney said that the body is "well prepared" and "won't hesitate" to take additional measures as markets adjust.
The "UK financial system is resilient," he added.