LONDON—Britain's vote to leave the European Union sent shock waves rippling across the globe Friday, setting off tumult in financial markets, forcing the country's prime minister to resign and shattering the stability of an alliance that created the continent's shared economy and ended the ruinous wars that plagued the early 20th century.
Document: Britain faces an uncertain reality after vote to exitView
With 52 percent of the vote, "Leave" campaigners celebrated Thursday's outcome as a triumph of British democracy over an oppressive Brussels bureaucracy.
"The dawn is breaking on an independent United Kingdom," UK Independence Party leader Nigel Farage said to a cheering crowd at what turned into a "Leave" victory party.
"This will be a victory for real people, a victory for ordinary people, a victory for decent people," he said.
But among the 16 million voters who wanted to remain in the EU—and the 2 million Europeans who live and work in Britain but could not vote—there was shock and bewilderment.
"London feels sort of grief-stricken," said Charlotte Bussey, a 41-year-old resident of the city who said she was tempted to walk up to French and German people in the street and tell them: "I didn't vote 'Leave.'"
Andrea Vidmar, a newlywed hairstylist from Croatia, wondered if Europeans who are not British would be forced to leave. She has lived in London for two years and is hoping to buy a home and start a family.
"It feels like 17 million people voted that they don't want me here. Like we are unwanted and some kind of European scum," she said, visibly shaken.
Economic analysts had warned that a British exit from the EU, or "Brexit," could push Europe's second-largest economy after Germany back into recession, with repercussions felt around the world.
Major stock markets in Asia, Europe and the U.S. tumbled Friday, and the British pound fell by more than 10 percent, to a 30-year low of below $1.35.
Markets recovered some of their losses after the governor of the Bank of England, Mark Carney, said that there had been "extensive contingency planning" and that the bank would not hesitate to "take additional measures as required, as markets adjust and as the U.K. economy moves forward."
But that did not prevent Moody's credit ratings agency from downgrading the outlook for the British government's bonds from stable to negative. The outlook for EU bonds, on the other hand, remained stable.
Scotland, meanwhile, was threatening to launch a second referendum on independence, creating new uncertainty over the future of the United Kingdom itself.
"I intend to take all possible steps and explore all possible options to give effect to how people in Scotland voted, in other words to secure our continuing place in the EU, and in the single market in particular," Scottish First Minister Nicola Sturgeon said.
While Britain overall voted to leave the EU, 62 percent of voters in Scotland cast ballots to remain.
The unexpected victory of the "Leave" campaign was a crippling defeat for British Prime Minister David Cameron, the Conservative Party leader who has led Britain for the last six years and campaigned vociferously to remain in Europe.
"The will of the British people is an instruction that must be delivered," Cameron told reporters after the vote.
But he said it was time for "fresh leadership" to negotiate Britain's departure from what will become a 27-member union.
"I do not think it would be right for me to try to be the captain that steers our country to its next destination," Cameron said, signaling that he would step down by October, when the Conservatives hold a party conference.
The result also unleashed turbulence in the opposition Labor Party, whose traditional working-class supporters defied the leadership's call to vote "Remain" in large numbers. Two party lawmakers filed a motion of no confidence against leader Jeremy Corbyn.
The hard-fought and bitter campaign exposed deep schisms in British society, in which proponents of greater openness to Europe came up against longstanding worries about immigration, job losses and a perceived loss of sovereignty to European bureaucrats.
The split reflects a generational divide with 75 percent of voters ages 24 and younger—those with perhaps the most to gain from being able to live and work across the continent, casting ballots to remain in the EU, compared with older voters who feel left behind by globalization.
Former London Mayor Boris Johnson, a strong proponent of leaving Europe who has been one of those favored as Britain's next prime minister, vowed Friday that Britain would remain "a great European power" with a "glorious opportunity" to take control of its own future.
"We cannot turn our backs on Europe. We are part of Europe," he said.
"But there is simply no need in the 21st century to be part of a federal system of government based in Brussels that is imitated nowhere else on Earth. It was a noble idea for its time, but it is no longer right for this country."
The decision will force Britain to renegotiate business, trade and political ties with the EU and other partners, an immensely complex divorce for which there is no precedent.
Once Britain invokes Article 50 of the so-called Lisbon Treaty, it has two years to complete the negotiations. Analysts have warned that the discussions could drag on even longer, with some countries trying to punish Britain to deter others from staging their own exit.
Populist politicians including France's Marine Le Pen and the Netherlands' Geert Wilders are already calling for similar votes to be held in their countries.
However, European officials appeared determined to move quickly.
"We now expect the United Kingdom government to give effect to this decision of the British people as soon as possible, however painful that process may be. Any delay would unnecessarily prolong uncertainty," said a joint statement from European Commission President Jean-Claude Juncker, European Council President Donald Tusk, European Parliament President Martin Schulz and Dutch Prime Minister Mark Rutte.
President Barack Obama pledged that the "special relationship" between the U.S. and the United Kingdom would endure, whatever the outcome, as would America's links to the European Union.
"The United Kingdom and the European Union will remain indispensable partners of the United States even as they begin negotiating their ongoing relationship to ensure continued stability, security and prosperity for Europe, Great Britain and Northern Ireland, and the world," Obama said.
But some analysts said that relationship would inevitably become less special.
"The U.K. has been one of this country's most important partners. And again, it will be less willing and able to play that role," said Richard Haass, president of the Council on Foreign Relations, a U.S. think tank. "The United States will have no alternative but to increasingly turn to and rely on other countries."
With Europe still reeling from deadly terrorist attacks in France and Belgium, Thursday's vote also carries potential security implications.
It could jeopardize a number of counterterrorism measures in which Britain plays an integral part and weaken European resolve in the face of a resurgent Russia and its defiant president, Vladimir Putin, according to a press note released by the Center for a New American Security.
"Putin has done his very best to fracture and divide Europe," wrote Julianne Smith, director of the center's strategy and statecraft program, and Rachel Rizzo, a research associate. "This vote grants him a significant win, especially as it could dissolve European unity on sanctions."