And so, the media mood music proved to be correct. The narrative of most commentators in recent weeks was that Humza Yousaf was favourite but that the contest would be close. And so, it proved.
There are a number of points that jump out from the figures.
First, this is a party membership that was split on who best to succeed Nicola Sturgeon, with Yousaf triumphing by 52% to 48%, so his mandate, whilst enough in arithmetic terms, is hardly overwhelming.
30% of SNP members did not vote at all, suggesting that, for a portion of the membership, none of the candidates inspired them enough to cast a vote.
In his victory remarks, he was careful not to give hostages to fortune by announcing any new policies, saying he was not going to indulge in empty promises or soundbites – before doing just that.
He quoted the former Labour leader John Smith, who remarked on the eve of his death that the opportunity to serve was all he sought.
So, what changed today?
Well, this represents the changing of the guard, not just in personnel but in generational terms too.
Alex Salmond burst onto the political scene in the late 1970s, Nicola Sturgeon in the late 1980s when Yousaf was in short trousers.
Both Salmond and Sturgeon were products of pre-devolved Scotland, the first minister-in-waiting is a product largely of the devolved era.
Sturgeon’s tenure was earmarked by an iron discipline where it was difficult to find ‘on the record’ dissent. Most rumblings about small cliques running the show came in exasperated ‘off the record’ remarks.
Yousaf simply does not have the kind of mandate to carry on the culture of the Sturgeon era, so I would expect a more collegiate approach to government.
Then there are the difficulties in policy terms. He declared himself today as the “luckiest man in the world”. The opposition will say he will need more than luck to deal with the crises in public services which they will now attempt to pin on him.
And it was clear this afternoon that his remarks on independence will involve talking less about the need for another referendum and more about doorstep campaigning to win over doubters.
The historic fault-line in the SNP on independence strategy used to be between what was termed gradualists and fundamentalists. The former wanted an incremental approach to independence, the latter embraced more of a big-bang approach.
With devolution everyone became a fundamentalist. That is until Sturgeon resigned and left her party without a strategy as the ‘de-facto referendum’ line was buried with an almost indecent haste.
Yousaf will now have to reconcile an upcoming internal debate – or, more accurately, split. Some within the party will be dismayed that he wants to return to an approach of persuasion, which may have been fine before 2014.
Many will argue that the last referendum and the vote on Brexit should spur the government on to more radical action.
Indeed, it is perfectly possible that the large haemorrhaging of members in recent years is down in no small part to a frustration about the leadership’s failure to move the dial in the numbers expressing support for independence.
Yousaf does not have much time to deal with the problems in Scotland’s public services. And that task will be made all the more difficult, for there will not be any material change in Scotland’s public finances.
If, as many believe to be the case, he lacks Sturgeon’s firefighting abilities, there could be a run on the SNP’s poll numbers fairly quickly.
And that will mean that any slippage in support at the next UK general election in 2024 will create a sense of crisis for his leadership.
It is, of course, way premature to talk in apocalyptic terms, but party strategists know he does not have a lot of time to establish a rapport and authority with the public.
He is the candidate that the opposition parties wanted, make no mistake about that. The Humza Useless jibe is about to be dusted down and thrown at him every day he is in office.
One note of unanimity today.
There were warm words that Scotland looks set to have a first minister from a minority ethnic background. Yousaf was at his most emotional this afternoon when talking of his family’s journey that brought them to Scotland.
The words of opponents on that front were genuine and warm. He should bask in them, for there won’t be many more in the weeks and months ahead.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country