London(CNN) Theresa May has suffered many rebellions and humiliations over the last few months, but on Monday night she sustained what could be the blow that finishes off her premiership -- when she finally lost control of Brexit to Parliament.
The question the UK prime minister now faces is: What does she do to win it back?
Her actions over coming days will decide whether she succeeds in taking back control, as well as shape the future of the UK.
On Wednesday, May will have to watch Parliament vote on a series of options as it attempts to come up with a Plan B for Brexit, after decisively rejecting the prime minister's own deal on two occasions.
There are likely to be votes on softer versions of May's deal, including whether the UK should stay in a customs union with the European Union, and on whether Britain should hold another referendum to decide if it does want to leave after all.
Both of these options are hated by Euroskeptic Brexiteers in May's Conservative Party, whose opposition to her plan ultimately sunk it before it even reached Parliament.
May's future depends now depends on her erstwhile enemies, however. As they faces the possibility of Parliament supporting a softer Brexit than suggested by May, the arch-Brexiteers in the European Research Group may decide this is the moment they must back May's deal as the best of a bad bunch.
While May was severely weakened this week, she retains some power over the process going forward.
It is she who has the power to travel back to Brussels for further talks with EU leaders, and it is she who can decide whether the indicative votes Wednesday evening are just that, indicative rather than binding.
On Monday, the government issued a statement condemning Parliament's approval of indicative votes, warning that it sets a "dangerous, unpredictable precedent for the future."
Yet it would be politically and morally damaging to her reputation if she completely ignored the will of Parliament at this late stage in the Brexit process, having largely dismissed the views of lawmakers up until now.
Nor is May's own deal necessarily doomed. the prime minister could, in theory, get EU leaders to back a new consensus softer Brexit deal put forward by the Commons, and use that as leverage to win over more Brexiteer votes and the Northern Irish Democratic Unionist Party (DUP), upon whose support May's government relies, for her original plan -- nearly five months after it was struck in Brussels.
Yet this strategy is high risk. On Monday, some Brexiteer Tory lawmakers insisted they would never vote for May's deal, regardless of the offer on the table. Others, like ERG chairman Jacob Rees-Mogg and former Foreign Secretary Boris Johnson, appear to be on the verge of backing May's plan. The prime minister is close to victory, despite her humiliating defeat last night.
That victory may be a pyrrhic one. There are senior Brexiteers who remain adamant that, in exchange for their votes, the prime minister must set out a timetable for her departure, perhaps after the new Brexit day of May 22 (agreed with Brussels last week, providing May's deal passes).
On Sunday, May refused to entertain this scenario, but it may be, after events this week, she has little choice.
While seeming on the verge of collapse, the success of May's deal has become a viable option once again.
But other, more stark outcomes remain strong possibilities. While British lawmakers have voted against a no-deal exit, and the EU has made clear its own opposition to such a potentially disastrous scenario, there still needs to be an affirmative vote in Parliament this week to approve the extension of the Brexit date and avoid the UK crashing out with no arrangements in place.
A second referendum might also still be on the cards, given the renewed momentum for that campaign after hundreds of thousands of people attended a march demanding a new vote in London over the weekend.
There is also a chance, small but not insignificant, that a general election is called as a way to break the ongoing stalemate in Parliament.
Whichever scenario comes to pass, it is increasingly likely that, having lost the trust and confidence of so many lawmakers, and relinquished control of Brexit to Parliament after several disastrous months, May will have to stand down as prime minister.