Until the returning officer at Edinburgh City Chambers announced the results from 11 of Scotland’s 32 local authorities the atmosphere was relatively benign: all the speculation revolved around whether or not the SNP would manage a third MEP. At Meadowbank Stadium they were quietly confident they had done so.
The mood quickly changed: Ukip had stacked up 51,743 votes – more than the Greens and Conservatives – a trend, if continued across Scotland, would give it one of Scotland’s six seats. Subsequent declarations from six more councils saw the Ukip vote climb to 74,173, more than 10 per cent of the vote.
With 27 councils declared, Ukip was at 109,945.
And although the SNP were in the lead in terms of vote share, it wasn’t necessarily enough to elect a trio of MEPs.
This had been its expectation from the outset, a tacit assumption that former Bollywood actress and lawyer Tasmina Ahmed-Sheikh would be on her way to Brussels in addition to incumbent Nationalist MEPs Alyn Smith and Ian Hudghton.
But having hitherto depicted Ukip as an electoral irrelevance north of the Border the SNP suddenly started claiming that the fight for the sixth European seat was between it and Nigel Farage’s increasingly happy band.
The SNP also started being a little more critical of the European Union.
Annabelle Ewing, for example, told BBC Scotland that her party was not “uncritical” of the EU, adding: “far from it”.
Perhaps the SNP had picked up something on the doorsteps, a sense that its generally Europhile stance was not helpful.
Thus its campaign fell victim to mismanaged expectations, bringing to mind the local government elections of 2012 when although the SNP was the largest party in terms of votes it failed to take Glasgow City Council as confidently predicted by leader Alex Salmond.
“My lot shouldn’t have built up expectations,” one Yes Scotland source told me. “So stupid.”
Although the SNP went into the election with two seats and emerged with the same pair, Ukip’s success is profoundly damaging for a central element of the pro-independence narrative: that Ukip’s rise south of the Border proved that England and Scotland were countries moving in different directions, not just in electoral terms but when it came to a generally vague sense of “Scottish values”.
With Ukip late last night looking as though it was set to send an MEP to Europe (and far from a stereotype, David Coburn is openly gay) and around 10 per cent of the Scottish vote, presenting Ukip as an England-only phenomenon does not really stack up.
The Scottish Conservative vote also held up, perhaps even increasing, further evidence that even a moderately Eurosceptic agenda was not necessarily a vote loser.
It seems likely there’s been a referendum factor, with the Scottish turnout up by around 5 per cent on the last European elections in 2009, although overall it was still low.
Struggling to find a line, Mr Salmond appeared on the BBC and blamed it for having “beamed” Ukip into Scottish homes and thus benefitted Ukip electorally.
There is another explanation, that – as suggested by several public attitudes surveys – the views of Scots when it comes to Europe, immigration et al are not that different from those south of the Border.
Sure, the Ukip message was “beamed” into Scottish homes like never before, but there was – among enough of the electorate – a receptive audience.
• David Torrance is a writer, journalist and broadcaster.