British Prime Minister David Cameron announced on Friday that he would resign in October. Photograph by by Matt Cardy / Getty

At about three-thirty in the morning British time on Friday, Nigel Farage, the loquacious head of the anti-European Union U.K. Independence Party, gave his second public address of the night. The first one, which he delivered around midnight, had been a defiant concession speech. With an exit poll carried out for Sky News and other indicators pointing to a narrow defeat for the Leave side in the eagerly awaited referendum on whether Britain should exit the European Union, Farage had said, "It's been a long campaign, in my case twenty-five years. But whatever happens in this battle, we are winning the war. . . . Even if we do stay part of this union, it is doomed."

Officially, Farage played no role in the Leave campaign. He and his Party have such a toxic reputation that the Conservative Euroskeptics who led the official campaign didn't want anything to do with them. But it was UKIP's anti-immigrant scaremongering that energized the Leave movement, and when Farage stepped up to the cameras for his second speech on Friday, he was much more ebullient. By then, roughly half of the vote had been counted, and it was evident that the exit poll had got it wrong. In many parts of Britain, particularly northern England, the Leave vote was outperforming expectations, and Remain was underperforming. Many of the votes in London, a bastion of the Remain campaign, hadn't been tallied, but it appeared that the Leave side was building an insurmountable lead.

"The dawn is breaking over an independent United Kingdom," Farage declared. "This will be a victory for real people, a victory for ordinary people, a victory for decent people. We have fought against the multinationals. We have fought against the big merchant banks. We have fought against the big parties." Turning to the E.U., the object of his loathing, Farage went on, "I hope this victory brings down this failed project."

Much of what Farage says can't be trusted. On this occasion, though, the thrust of his remarks was accurate. In a vote that stunned the entire world, an obdurate British public rejected the advice of the Prime Minister, the Chancellor of the Exchequer, the governor of the Bank of England, the Archbishop of Canterbury, the leader of the Labour Party, the leader of the Liberal Democrats, U.S. President Barack Obama, the head of the International Monetary Fund, and a long list of prominent economists and business leaders.

In 1973, Edward Heath, the Conservative Prime Minister of the day, led Britain into the European Economic Community, as it was then called, and in a referendum two years later, the public endorsed Britain's membership by a margin of roughly two to one. After Thursday's referendum, in which Leave garnered fifty-two per cent of the vote, Britain now faces the task of negotiating the terms of a divorce from its European partners.

David Cameron, the Prime Minister, will play no part in these negotiations. Shortly before 8:30 A.M. on Friday morning, he stepped out of 10 Downing Street and announced that he intended to resign in October. Cameron brought all this about back in 2013 by promising the Euroskeptics in his own party a referendum. He then led the effort to persuade Britons to vote Remain, and the result represented a stinging repudiation of his leadership, stripping him of authority and credibility. The reason he wasn't quitting immediately, he said, was that he wanted to "steady the ship" and insure "a period of stability."

Cameron's decision to resign presents an opportunity to Boris Johnson, the former mayor of London, who was one of the leaders of the official Leave campaign, and who is widely believed to harbor ambitions of moving into Downing Street. In Britain, Prime Ministers can be replaced without a general election being called: the ruling party can simply hold a leadership election, and the winner takes over. That is clearly what Cameron wants. But with the Conservative Party poised to plunge into the turmoil of a leadership contest, in which Johnson certainly wouldn’t be the only candidate, another general election is also looming as a possibility.

The identity of the next Prime Minister, and the durability of his or her government, are just two of the many unknowns. George Osborne, the Chancellor of the Exchequer, who helped lead the Remain campaign, is now in an invidious situation. The position of Jeremy Corbyn, the leader of the Labour opposition, who led a distinctly uninspiring effort to win the Party's supporters over to the Remain cause, is also in doubt. On Friday morning, the Guardian_ _reported that "an orchestrated move" against Corbyn "appeared to be under way" within the Parliamentary Labour Party.

About the only things we can say for sure is that Cameron is going, that Britain and Europe are entering a period of great uncertainty, and that Britain's exit from the E.U. won't be immediate.

The earliest Britain could leave is two years from now. To keep to this timetable, it would have to invoke Article 50 of the Treaty on European Union. That would oblige the European Council, the highest body in the E.U., to start negotiating a "withdrawal agreement" with London, which would dictate, among other things, what sort of access Britain, as a non-member state, would have to the huge European market.

But Cameron's aides told reporters that he has no intention of invoking Article 50—he plans to leave that option, and what would follow, to his successor. Indeed, there is some talk that Britain might not start the departure process until after French and German Presidential elections take place next year. If that happens, it could be 2019 or 2020 before Britain finally retreats to unsplendid isolation behind the English Channel.

By that point, it's not inconceivable that other E.U. members could be pushing to follow the British example. As Farage has pointed out, there are now sizable Euroskeptic movements in several European countries, including France, Holland, and Italy. Britain has always been a semidetached member of the European community. It joined the Common Market late, adopted Europe's fixed-exchange-rate system late, crashed out of it in 1992, and never adopted the euro as its currency. But Britain's singular status doesn't detract from the fact that it is one of the biggest and most powerful countries in the E.U. Its decision to leave presents the E.U. with yet another crisis, and raises the possibility, if not the immediate prospect, of a wider breakup.

I'd wager that the E.U. will defy the wishes of Farage and somehow survive. Indeed, without Britain protesting further encroachment from Brussels at every opportunity, it's conceivable that the six original members—France, Germany, Italy, and the Benelux countries—could come even closer together, creating a two-tiered structure, with a tightly integrated core at its center and a less integrated periphery.

It is even possible that the U.K. could break up before the E.U. does. On Thursday, Scotland, which rejected the option of independence from the U.K., in 2014, voted firmly in favor of staying in the E.U.: the result was Remain earning sixty-two per cent of the vote and Leave getting thirty-eight per cent. Rather than acceding to the wishes of the English, who voted decisively in favor of Leave, it seems perfectly possible that the Scots will now (or soon) demand another independence referendum, and the result of this one could be different. "The people of Scotland see their future as part of the European Union," Nicola Sturgeon, Scotland’s First Minister and the leader of the Scottish National Party, said as the Brexit results came in. She went on, "Scotland has spoken—and spoken decisively."

The status of Northern Ireland, which likewise voted to stay in Europe, has also been called into question. On Friday morning, Sinn Fein, the Irish nationalist party, which has representatives in the parliaments in both Belfast and Dublin, called for a referendum on a united Ireland. "English votes have overturned the democratic will of Northern Ireland," the Party said in a statement. "This was a cross community vote in favour of remaining in the E.U. … This British Government has forfeited any mandate to represent the economic or political interests of people in Northern Ireland."

What an irony it would be if the Leave vote led the U.K. to break up before the E.U. does. But after a remarkable night and morning, that didn't seem beyond the bounds of possibility. Very little did.

For more on Brexit, you can read Anthony Lane on the run-up, Amy Davidson on the implications for Trump, Benjamin Wallace-Wells on the consequences for liberalism, and Ed Caeser on the vote in the M.P. Jo Cox’s district. Or you can look at Kim Warp’s (http://www.newyorker.com/cartoons/daily-cartoon/bonus-daily-cartoon-brexit) and Barry Blitt’s new cover.