WE now know the new leader of the SNP is John Swinney, but he does not automatically become first minister.
Today will see MSPs in the Scottish Parliament sign off on who they want to lead the country.
Here’s how things will work.
Humza Yousaf formally resigns
Humza Yousaf (below) has already resigned as Scotland's first minister and has written to the King to confirm this.
This is a requirement under Section 45 of the Scotland Act 1998.
The new first minister will be appointed by the King on the recommendation of the Scottish Parliament. Section 46 says the Parliament technically has 28 days to appoint a successor, but this is due to take place today.
The Scotland Act states: “The Presiding Officer shall recommend to Her [His] Majesty the appointment of any member of the Parliament who is nominated by the Parliament under this section.”
Nomination of candidates
Any MSP can nominate a candidate to be the first minister.
This must be done by submitting a written nomination to the clerk and it must be seconded by another MSP to be regarded as valid. It should be submitted no more than half an hour before voting.
After the Presiding Officer (PO) announces valid nominations received, each candidate is able to make a short speech.
What happens once an FM is chosen?
The successful candidate is elected by a simple majority and abstentions are not included. So as long as a candidate gets more than half the votes cast, they will become first minister.
Once MSPs have chosen their preferred candidate, the PO will recommend to the King that that member be appointed as first minister.
The FM is then appointed by royal warrant and sworn in at the Court of Session in Edinburgh. This is due to take place on Wednesday and they will become the sixth leader of Scotland.
Who has previously been a candidate?
During the first nominations for first minister in 1999, four candidates stood in Donald Dewer, Alex Salmond, Dennis Canavan and David McLetchie.
On October 26, 2000, following the death of Dewar, the Parliament selected a new FM for the second time when Henry McLeish was chosen against three rivals in Canavan, McLetchie and John Swinney.
Jack McConnell was then selected twice, first in November 2001 following the resignation of McLeish – against Swinney, McLetchie and Canavan - and then in May 2003 following a General Election when a whopping seven candidates were nominated – McConnell, Swinney, Tommy Sheridan, Margo MacDonald, Robin Harper, McLetchie and Canavan.
Four candidates stood when Alex Salmond became FM in 2007 following another General Election, with McConnell, Annabel Goldie and Nicol Stephen standing against Salmond.
Following the General Election in May 2011 and the SNP securing the first majority at the Scottish Parliament, Salmond stood unopposed.
Sturgeon was nominated as FM three times. She was successful against Tory Ruth Davidson in November 2014 following Salmond’s resignation.
After the General Election in 2016 she was selected again, seeing off a challenge from LibDem Willie Rennie.