In the end, the PM had little option.
Faced with an escalating crisis and ever-louder calls from his MPs that someone had to take responsibility for the Mandelson scandal, the PM's chief of staff, Morgan McSweeney, is gone.
Politics latest: Starmer reacts as chief of staff Morgan McSweeney resigns
It will be a bitter blow for Starmer, who had repeatedly said all week he had full confidence in McSweeney.
No 10 was trying to hold on to the PM's right-hand man, who had worked with Starmer from opposition, through the election campaign and into power.
As late as Sunday morning, cabinet minister Pat McFadden was saying that he did not think McSweeney should go over the Mandelson appointment.
Read more: From Svengali to sacked, who is Morgan McSweeney?
That the government changed course reveals the deep peril Starmer is in.
Faced with a chorus of anger from MPs that showed no sign of abating, No 10 offered a scalp.
The hope will be that Mr McSweeney's departure from the heart of the No 10 operation will go some way to satisfying some of his MPs who were demanding a reset.
?Tap here to listen to Electoral Dysfunction on your podcast app ?
Baroness Harman, typically a government loyalist, led the charge on our Electoral Dysfunction podcast when she warned the prime minister that blaming Mandelson for misleading him was not enough.
She argued that to save his premiership, he had to take responsibility by clearing out those who had advised Starmer to appoint Mandelson to Washington, embarking on a genuine programme to clean up politics as he promised in the manifesto and bringing forward action tackling violence against women and girls.
Former prime minister Gordon Brown, backing Starmer as a "man of integrity" on Saturday, said the situation was "serious" and suggested the Labour leader had been "too slow to do the right things" to clean up politics in the wake of the Peter Mandelson row.
This weekend, the PM has clearly heeded some of the unsolicited advice, but make no mistake that the departure of McSweeney comes from a position of acute weakness.
This is about a prime minister sacrificing his closest ally in No 10 in the hope that he can remain in post.
In the longer-term, it might only serve to weaken him further now that his key ally and fixer has gone. He has just lost the backbone of his operation.
There will undoubtedly be more blood-letting, and allies of McSweeney say he was one of a number of people to advise the PM on Mandelson's appointment - he provided advice but was not the one who made the decision.
McSweeney was a powerful force in the party, with a great many allies across the whole of government.
There will be anger from many that the man who masterminded the election win and got Keir Starmer into the Labour leader position and then into No 10 has been cut adrift.
As one former colleague of McSweeney texted me soon after the news broke, "[Morgan] was not just a brilliant colleague but a moral and decent man who supported his staff through thick and thin. The PM should have put this down as a mistake and rejected his resignation".
Read more:
Mandelson could be made to hand back 'five-figure' payoff
Gordon Brown on former ally Peter Mandelson
Senior Labour sources told me McSweeney had been wrestling with what to do over the weekend and was feeling "very down", but the decision became "inevitable" due to the "gravity of the situation".
McSweeney said in his resignation statement that he took "full responsibility" for advising the PM to appoint Mandelson.
"In public life, responsibility must be owned when it matters most, not just when it is most convenient. In the circumstances, the only honourable course is to step aside."
There will be some in his party who believe the PM cannot recover from this scandal, that it has gone too far to be repaired with the country and with the Labour Party.
McSweeney's departure will not solve that.
One minister told me after McSweeney's departure that the mood remained "frenetic" with MPs unsure how this would all play out, although the minister also thought it would "help Keir for a bit".
Starmer will attempt this week to enact advice from Baroness Harman and former PM Brown, with one No 10 source saying the PM "recognises the need for government to address the issues highlighted by the Mandelson revelations".
The PM instructed officials to move at pace to deliver on the PM's election pledge to "clean up politics", and will say more next week, starting with an address to his PLP on Monday night.
But one senior figure told me that the reset in No 10 and scale of change will have to be really significant if Starmer wants to hold on: "I don't think they appreciate how big a move will be needed to rebuild and stabilise the party."
What is clearer is that the No 10 operation is now in full-blown survival mode. But past experience shows that when that operation goes into freefall, it's near impossible to stabilise.
(c) Sky News 2026: Morgan McSweeney's exit shows No 10 in full-blown survival mode