Former SNP leader Alex Salmond said it had been a disappointing night but put the losses down to a “late Labour recovery” rather than opposition to another independence referendum.

During the campaign, Scottish Tory leader Ruth Davidson had declared it would be an “Ed Balls moment” if her party could eject the SNP’s depute leader - referring to Labour’s former shadow chancellor losing his seat in 2015.

After the result was declared, she tweeted: “Fantastic in Moray!”

In East Dunbartonshire, Liberal Democrat Jo Swinson regained the seat from the SNP’s John Nicolson.

Ms Swinson had held the seat for a decade before being ousted by Mr Nicolson in 2015.

After the result was declared, she said: “I recognise all of those who put party allegiance to one side to send a clear message that East Dunbartonshire does not want another divisive independence referendum.

“Nicola Sturgeon, I hope you’re listening.”

The SNP also lost out in East Renfrewshire, this time to the Tories.

Paul Masterton took the constituency - which 20 years ago had been the safest Tory seat in Scotland - from the SNP’s Kirsten Oswald.

The results came after an exit poll suggested the SNP could lose 22 seats across Scotland.

The nationalists had swept the board in 2015, winning 56 of the 59 seats up for grabs - leaving Labour, the Conservatives and the Liberal Democrats with just one MP each.

But in the 2017 election, the first result in Scotland went to Labour as the party won Rutherglen and Hamilton West.

Gerard Killen claimed the seat for Jeremy Corbyn’s party with 19,101 votes, defeating the SNP’s Margaret Ferrier, who won the constituency in 2015 but who polled 18,836 votes this time round.

After being elected, Mr Killen declared: “This result is a rejection of austerity and a rejection of a divisive second independence referendum.

“Above all this result is a vote for a progressive manifesto and a fresh start for Rutherglen and Hamilton West.”

Scottish Labour leader Kezia Dugdale said on Twitter she was “utterly thrilled” for Mr Killen, adding that he will be “an outstanding MP”.