I USED to think David Cameron suffered an ignominious end to his premiership. But it is nothing compared to what the history books have in store for Theresa May. Her failure is manifest and absolute.

Exasperated and staggered by her inability to explain her thinking on Thursday, the leaders of the other 27 EU nations effectively mounted a rescue operation to save the UK from its own Prime Minister.

To avoid the country stumbling over the cliff-edge of a no-deal Brexit on March 29, they moved the cliff.

If MPs pass Mrs May’s deal next week, the UK will have until May 22 to get its paperwork in order to leave the EU in an orderly farewell.

But if, as seems inevitable, they reject the withdrawal deal for a third time, Article 50 is only extended to April 12, at which point the UK and EU will need to have a serious chat.

The EU 27 leaders do not want, and do not want the blame for, a chaotic departure. So they have given the UK more time and more options to avoid it, designing a two-stage “flextension” so that MPs would need to actively embrace no-deal for it to happen.

Given most MPs are opposed, the likely outcome next week is rejection of Mrs May’s deal and a scramble to find consensus at Westminster, probably around a softer Brexit.

Putting that into practice would then require more delay, perhaps to 2020, with the UK obliged to take part in May’s European elections.

The other EU leaders would not be happy - they, like Mrs May, would prefer that the deal they all signed off was passed - but moving the cliff again is still better than no-deal.

Such a scenario spells doom for Mrs May. If she does not go willingly, her despairing MPs and ministers will force her out. A Tory leadership contest could well be the prelude to a general election.

The polls show the Tories ahead of Jeremy Corbyn’s Labour party at this stage. But it would be unwise to assume that would continue into a general election. It didn’t in 2017.

It is also hard to overstate the harm done to a party’s reputation by a government collapse. An election forced on voters by a Tory meltdown is no advert for re-electing Tories.

We will know how the wind is blowing on May 3, when the results of the local elections in England come in. Labour and the LibDems went backwards in 2015, while the Tories improved. I would not bet on that happening this time.

There are no elections here, but May 3 is also important for politics in Scotland. It is the opening day of the Scottish Tory conference, the moment Ruth Davidson is due to make her big comeback after six months on maternity leave.

The timing is exquisitely awful. Everything will be overshadowed by the English election results and Tory turmoil at Westminster.

If we are indeed into a longer Brexit extension, the event will have to become a campaign rally for a Euro campaign Ms Davidson’s party never wanted. Mrs May could already be out of Downing Street or working her notice. If she addresses the conference, it will be a wretched moment for activists. If not, her would-be successors may try to hog the limelight instead.

If they include Boris Johnson, who Ms Davidson openly disdains, it will underline the problems the Scottish Tories face because of the fighting and chaos elsewhere.

The nightmare scenario is a hard Brexiter like Mr Johnson or Jacob Rees-Mogg becoming the UK leader, both electoral poison in Scotland.

Ms Davidson’s hard-won progress and her hopes of becoming First Minister - already faint - would vanish in a puff of blond hair or to the tune of a lordling’s vowels.

Ms Davidson’s MSPs feel they have made a decent fist of things at Holyrood without her.

Deputy Jackson Carlaw has held his own at FMQs, and the party has made headlines by locking onto plans in the SNP-Green budget for a workplace parking levy.

As one MSP said: “The general view among Holyrood colleagues is that the less we talk about Brexit the better. The more distance we can put between ourselves and Westminster the better it is for us. We just want to keep out of it all.

“That’s been easier because Ruth has not been around to answer questions about where she stands.”

Ms Davidson has had a relatively ‘good Brexit’ simply by missing the worst of it. Her absence from frontline politics has insulated her reputation. But that is about to end.

When she returns, her opponents will work to ensure the stink of Mrs May’s Brexit sticks to her too.

Ms Davidson has given them ample ammunition. Her past cheerleading for the PM now looks as deluded as the PM herself.

In one of only a handful of tweets she sent in recent months, Ms Davidson said in December: “The Prime Minister has cojones of steel... She has my full support.”

There’s also her plug in the 2016 Tory leadership contest. “I can say without hesitation that I believe Theresa May is best placed to navigate the stormy waters ahead,” she boomed. Perhaps a little hesitation wouldn’t have hurt.

“It was remarkably prescient of her to have a baby when she did,” joked one senior Tory. “She picked the perfect time to be absent. Maybe she should get her maternity leave extended, like Brexit.”

Unlike Brexit, it’s not a bad idea.