His authority stretched to snapping point, the prime minister saved himself from free fall on Tuesday night after winning the vote on his emergency Rwanda legislation with a majority of 43.
All day there were whispers of it being on a knife edge and that it might only scrape through.
When MPs representing the five Tory groupings on the right of the party said they’d advised members to abstain, it was a nervy moment.
Politics latest: Follow vote fallout live
In the end, 37 MPs abstained – and the prime minister won the day.
Anything else didn’t bear contemplating: a loss at second reading – where MPs debate the principle of a piece of legislation, rather than the nuts and bolts of a bill – is extremely rare: the last time it happened was to Margaret Thatcher nearly 40 years ago over Sunday trading laws.
There is no doubt huge relief tonight in Downing Street as Rishi Sunak’s Christmas nightmare turned into a Christmas reprieve.
Rishi Sunak wins Rwanda vote: What happens now?
How did your MP vote on the Rwanda bill?
Tory rebels to meet one last time to decide whether to back or derail Rishi Sunak’s Rwanda plan
His supporters have their tails up, with Damian Green, the chair of the One Nation group, telling me that the majority showed the prime minister didn’t need to amend this bill for it to live.
His message to the prime minister was to face the rebels down and keep the legislation as it is.
“We are backing the bill at this stage, but we would not support any amendments that push it further that may threaten the legality of the bill,” he said.
“We [the One Nation group] had a sober discussion, we’ve got concerns about this bill, but we want to get behind it and get behind the prime minister so he can get the bill he has proposed through without any amendments.”
But, on the other side of the party, the message from right-wingers as the House of Commons cleared out was clear.
Mark Francois, the chair of the ERG Brexiteer group, told me simply that MPs were willing to take the prime minister at his word and would be amending the bill – wait for the Bill Cash amendment – in the New Year.
He was adamant when I suggested he didn’t have the numbers to vote the prime minister down (always my job to be devil’s advocate) that they did.
“We are not supporting the bill, the bulk of us will abstain. I’ve done this for a few years, and you never predict the numbers before a vote,” he said.
Please use Chrome browser for a more accessible video player
Another senior rebel figure put it like this: “This bill has been allowed to live another day. But without amendments, it will be killed next month. It’s now up to the government to decide what it wants to do.”
To put it another way, this could very much prove a pyrrhic victory come the New Year: the prime minister has won this battle, but the deeper civil war in the party over what to do about Rwanda will rage on, and when this when it comes to who will triumph, all bets are still off.
That’s because many of those on the right of his party have held their noses and either walked through the voting lobby with the government or abstained, while making it crystal clear to the prime minister and the whips that they expect meaningful amendments to be made.
Robert Jenrick, the former immigration minister who resigned over the bill, spoke for many of the rebels on Tuesday when he outlined the two biggest stumbling blocks he saw in the emergency bill.
First, that the bill doesn’t address the issue of individual claims which he argues will lead to a delay of legal appeals, delay removal of asylum seekers and clog up the courts.
Second, the bill doesn’t make it clear enough that the government will ignore rulings from the Strasbourg courts – known as section 39 measures – for flights to be delayed.
Read more politics news:
Keir Starmer defends serving under Jeremy Corbyn
Climate minister Graham Stuart making 6,313-mile round trip by plane
Please use Chrome browser for a more accessible video player
He, and other MPs, think in the end ministers will adhere to these orders because failure to do so will be a breach of international law – something the prime minister says he’s not prepared to do.
Many of those minded to abstain or vote against on Tuesday were peeled off by a prime minister who went into overdrive to get his bill past the first hurdle.
There were bacon butties in No 10 with the right-wing New Conservatives at 7.30am.
He then settled in at his office in parliament, meeting with the One Nation caucus in the afternoon and having one-on-ones with MPs minded to rebel.
The charm offensive has worked for now, but the issues raised by Mr Jenrick still stand and MPs expect changes.
Click to subscribe to the Sky News Daily wherever you get your podcasts
Meanwhile, the One Nation caucus’s warning that it will only support this bill if it isn’t amended further, and you can see the rub.
One very senior Conservative sitting in the centre ground of the party, who has been battered by Brexit wars, says the prime minister can face down the rebels, but asks whether he has the guts to stand his ground.
One test passed tonight. It will only get harder.