This afternoon Theresa May mocked Jeremy Corbyn’s claim he would be prime minister by Christmas: “Well, he was wrong; I am.” It is not much of a claim to greatness. But she is still Prime Minister and none of the people who want her job, in her party or in the opposition, have succeeded.

She is tough. She lost her majority and kept her job. Stripped of her authority and her unusually powerful political advisers, her joint chiefs of staff Fiona Hill and Nick Timothy, she promoted her old university friend Damian Green to First Secretary of State to run her machine.

He kept the show on the road, with a huge capacity for the work of cabinet committees and an ability to get on with other ministers. So when it was alleged that he made inappropriate advances towards a young Conservative journalist, the Prime Minister didn’t want to lose him.

And when the allegation prompted retired police officers to go public with claims about pornography found on his Commons office computer, the instinct was to close ranks against what appeared to be a politically motivated grievance from nine years ago.

May’s toughness really showed when the inquiry she asked for found that Green had twice made misleading statements suggesting that he had not known about the pornography claims. As her exchange of letters with Green makes clear, he didn’t want to go – but she insisted: “I asked you to resign from the Government and have accepted your resignation.”

This was prefaced with a declaration of undying friendship “from our early days at university”, which only goes to underline the steeliness of her resolve. His grudging reply – “I regret that I have been asked to resign from the Government” – could be a warning of trouble to come. Remember that it was Geoffrey Howe, for a long time one of Margaret Thatcher’s closest allies, who finally did it for her.

The big question is who will manage the Prime Minister’s business now. Green operated by chairing cabinet committees, or deputising for Theresa May as chair: a role essential to driving forward the machinery of government. It has worked better than the ultra-centralised model operated by May’s chiefs of staff before the election, but now she will have to find another manager or managers of her business.

It is possible that she won’t make an appointment straight away. It is Christmas after all. She may bring in a junior cabinet minister for the Cabinet Office, a progress-chaser in the role played by Oliver Letwin for David Cameron. But the interesting question is which of the senior cabinet ministers would become “deputy prime minister in all but name”, as Green liked to refer to himself.

Amber Rudd comments on Damian Green allegation and whips' culture in Westminster harassment scandal

Amber Rudd, the Home Secretary, would seem to be best placed for that role. She could deputise for May at Prime Minister’s Questions but, as the Secretary of State for a large department, she would probably not have time to take Green’s role at the heart of the government machine. It looks as if the infrastructure of decision-making around the Prime Minister will have to be rebuilt a second time in a premiership that is still only 18 months old.

Still, now is as good a time to drop Green as any. Theresa May has delayed making the decision about her friend’s fate until the last moment, and she has stabilised her premiership for the time being. As she boasted to Corbyn at Prime Minister’s Questions, the Budget wasn’t a failure. It’s a low bar, but it’ll do. And she has succeeded in breaking through to the second stage of the Brexit talks, so she ends the year with the relative stability of not being in chaos and disorder.