A tumultuous day at Westminster leaves Sir Keir Starmer facing the greatest threat to his leadership yet; but it also presents a major challenge to his most dangerous rival. Andy Burnham does, after all, have a route back to parliament and with it a way to challenge the prime minister. But it is a route paved with thorns that might yet end with Burnham’s hopes in tatters.

The mood in Downing Street rose and fell with the day’s news. Spirits soared as it seemed that Wes Streeting had pulled back from the brink and would not be launching a challenge to Starmer — then promptly dropped again when the health secretary resigned his cabinet post. Streeting’s arguments are ones that should by now be familiar to everyone: that this government suffers from a “vacuum” at the centre, a Keir Starmer-shaped hole where a prime minister should be.

But No 10’s spirits recovered as it became clear that none of Streeting’s fellow Blairites was going to join him in taking the plunge. His letter of resignation — in which he did not trigger a leadership contest but called implicitly for Andy Burnham to be allowed back into Westminster by standing in a by-election — was an elegant way of presenting Streeting’s weakness as strength. But at the time the prospect of a Burnham return seemed unlikely because his team had not yet identified an MP to stand down and make way for the Manchester mayor.

No longer: Starmer’s mood will have cratered after Josh Simons, a former minister and one-time Starmer ally (albeit a politician known to have grown closer to Burnham since his departure from government) announced late on Thursday afternoon that he will stand down in order to create a vacancy.

A source of consolation to Starmer’s allies had been Burnham’s visible difficulty in finding a seat to contest. Long-term friends and enemies alike in Greater Manchester and across the north west rebuffed him. One, Marie Rimmer, went so far as to pre-emptively endorse Starmer in a leadership contest. But now Burnham has the opening he needs.

The right to stand in the by-election is within the gift solely of the party’s national executive committee. And Starmer’s waning powers mean that he cannot block Burnham’s candidacy as easily as he did ahead of the Gorton and Denton by-election in February.

But the Makerfield constituency on the outskirts of Manchester is far from a guaranteed path back to parliament for Burnham, even if Labour’s procedural hurdles can, as looks likely, be overcome. Nigel Farage’s Reform UK finished almost 30 points in front of Labour in the local elections there this month and, while Burnham has always run ahead of his party in his mayoral city region, it will be a tough fight even assuming he can maintain that level of popularity. The man the polls say is Labour’s best hope may yet find that his prime ministerial ambitions end in Makerfield.

If he can win, however, then Burnham’s reputation as the man who can block Farage will only be enhanced, and his march to the leadership he has coveted for so long would then surely be unstoppable.

For Labour, too, the stakes could not be higher. If Burnham cannot win in Makerfield, it is far from clear that any Labour candidate can. Burnham’s defeat would secure Starmer as prime minister: but it could well confirm that he is on course to be Labour’s last one.

stephen.bush@ft.com