The SNP was not in a happy place at the turn of the year.
Humza Yousaf came into office after a fractious leadership contest, and it felt like events were against him at every turn.
Every time he planned a big announcement, Police Scotland seemed to scoop him with a fresh twist in Operation Branchform, the inquiry into the SNP's funding and finances.
Mr Yousaf was also keen to allow more debate around the direction of the SNP, in a break from the very tight circle run by his predecessor Nicola Sturgeon.
But it led to constant questions and rebellions over policy, with some contentious proposals being dropped, and particular debate about the party's partnership in government with the Greens.
Mr Yousaf ultimately showed them the door in unceremonious fashion, and within days the Greens made clear they could help return the favour via a confidence vote in Holyrood.
The first minister had to go. And with the SNP teetering on the brink, it turned to John Swinney.