SNP depute leader Angus Robertson has been spectacularly ousted from Parliament by the Tories, as the nationalists saw their share of the vote slump.
Mr Robertson, who had been the SNP’s leader at Westminster, had been defending a majority of more than 9,000 but he was felled by Conservative Douglas Ross.
The Tory, who is also a football referee, won 22,637 votes, easily beating Mr Robertson who polled 18,478.
Other high-profile SNP scalps taken by the Tories were Mike Weir, who was defeated in the Angus seat he has held since 2001, and Tasmina Ahmed-Sheikh, who lost Ochil and South Perthshire.
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”.
Labour also defeated the SNP to win the Midlothian constituency.
Conservative Scottish Secretary David Mundell told BBC Scotland: “It’s becoming increasingly clear the SNP bubble has burst.”
But in Paisley and Renfrewshire South, the SNP’s Mhairi Black was re-elected with 16,964 votes - although the party’s support in the seat fell by 10%.
Ms Black became the youngest MP when she won the seat in 2015 at the age of 20, ousting then Labour shadow foreign secretary Douglas Alexander.
Gavin Newlands has held the neighbouring Paisley and Renfrewshire North seat for the SNP.