On Wednesday Britain will change Prime Ministers for the third time this century, nine weeks ahead of schedule.

The battle to succeed David Cameron was, uniquely, being fought between two women, experienced Home Secretary Theresa May and Andrea Leadsom, a relatively junior energy minister. Leadsom shocked her party by suddenly pulling out on Monday afternoon, only four days after a final ballot of Conservative members of parliament (MPs) had whittled down the contest to this final pairing. The Conservative Party’s membership was supposed to take the summer to decide whether to choose May, viewed as a safe pair of hands, or opt for a fresh face in Leadsom.

It was the latest day of drama in what has been one of the most tumultuous periods of peacetime politics in U.K. history, following the country’s shock referendum vote to leave the European Union on June 23 – a decision that forced Cameron to resign, barely a year after he had won the general election. “Nothing surprises me in politics after the past few weeks,” says Graham Brady, a Conservative MP and chairman of the party’s Private Members Committee — a powerful group of Tory backbenchers known informally as the ‘1922 Committee’ which plays a key role in how the party’s leader is chosen.

It was Brady who Leadsom called Monday morning to say she was pulling out of the leadership contest. Although she had comfortably survived an elimination process that had reduced the number of candidates from five to two, she was well behind May. The Home Secretary had the support of 199 MPs, more than double Leadsom’s total of 84.

“It was clear to me that she had been reflecting on her position since the result of the ballot on Thursday, which had shown overwhelming support among her parliamentary colleagues for Theresa May,” Brady tells TIME. “She was very exercised about a speedy resolution to provide the stability the country needs.”

Leadsom had carried the hopes of the so-called ‘Brexiteers’ having campaigned to leave the E.U. and becoming a star of the campaign, performing well in televised debates. May backed Cameron’s pledge to remain in the E.U., but, as a natural Euroskeptic, had been fairly silent during the referendum.

She suffered a blow to her credibility on Saturday though, when she appeared to suggest in an interview with the London Times that she would make a better prime minister than May because unlike her rival she was a mother, and therefore more invested in the future. A furious Leadsom condemned the journalist’s interpretation of her remarks, though the recording showed the quotes were accurate. It has since been speculated that the furore sparked Leadsom’s decision to exit the race, although a source close to her insists this had “fired her up” and nearly convinced her to plough on.

But Leadsom was already minded to concede victory to May, the source says, because she felt party grandees were briefing against her in a “ruthless” campaign to make sure the establishment candidate won. Leadsom and her family had suffered “an absolute barrage from people who really should know better”, the source continues, which had included allegations that she had exaggerated her career in London’s financial district on her resumé.

There was also the concern that Leadsom could win a majority of Conservative members, yet not command the support of her Parliamentary colleagues. The Labour Party opposition has found itself in this very situation under the hard left Jeremy Corbyn, who, as a result, is facing a leadership challenge from former shadow business secretary Angela Eagle.

Leadsom spoke to Tim Loughton, her campaign manager and friend of 35 years, on Sunday evening to say she would withdraw. Meanwhile, May was preparing an official leadership launch speech on the economy for Monday morning in Birmingham.

In the two weeks since the Brexit vote, May had made fewer public statements than her rivals and instead sat back and watched them implode. Housing Minister Brandon Lewis, a supporter of May, said the Home Secretary is uninterested in the kind of frantic Westminster politicking that ensued after the Brexit vote. “Theresa doesn’t get caught up in the games that other people get involved in,” he said. “She’s very clear that she has a job to do on the economy and stability.”

On Monday, rumors of Leadsom’s decision started circulating among the press at around 10.30am local time. News reached May’s team after journalists contacted her loyalists for comment.

The news broke on Twitter at 11.30am. May supporter James Cleverly tells TIME he was in a meeting of MPs from Essex, the part of the country he represents, when he noticed his colleagues were distracted by their phones and watched the story unfold online. His first reaction was relief that a grueling leadership contest had been averted, he says. “I was sad for Andrea but pleased that uncertainty was coming to an end,” he says.

Leadsom made a public statement confirming her withdrawal at 12.15pm, wishing May “the very greatest success.” Within hours, Cameron confirmed he would leave Downing Street on Wednesday evening. Even veteran politicians were shocked at the pace of events: Conservative MP Nigel Evans said he was “gobsmacked.”

Commuting back to London after her Birmingham speech, May was miles away from the events that had brought her to the cusp of power: she was unable to address her cheering MPs outside Parliament until nearly 6pm.

The Prime Minister-in-waiting will now turn her attention to the formation of her Cabinet, with some experts predicting she will move Chancellor George Osborne to foreign secretary. The new prime minister will also set up a Brexit unit to formally untie the U.K. from the E.U; rumors suggest former shadow Home Secretary David Davis will lead it.

May was recently described by Tory party grandee Ken Clarke in an unguarded moment as a “bloody difficult woman,” and she has taken it on as a badge of honor — especially when it comes to dealing with the E.U. May is preparing to face down European Commission president Jean-Claude Juncker to make sure the U.K. gets the best possible trade deal when it leaves the bloc. May has already said, though, that she won’t rush negotiations: Article 50 of the Lisbon treaty, which formally triggers a two-year process of withdrawal, won’t be invoked until next year.

That may come as a rare pause after this breathless summer of U.K. politics.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Mark Leftly at mleftly@yahoo.co.uk.