The images say it all...
Relief for Stephen Gethins as he scraped a victory for the SNP in North East Fife with a margin of just two votes - sparking calls for a fourth recount by Elizabeth Riches of the Lib Dems.
He said: “It’s been an extraordinary night, and event, and I want to give my thanks to all the other candidates that took part in this campaign.
“It was very tight, and they made us wait, but I am delighted. that I have been re-elected. I actually have a job to do and that has been made clear once again tonight.”
But arguably the biggest surprise of the night came when Lesley Laird narrowly took back Kirkcaldy and Cowdenbeath for Labour, eliminating the constituency’s spectacular swing to the SNP in 2015.
She pulled in 17,016 votes, as Roger Mullin got 16,757.
Speaking afterwards, Ms Laird said: “In an election where just a few weeks ago Labour not given a chance, this is a indeed a remarkable result.
“At a rally a few weeks ago I asked supporters what it would feel like to hear Labour had won. It feel even sweeter to hear it for real.”
In Glenrothes, SNP candidate Peter Grant was re-elected – albeit with a previous margin of 15,000 reduced to just 3000.
It was a night of drama, intrigue and surprises ... and proved a bit too long for some ...
All pics: George Mcluskie