Just days after promising to fight and win a vote of no confidence in his leadership, Humza Yousaf fought back tears as he threw in the towel.
His resignation is the latest twist in the chaotic tale of the SNP since the 2019 general election and the 2021 Scottish election.
Then, the party was riding high under the leadership of Nicola Sturgeon, whose smooth communication style helped reassure the people of Scotland during the Covid crisis and saw her become a household name across the UK.
It had succeeded in almost completely wiping out the Labour Party north of the border, while a majority of MSPs were in favour of, and pushing for, Scottish independence.
While it remains the largest party in Holyrood, and will likely continue to rule as a minority government, the SNP’s electoral fortunes look bleak at best.
The Independent looks at what went wrong for the SNP, and where it has left the party.
When did things start going wrong?
Trouble arose for the SNP when the Scottish government received sexual harassment complaints against former first minister Alex Salmond relating to his time in charge.
Mr Salmond, who was first minister until he resigned after losing the 2014 Scottish independence campaign, quit the SNP in 2018 amid allegations of sexual misconduct.
He was arrested and charged with two counts of attempted rape, nine of sexual assault, two of indecent assault, and one of breach of the peace.
He was cleared of the charges but did not return to the SNP and went to war with the party which was under his protegee and former deputy Ms Sturgeon.
He accused her of a “lack of urgency” in her approach to Scottish independence, and launched his new independence-focused Alba Party. The SNP accused him of “self-interest” and showing “no sign whatsoever of reflecting on serious concerns about his own conduct”.
What has happened recently?
The party enjoyed a period of rising support during the pandemic, when Ms Sturgeon’s cool communication style contrasted with the chaotic handling of Covid in the rest of the UK.
As well as the party’s political support rising, support for independence rose alongside it amid growing criticism of the government in Westminster.
But the party was thrown into turmoil last February when Ms Sturgeon announced her resignation just months before being arrested in connection with a long-running investigation into the SNP’s finances.
She was released without charge, but her husband Peter Murrell was also arrested and has since been charged in connection with the embezzlement of SNP funds.
Mr Murrell, who was chief executive of the SNP, was re-arrested this month over the probe into £600,000 of Scottish independence funding which was diverted elsewhere.
The leadership contest which followed Ms Sturgeon’s resignation opened up splits in the SNP, and saw front-runners Mr Yousaf and Kate Forbes take chunks out of each other in the brutal campaign.
Third-placed Ash Regan went on to quit the party, defecting to Mr Salmond’s Alba party.
Why has Humza Yousaf quit?
The chaos of recent years caught up with Mr Yousaf, who announced his resignation after just 398 days as first minister.
Critics believe he isolated more socially conservative supporters by backing legislation to make it easier for people to change their gender and implementing a hate crime law that made transgender identity a protected characteristic, even though the same protections weren’t given to all women.
He then sparked the fury of the SNP’s partners in government, the Scottish Greens, by scrapping the country’s target to reduce carbon emissions by 75 per cent by 2030.
The party was set to vote on whether to pull out of the power-sharing Bute House Agreement with the SNP, but Mr Yousaf removed Green co-leaders Patrick Harvie and Lorna Slater from government before they could.
This left him facing a no-confidence vote in which he would have had to rely on Alba defector Ms Regan, who he previously described as “no great loss” to the SNP.
The decision was politically calamitous, and despite having vowed to fight on, Mr Yousaf fought back tears as he announced his resignation.
What happens next?
The SNP will hold a leadership contest to pick the next first minister of Scotland. Former deputy first minister under Ms Sturgeon John Swinney quickly emerged as a front-runner, and is expected to say whether he is running in the coming days.
Former leadership contender Ms Forbes could also enter a contest.
It is thought the SNP wants to avoid another damaging leadership election, which would see candidates once again attack each other in televised debates.
But that will depend on whether the party can unify around a single candidate.
As first minister, Ms Sturgeon was critical of the Conservatives for changing leader multiple times without calling a general election. Labour has called for the SNP to hold Scottish elections, which would likely see large Labour gains at the expense of the nationalists.
And, if the next leader cannot gain the support of Holyrood, their hands may be tied and Scotland could be forced to hold an early election.
It has been a disastrous few years for the SNP, and the future for the party, and independence looks bleak.
That is why Britain’s top polling guru Professor Sir John Curtice called the saga “God’s gift to the Labour Party”.
Sir Keir Starmer will be watching developments north of the border with glee.