(Bloomberg) — At 10:11 a.m., a devastated Theresa May walked back in through the black door of Number 10 Downing Street, with tears in her eyes.Once inside, she thanked her staff who welcomed her back with applause and then found her husband, Philip. The couple went through to the prime minister’s private study together for a few moments alone.For May, 62, it was the end she had dreaded but could no longer avoid. After three years battling the impossible contradictions of Brexit, she was resigning as U.K. prime minister, defeated at last.As Philip, her closest confidant and most important adviser, comforted May in her moment of distress, none of the aides or officials gathered inside No. 10 wanted to disturb them.In truth, they had known a day earlier that there was no hope left, and the prime minister famous for her stubborn resilience would have to resign.This article charts the final chapter of May’s undoing. Based on conversations with advisers, ministers, officials and others who asked not to be named, it reveals how a cabinet in disarray over Brexit policy finally came together to oppose the prime minister’s last desperate plan.Less Than a WeekThe walls began to close in around the British prime minister almost exactly a week earlier. At 10:39 a.m. on Friday May 17, news broke that Labour’s Jeremy Corbyn was pulling out of cross-party talks with the government. May had wanted to reach a consensus with Labour on a way forward, after her Brexit divorce deal had been defeated three times in Parliament.Unless she could get her deal past a vote in the Commons, Britain would have to choose between leaving the EU in October without an agreement to cushion the impact on businesses, or canceling Brexit altogether.But Corbyn ran out of patience. The negotiations have “gone as far as they can,” he wrote in a letter to May. “The increasing weakness and instability of your government means there cannot be confidence in securing whatever might be agreed between us.” Even May’s allies knew Corbyn had a point.More than 30 ministers have quit or been fired from May’s administration. Many resigned in protest because they disagreed with her Brexit strategy. May herself faced crisis after crisis, and promised to stand aside in an attempt to persuade her own party to keep her as leader for a little longer.Bacon RollsOnce Corbyn pulled the plug on the talks, May was in desperate trouble. Her team spent the weekend trying to work up a “bold” new offer to put to Parliament to tempt Labour politicians to back her. May needed to finish drafting the law that would enshrine her exit deal in statute — the Withdrawal Agreement Bill — in time to put it to a crunch vote in the first week of June.Most of the work had been done by Monday night. But May had one massive obstacle to clear: her own cabinet.She called a meeting of her most senior ministers for Tuesday, to thrash out how the government would respond to the collapse of the cross-party talks.For ministers in May’s cabinet, Tuesday mornings usually begin with bacon rolls inside her Downing Street offices. The premier has made a habit of feeding her top team a hearty snack before they all sit down to a political discussion. Then they move on to the main meeting, when civil servants arrive to take a record of the government’s formal decisions. This time, there was no political chatter and no bacon. Only coffee and biscuits were served.In sober tones, May talked through the options with her ministers. One idea stopped the discussion dead. The government needed to break the deadlock in Parliament, May argued, and must test the appetite for a second referendum on Brexit.Tipping PointEuroskeptic ministers such as Andrea Leadsom, Chris Grayling and Michael Gove were horrified when May suggested leaving it up to individual MPs to decide in a “free vote” whether to support another plebiscite or not. May was proposing not to order Tories to vote against a referendum she has always said would undermine democracy.To pro-Brexit ministers gathered around the coffin-shaped cabinet table, this was madness. It would be seen as a grotesque betrayal of every promise the government has made, they said. Why was Labour Party policy — including the idea of a customs union with the EU — now suddenly part of a draft government law, they asked.Tory chairman Brandon Lewis was the last to speak. He told the meeting the referendum plan would enrage the party’s grassroots members, and any MP who voted for it would face a huge backlash from their local Conservative association.Read more – Why Britain Voted to Say ‘Adieu’ to the EU: QuickTake“It was just insane,” one person familiar with the discussion said in the hours afterwards. Even pro-EU ministers such as Business Secretary Greg Clark wanted the Bill postponed.When the meeting broke up, the Brexiteers believed they had carried the day and that May had accepted she could not push ahead with the referendum option, or the customs union that Labour had asked for. Three and a half hours later, they were shocked for a second time.Did She Mean It?In a speech at PwC’s officers near the Thames embankment, a short walk away, May promised Parliament a vote on whether to call a referendum to ratify the terms of the deal.At first, some pro-Brexit Tories believed the premier had made a mistake. The speech was written at short-notice, they reasoned. She can’t have meant what she said.But for Steve Barclay, May’s Brexit Secretary, confirmation of his worst fears came later that night. He received a copy of the bill at about 10 p.m. Tuesday and instantly knew there was a problem. Barclay, who was responsible for steering the law through the Commons, was being asked to sign off on it. By Wednesday morning, he concluded he couldn’t.In the hours that followed, other ministers were called into a private government reading room to be shown the legal text of the draft law. One by one they decided the bill must be killed.To Stop MayLeadsom, 56, the Leader of the House of Commons, convened a meeting of her concerned colleagues in her ornate private office behind the Speaker’s chair in Parliament. From about 11:45 a.m. onward, a rolling discussion began over how to stop May going ahead with her legal promise to legislate for a referendum if MPs vote for one.It wasn’t the first time Leadsom had led the revolt. In meetings over slices of pizza, she had coordinated a campaign against some of May’s previous Brexit policies from inside the cabinet. On Wednesday, there wasn’t time to order food. Those discussions involved eight ministers including Barclay, Gove and Grayling, who was in touch from Germany.The meetings ran on beyond midday as ministers discussed whether they should all resign at once. That made Leadsom 30 minutes late for prime minister’s questions in the Commons chamber. The weekly question and answer session was grim for the premier. She received none of the usual noisy support from Tories on her own side and the chamber emptied as she updated them on her latest Brexit plans. The collapse in her authority was plain to see.Quitting by TwitterRumors swirled around Westminster that May was about to make a statement. Some believed the prime minister would quit that evening.Meanwhile, deep inside Parliament, the secretive leaders of the Conservatives’ 1922 Committee met to discuss ways to force May out. They summoned her Chief Whip Julian Smith, who stayed for just two minutes, and had little to say beyond promising them a meeting with the premier Friday.At just after 7 p.m., Leadsom picked up her mobile phone and rang May. The pair spoke for 10 minutes, but the premier could not persuade her colleague to stay. As soon as Leadsom hung up, she pressed the button on a tweet announcing her immediate resignation to the world. May’s team had no chance to take control of the narrative or draft a response.‘Such a Concession’“I do not believe that we will be a truly sovereign United Kingdom through the deal that is now proposed,” Leadsom wrote in her letter to May. “I have always maintained that a second referendum would be dangerously divisive, and I do not support the government willingly facilitating such a concession.”The sun shone Thursday morning when voters across the U.K. went to the polls in the European Parliament elections. The very fact that these elections were happening at all was a painful reminder to May of her failure. The country should have left the EU on March 29 but instead was no closer to honoring the 2016 referendum result, despite three years of trying.May knew by then that she would have to go. There was no way she could get her bill through the cabinet, never mind Parliament. That morning she told her closest allies she would announce her resignation the following day.She traveled with her husband to vote in Sonning, the affluent village west of London where they live. Frank conversations with Home Secretary Sajid Javid and Foreign Secretary Jeremy Hunt merely confirmed the inevitable.On Friday morning May first met Lewis, the party chairman, and then Graham Brady, the chair of the 1922 Committee, who was representing Tory MPs. She told them of her plan to stand down as leader on June 7, with an election to choose her successor starting the following week. The prime minister was composed, though others around her felt the emotion of the occasion.When May stepped outside to make her resignation statement just after 10 a.m., some in her team were already on the brink of tears. By the time she finished, May herself was overwhelmed.“I have done my best,” she said. “I will shortly leave the job that it has been the honor of my life to hold – the second female prime minister but certainly not the last. I do so with no ill-will, but with enormous and enduring gratitude to have had the opportunity to serve the country I love.”Read More:Secrecy, Suspicion and Stumbles Catch Up With Theresa MayGaffes, Duplicity and Ballots: How the Tory Party Picks a LeaderBoris Johnson as U.K. Prime Minister Is the EU’s Worst NightmareTheresa May’s Economic Legacy Disfigured by Brexit FalloutA No-Deal Brexit Is Back on Table: Five Things You Need to KnowBrexit Is Delayed and the Drama Is Just Starting: QuickTakeIf You’re Wondering How Hard a ‘Hard Brexit’ Could Be: QuickTake(Adds detail.)–With assistance from Jessica Shankleman and Kitty Donaldson.To contact the reporters on this story: Tim Ross in London at firstname.lastname@example.org;Alex Morales in London at email@example.comTo contact the editors responsible for this story: Flavia Krause-Jackson at firstname.lastname@example.org, Emma Ross-Thomas, Robert JamesonFor more articles like this, please visit us at bloomberg.com©2019 Bloomberg L.P.