John Swinney has been confirmed as the next SNP leader, after an obscure Scottish independence activist briefly sparked panic in the party hierarchy before dropping a threatened leadership bid.
It meant that Mr Swinney, 60, enjoyed an unopposed coronation, after being backed by a plethora of senior party figures in the chaotic aftermath of Humza Yousaf’s resignation last week.
The SNP veteran could become Scotland’s First Minister as early as Tuesday, with MSPs expected to elect him at Holyrood at some point in the next two days.
The former Deputy First Minister is viewed as a safe pair of hands after a period of turmoil for the SNP, having enjoyed senior roles in the governments of Alex Salmond and Nicola Sturgeon.
But because of his closeness to both Ms Sturgeon and Mr Yousaf, he faces the difficult task of shrugging off accusations that he is the “continuity” figure offering “more of the same”.
It is not even the first time the Perthshire MSP has led the SNP. He was in charge of the party between 2000 and 2004 while it was in opposition, but stood down after a string of disappointing election results.
According to polling guru Prof John Curtice, Mr Swinney “wasn’t really that good at” leading the SNP. The party failed to make any progress at the 2001 general election and lost eight MSPs at the 2003 Holyrood election.
Before stepping down, Mr Swinney was warned by his former adviser Michael Russsell to expect a visit from “the men in grey kilts”, telling him that it was time to go.
Now, those same SNP bosses have paved the way for Mr Swinney’s return to the top job – but he faces a very different set of challenges from last time around.
After the turbulence of Mr Yousaf’s year in charge, Mr Swinney has been put in place to unite the SNP and shore up the party’s flagging vote by proving he can run a steady, credible minority government.
Prof Curtice has suggested that pushing out Mr Yousaf was “the worst thing unionists could have done”, since Mr Swinney now has an opportunity to restore the party’s previous reputation for competence.
Mr Swinney, who has three children and is married to BBC reporter Elizabeth Quigley, joined the SNP in 1979, age 15.
The Edinburgh University graduate, who started out working in insurance, was elected to Westminster for North Tayside in 1997, before becoming an MSP at Holyrood in 1999.
He has never been viewed as a charismatic politician. James Bond star Sean Connery, a leading Scottish independence backer, reportedly thought that Mr Swinney was too boring to be leader during his first stint in charge.
However, he remains highly respected in his party, earning the nickname “Honest John” for his economic management during his decade as Finance Secretary in the Salmond and Sturgeon governments.
Mr Swinney has also skillfully negotiated the big hurdle of the past week. He managed to convince his only potential rival, 34-year-old Kate Forbes, to take a job in government.
He publicly offered Ms Forbes a “significant” role, although it is not clear whether he will make the ambitious, socially-conservative MSP his deputy leader in a bid to end divisions inside the SNP.
There has been bad blood since Mr Swinney last year questioned whether it was “appropriate” for someone with Ms Forbes views – she would not have voted to legalise same-sex marriage – to be SNP leader.
Mr Swinney, a member of the Church of Scotland, has described himself as a man of “deep Christian faith”. But he has proved to be a social liberal, supporting the attempt to bring in the Gender Recognition Reform (Scotland) Bill, which would have made it easier for transgender people to self-identify. The Bill was eventually blocked by the UK Government.
He has signalled he wants to move away from some of the left-wing, Green-led policies of the last three years, agreeing with Ms Forbes that the net zero transition must “work with and not against” Scotland’s oil and gas industry.
During his first four years as Finance Secretary, Mr Swinney was forced to steer budgets through Holyrood with the backing of opposition parties. He faces the same task again, after Mr Yousaf’s decided to tear up the coalition agreement with the Scottish Greens.
Mr Swinney says he is in the job for the long haul. He has insisted he is “no caretaker” First Minister, and can lead the party beyond the 2026 Holyrood election.
But that will depend on general election results, on Ms Forbes’s ambitions, and whether Mr Swinney can act as new broom, able to sweep the SNP’s recent troubles away.