They thought it was all over, and it....isn't yet.
An hour or so ago I spoke to SNP sources and they were pretty confident they would secure an third term in office with an absolute majority.
The other parties had grudgingly accepted this was the case.
In her acceptance speech as she won her Glasgow seat, Nicola Sturgeon talked of her plans for that third term.
And she Tweeted: The SNP has tonight won an historic third term as Scotland's government. I pledge to be First Minister for all of Scotland.
That was then, this is a bit later.
In a short blog for the BBC website, Professor John Curtice, high respected polling and voting expert says this:
"As the list results for Scotland now begin to come in two major headlines are emerging.
1) It now looks as though the SNP are at risk of failing to secure a second overall majority in the Holyrood Parliament and will have to form a minority administration doubtless with the support of the Greens.
2) The Cons now look as though they will emerge comfortably ahead of Labour in terms of seats in the Holyrood Parliament, although Labour are slightly ahead of the Cons in terms of votes won on the constituency ballot the Cons outpolled Labour in terms of constituency seats."
Now Prof Curtice was the man who called the UK election victory for the Tories correctly and his verdict has thrown the cat among the political pigeons.
Why might this be? Well, as an earlier blog suggested, it is partly down to the list votes, the D'Hondt system.
It looks as if the SNP is not picking up extra MSP in the system designed to make Holyrood better reflect the proportion of votes for each party.
A minority SNP administration which needed the support of the Greens would be very different from the SNP governing on their own.
Greens leader Patrick Harvie has said he is not interested in a formal coalition but would press an SNP government on issues as they arose.
That could mean the SNP comes under pressure to be more radical on income tax, and a replacement for the council tax to name but two policies.
The Scottish election everyone thought was a foregone conclusion just got interesting.