Theresa May has ultimately persuaded all but two of her MPs to back her in the decisive vote in Westminster but she increasingly appears little more than a hostage to the warring factions in a bitterly divided Conservative party.

As the Brexit debate reached its fraught climax, she was holed up in the same House of Commons office, behind the Speaker’s chair, where she spent more than an hour last Thursday trying to convince David Davis not to resign.

Dominic Grieve and his fellow would-be rebels were called in, just moments before the key votes, and offered personal reassurances by the prime minister over what happens next if MPs reject the government’s Brexit deal.

That came after the embarrassing spectacle of government minister Robert Buckland effectively negotiating with Grieve, through a series of interventions in the rebel backbencher’s speech, in what Anna Soubry called “a peculiar sort of horse-trading” – and then literally negotiating with him, in whispered exchanges, as the debate went on around them.

It wasn’t the plan. Just hours earlier, Downing Street had signalled the prime minister had no intention of accepting Grieve’s compromise amendment to the EU withdrawal bill, tabled by the former attorney general and aimed at ensuring ministers can’t “crash out of the EU by ministerial fiat”, as he called it.

But the whips’ anxiety about the nail-biting parliamentary arithmetic increased significantly after the resignation of Bracknell MP Phillip Lee, who left his post on Tuesday morning to free his hand to vote against the government.

In the event, Lee also accepted May’s reassurances, and abstained, making his one of the most short-lived and least-glorious parliamentary rebellions of recent times.

So the government scraped through without a defeat – but not without paying a price.

Rebels said May had assured them the government would accept two parts of Grieve’s amendment; and immediately open talks on a third, “part c”, which would allow MPs to direct the government if no deal is reached by February next year.

As with last week’s set-to with Davis over the Northern Irish backstop, both sides of the Brexit culture war in the Tory party were almost immediately in dispute about what the climbdown meant – and who had won.

At the very least, Grieve and his colleagues have succeeded in throwing up a series of new parliamentary barriers to a no-deal Brexit.

The government would have to give MPs a vote on the next steps, if parliament rejects the Brexit deal – or if no deal has been reached by the end of November.

Since there is certainly no majority among MPs for no deal, which all but a hard core of Brexit ultras believe would be disastrous, that now makes no deal extremely unlikely.

A dispute quickly arose about the third clause of Grieve’s amendment, with Brexiters, including some ministers, quickly saying all that had been agreed was talks – and no government could agree to be “directed” by MPs.

Which side won on Tuesday will become much clearer in the next few days, when the government amendment is tabled in black and white. And if either side, placated rebels or suspicious Brexiters, believe they have been betrayed, they could yet seek revenge on their beleaguered leader.

And like so many other clashes in this hand-to-mouth hung parliament, Tuesday’s non-rebellion also had a wider significance.

The antagonistic tone of much of the discussion underlined how exasperated many MPs have become, about what Grieve called “the irrationality of the debate on the detail of Brexit”, turbocharged by the bellicose front pages of the rightwing newspapers.

And the fluidity of political loyalties in this fractious hung parliament was on clear display. The warmest congratulations for Soubry’s powerful speech came from backbench Labour MPs; while Matthew Pennycook, who led for Labour, couldn’t get through his speech without interventions from two grumpy MPs from his own party reminding him many of their constituents voted to leave.

With each day that goes by, these cross-party alliances are loosening the bonds of loyalty that bind MPs on each side of the house to their party, and their leader. And if the rebels, in alliance with Labour, could have defeated the prime minister today, they can do it again. Ultimately, they appear increasingly likely to corral her into a considerably softer Brexit than she first laid out – if she is allowed to survive that long.