You can identify the high point of Theresa May’s prime-ministerial tenure at just a few minutes before 10 pm on June 8, 2017. It was Election Day, and her Conservative Party was expected to trounce Labour. She had called the election holding a 21-percentage-point lead against a hopelessly riven Labour Party led by the left-winger Jeremy Corbyn. A resounding victory would give her room to maneuver as she negotiated Brexit with the European Union. She had run an awful campaign, but the dead weight of received wisdom still favored her without reservation or equivocation. With the polls scheduled to close at 10 pm, the pundits ran their mouths assuming no risk to reputation. “As exit poll looms, I repeat my prediction: Conservatives to win by 90-100 seat majority,” TV personality Piers Morgan tweeted at 9:53. At 9:57, Steve Hawkes, the deputy political editor of The Sun, wrote, “Rumour Tories could be looking at 400 seats.”

At 10:01 pm, the first exit poll revealed that May had lost her majority and would have only 317 seats. Since that night—when she lost control, authority, and the plot—the nation has been waiting for the other shoe to drop as she stumbled from crisis to crisis. Some were self-inflicted, while others were imposed by her party in a relentless display of artless ineptitude. Her days were numbered; we just weren’t sure what the number would be. On Friday, May 24, she put us all out of her misery, announcing that she would resign as head of the Conservative Party on June 7.

The two main things to understand about May’s departure can be gleaned from that night. The first is that it was ultimately precipitated by Labour’s left turn and the hubris of the political and media class that underestimated it. May had inherited a slender working majority from David Cameron that would have been sufficient to get her EU deal through. The only reason she gambled it by calling a snap election is that she believed it really wasn’t a gamble. The assumption that Corbyn’s Labour would go down to historic defeat was so entrenched that it was not even understood as an assumption. It was simply a fact waiting to happen.

Not only did Labour’s realignment prove to be more popular than anyone—including Labour—had guessed; it reconnected the Labour leadership with its base, making the party more electorally viable. Though that synergy has since been strained by Brexit, Labour currently enjoys a 10-point lead over the Conservatives. It is in no small part the prospect of a Corbyn government, with its redistributive agenda, that has kept the Tories clinging to office. In December, a third of May’s own party tried to get rid of her. When they failed and Labour tried to push her out a month later, the Conservative Party backed her. The last thing the Tories wanted was a general election in which Labour might win. This is still true, and as fractious and fratricidal as the forthcoming leadership contest will be, one can expect Conservatives to close ranks once it is over. Tories remain fearful of the “bearded Marxist” waiting in the wings.

The second thing to understand is that May remained in place for so long because the Tories could not come up with a better idea. She spent the last two years trying to unite her party. She failed, apparently unaware that there is a stubborn, radical core among them who could never accept even the smallest compromise. (Think the Tea Party and Obamacare.) Her Brexit deal, agreed with the European Union, was rejected by Parliament three times. The trouble is that Parliament rejected all the alternatives too. The Tories regarded May as the leader best positioned to fail at the task before allowing someone to carry on with clean hands so that they can claim betrayal. She was ousted after one concession too many upset the delicate balance of interests that had kept her in situ. But we should be under no illusions that whatever comes next will be better, more coherent, or more consensual.

Recent European Parliament elections delivered the highest vote to the hard-right Brexit Party—newly formed by former UK Independence Party leader Nigel Farage to usher in the most extreme Brexit possible—and dropped the Conservatives to fifth place behind the Greens, who had their best result in decades. The Brexit Party favors leaving the EU without a deal, which could cause untold damage to the economy. Tories will be desperate to prevent any further hemorrhaging of their base, which will likely mean that whoever takes over from May will have to be even more right-wing.

But just as Labour’s lurch to the left exposed a fundamental rift between its membership and its parliamentary representatives, so does the Conservatives’ forthcoming shift to the right. The parliamentarians, who overwhelmingly preferred to remain in the EU, get to short-list the top two candidates, who are then put to the members. Many Tory MPs are wary of Boris Johnson, the buffoonish, roly-poly blowhard who was foreign secretary before resigning over May’s proposed deal. They know him as an opportunistic, gaffe-prone self-promoter. If he makes the top two, as current polling suggests, the members would back him; if the MPs don’t short-list him, then the party’s decline could continue.

But whoever takes over will inherit this shattered party without a parliamentary majority and with the task of either keeping the party together and ruining the country or risking a Corbyn government.

May is going, but the Brexit crisis that made her premiership both possible and untenable not only remains but has intensified. One of the most common refrains throughout her premiership was “How bad can this get?” Now that she’s leaving, we’re about to find out.