It’s been a busy week in Scottish politics.
Last Friday Humza Yousaf told STV News he would not resign, and pledged to fight for his job and win.
By Monday morning he had changed his mind and announced he would quit as the country’s leader.
Come Tuesday, the Conservatives had withdrawn their no-confidence motion against Yousaf – which they say caused his downfall – and by Wednesday Labour’s motion of no-confidence in the entire government failed.
On Thursday it became clear – if it wasn’t already – that John Swinney would replace the First Minister.
He launched his SNP leadership bid in the morning and by the afternoon had already been endorsed by Kate Forbes – thought to be his main leadership rival.
So what happens next?
Nominations for the SNP leadership will close on Monday at noon.
If Swinney remains the sole candidate for the job he will automatically become leader by 12.01pm.
At that point, Yousaf will formally resign as First Minister and MSPs will have 28 days to elect a new one. If they fail Parliament will be dissolved and an election will be held.
The process from SNP leader to first minister though is expected to be the same as last year when Nicola Sturgeon stepped down and was succeeded by Yousaf.
That could see Holyrood vote for a new first minister on Tuesday and, if successful, be officially sworn in on Wednesday.
That will involve a short ceremony at the Court of Session in Edinburgh where he will take the oath of office, known as an “official declaration”, and pledge allegiance to the King.
Swinney would, like Yousaf, face his inaugural FMQs on the Thursday.
What if someone challenges Swinney for the SNP leadership?
This is considered unlikely but is possible.
In order to be a viable candidate, contenders must have the backing of 100 members across 20 local party branches.
They will have to submit their bid by noon on Monday.
If that happens, a leadership contest will ensue.
The vote would open on Monday, May 13 and close at 12pm on Monday, May 27.
The ballot would quickly be tallied and the public would be informed shortly after.
Will Swinney get enough votes to become first minister and will he be challenged?
Like Yousaf and Sturgeon before him, Swinney will need to rely on the Scottish Green Party to be voted through in Holyrood and become first minister.
That’s because the SNP are two short of a majority with 63 MSPs out of a possible 129.
Scottish Labour, Tories and the LibDems have made clear they would not vote for any SNP politician to become FM.
As is tradition, opposition parties usually put their own leaders up for the vote, even though they know it won’t pass.
But will the Greens vote for Swinney?
The Scottish Greens have signalled that they could work with Swinney.
After all, he was deputy first minister when the Bute House Agreement between the SNP and the Greens was signed.
Co-leaders Patrick Harvie and Lorna Slater have also made it clear that their problem was not with the Scottish Government but with Yousaf who decided to end the deal.
“Our severe difficulties were with the decision Humza Yousaf made to end the Bute House agreement,” Harvie said.
“But we said all along that the SNP as the largest party in parliament by a long way have the ability and I think the responsibility to lead a minority government.”
He said both parties had worked well together in the past and added that “if there is a willingness to work together on progressive values and progressive policies there is no reason why that can’t happen again”.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country