While the situation looked bleak over the weekend, it was only on Monday morning when Humza Yousaf made up his mind to go.

The only route through this week's votes of no confidence was to agree a deal with Alex Salmond’s Alba.

Though their demands may have been reasonable it was a pact that would have been utterly unpalatable for many in the SNP.

Nevertheless, Mr Yousaf spoke to the party’s Holyrood leader, Ash Regan at around 7.30am.

There was a deal there, Alba says, but it was blocked, not by Mr Yousaf, but by what Mr Salmond described as “forces” within the SNP, the party’s “old guard.”

READ MORE: Tearful Yousaf announces his resignation as First Minister

It was never really a goer, according to SNP sources.

Any agreement would never have had the support of all of his ministers, never mind his backbenchers.

They may have held their noses for this week’s confidence votes, but the prospect of ceding any power to the former first minister would have fatally undermined Mr Yousaf’s leadership.

He would need to find a majority every time he wanted to pass a budget, pass legislation. It would never have been a one-time agreement.

"I am not willing to trade my values and principles or do deals with whomever simply for retaining power,” Mr Yousaf told the hurriedly organised press conference in Bute House.

There was also, in that resignation speech, an admission that he had mucked up last week. It was the cack-handed manner in which he sacked the Scottish Greens from the government that ultimately led to this point. 

“I clearly underestimated the hurt and upset that caused for Green colleagues,” he said.

"For a government, let alone a minority government, trust and working with the opposition is clearly fundamental.”

The Greens had been clear over the weekend, that their problem was not with the SNP or the Scottish Government but with Humza Yousaf.

There were two confidence votes due to take place. The first was on Mr Yousaf as First Minister, the second was on the Scottish Government.

The Greens could not support Mr Yousaf and they could not support a Scottish Government run by Mr Yousaf.

Now that he’s going, they have will not support either of those motions.

READ MORE: Humza Yousaf could have survived but he shot himself in the foot

Which is just as well, as Mr Yousaf is in no hurry to leave. The SNP is in no hurry to replace him.

He will stay on as First Minister until the party holds a leadership contest.

The ruling NEC will meet at some point this week to discuss the timetable.

Last year’s vote took the best part of six weeks with more than ten hustings. Sources suggest the body may want a far more compressed timetable given the looming general election.

A lengthy and bitter contest is the last thing the party wants when they are trying to see off a resurgent Labour.

The Herald:

One way to avoid that is for the position to be uncontested. There is already talk of the party moving to crown John Swinney.

He himself said he was giving the position “active consideration” but would need to consider the toll it would take on his family.

However, his coronation is not quite assured.

SNP MP Joanna Cherry said it would be a “backwards” step.

“The next leader must deliver change,” she added.

Mr Swinney was last in charge two decades ago before the “men in grey kilts” forced him out after a slew of poor results.

Kate Forbes has made clear she is interested in the job, though she probably wasn’t expecting the vacancy to come around again quite so quickly.

Sources last night said it was very early but that she was considering a run.

Last year, despite a chaotic and bruising campaign, she ran Mr Yousaf far closer than many predicted, winning 48% of the vote to his 52%.

Some in the party believe Mr Swinney’s time in Bute House could be temporary, that he would hold the reins until after the next general election or even until after the Holyrood election in 2026.

Once that’s out the way, then the party could have the dog fight, with Neil Gray, Jenny Gilruth, Màiri McAllan and Stephen Flynn throwing their hats into the ring.

Even if he is only in Bute House until 2026, he’d still be in office longer than Humza Yousaf.

"Politics can be a brutal business,” the outgoing First Minister said in his speech. “It takes its toll on your physical and mental health, your family suffer alongside you.”

It was here he broke down. "You are truly everything to me” he said to his heavily pregnant wife, Nadia.

“And although of course as you can tell I'm sad that my time as First Minister is ending, I am so grateful and so blessed for having the opportunity that is afforded to so few: to lead my country. And who could ask for a better country to lead than Scotland?”

READ MORE: UNSPUN Humza Yousaf throws the baton down and runs for the hills

Outside Bute House a crowd gathered. Some were well-wishers. Others were not. 

Dugald from Edinburgh was out with the dog. He’d been in Charlotte Square when Mr Yousaf had moved into the official residence.”I’m just completing the circle,” he said.

“I think what the country needs is a greater focus on the economy, and then the cost of living and all of these other things.”

The Herald:

“I'm not so sure it's going to make a difference if another member of his party takes over,” Caroline from Moray said.

"They've held power and I don't see any benefits. I think the roads are a mess. The bins are never emptied.”

“I don't know that there'll be a radical change with a new leader. I think it's a new government that we need, not just in Scotland but the whole of the UK,” she added.

“I don't know if it'll make much of a difference if we get someone else in apart from Humza because they're going to have to be beholden to the greens for the current government to survive,” Anne from Edinburgh said. “I'm ex SNP. I used to campaign for the SNP. No longer.”

Karen, who also lives in the capital disagreed. “It's a sad day for Scottish politics,” she said. “It's sad because he was brought down by minority parties but also aided and abetted by Tories and Labour.

“That's not the Scottish people voted for. They voted for consensus politics. That doesn't seem possible.“