Nicola Sturgeon has announced her intention to resign once a successor as leader of the Scottish National Party (SNP) has been elected.
Scotland’s first minister said she had instructed the SNP’s national secretary Lorna Finn to start the election process to pick her successor after eight years in office.
But as the race to replace Ms Sturgeon gets under way, how does the process of appointing the SNP’s next leader and head of the Scottish government work?
Ms Sturgeon was elected unopposed in 2014, but the last time the SNP held a proper leadership election in 2004, Alex Salmond won with a commanding 75.8% of the vote.
Live reaction to shock Sturgeon news
This time around, nobody has yet come forward publicly to announce their candidacy.
But possible early contenders include current deputy leader of the SNP Keith Brown, the SNP’s finance and economy secretary Kate Forbes, the SNP’s constitution, external affairs and culture secretary Angus Robertson, and the party’s health and social care secretary Humza Yousaf.
According to the SNP’s constitution, those wishing to put themselves forward as candidates for leader must have at least 100 nominations from party members from at least 20 of the party’s local branches.
The document states that the close of nominations will be 77 days after they opened.
If there is more than one candidate, there will be an election in which all party members are eligible to vote.
The vote is run on a one-person-one-vote postal voting system.
Unlike at Westminster, where a prime minister is appointed by the King under the royal prerogative, the first minister of Scotland is nominated for appointment by members of the Scottish parliament (MSPs).
This takes place when a first minister resigns, like Ms Sturgeon has, or following an election.
Read more:
How she survived ‘cesspit of vipers’ but failed to achieve dream
The controversies which piled pressure on Sturgeon
Theoretically, any MSP could become first minister as any member of the Scottish parliament can put themselves forward for the role.
But, in practice, it will likely be the leader of the party with the most MSPs – currently the SNP.
Under section 46 of the Scotland Act 1998, once a first minister has tendered their resignation to the King, the Scottish Parliament has a period of 28 days in which to nominate one of its members for appointment as their successor.
The presiding officer of the Scottish parliament will invite each nominee to speak in support of their candidacy.
Once nominees have spoken, MSPs will be asked to cast their vote for their preferred candidate.
A separate vote will be held for each candidate.
The results will then be verified and announced by the presiding officer.
The successful candidate is elected by a simple majority. Abstentions are not included.
The presiding officer of the Scottish parliament will then recommend to the King that he appoints the winning candidate as first minister of Scotland.
A day or two after being nominated by the Scottish parliament, the successful candidate will be sworn in at the Court of Session, Scotland’s senior civil court.
With the agreement of the Scottish parliament, the new first minister will then appoint ministers from among other MSPs “with the approval of His Majesty”.
Click to subscribe to the Sky News Daily wherever you get your podcasts
A date for the election has not yet been announced.
The 2004 election was triggered with the resignation of John Swinney on 24 June and concluded on 3 September – a period of around two and a half months.
In her resignation speech, Ms Sturgeon said one of the reasons she was stepping down now was so that a new leader could be in place before the SNP’s member-only special democracy conference on 19 March.
However, there has been suggestion that the conference may have to be postponed as a new leader will not be in place in just over a month’s time.