SNP veteran and former first minister Alex Salmond has lost his Gordon seat to the Tories, as the nationalists saw their share of the vote slump.
The SNP lynchpin and ex-party leader was defeated by Colin Clark in Gordon.
Mr Salmond, the SNP’s foreign affairs spokesman, had swept to power in the seat with a 8,687 majority in 2015, overturning decades of Liberal Democrat rule.
The party’s depute leader Angus Robertson was also spectacularly ousted from Parliament by the Tories.
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.
Look at that swing! Well done Douglas. https://t.co/bwLcvPP2XP— Ruth Davidson (@RuthDavidsonPC) June 9, 2017
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.
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.
Former SNP leader Alex Salmond blamed a late surge in support for Labour’s Jeremy Corbyn for the loss of a number of nationalist seats.
But he was insistent the SNP will win the election north of the border.
He told BBC Scotland: “It looks now certain that the SNP will win a majority of Scottish seats, more seats than all the other three parties put together.
“In any terms, that means the SNP, by winning more votes and more seats, have won this election in Scotland.
“I’m disappointed that we have lost so many fine parliamentary colleagues, I think one thing the polls did not detect at all was a late recovery in Labour Party fortune based on the admiration of a lot of people for the performance of Jeremy Corbyn during this General Election campaign.”
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.
What you're seeing tonight is a new generation of @scottishlabour MPs coming to the fore - couldn't be prouder 🌹👏🏼— Kezia Dugdale (@kezdugdale) June 9, 2017
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.
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.
Paul Sweeney celebrates taking Glasgow North East from the SNP, in a shock from Glasgow pic.twitter.com/x6q6Bm9jj3— Paul Ward (@paulward21) June 9, 2017
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.
That's it. It's been an amazing campaign in P&NP. The canvassing, the local press, the support, the social media, the enthusiasm. THANK YOU.— Pete Wishart (@PeteWishart) June 8, 2017
Pete Wishart, who was the chair of the Scottish Affairs Committee in the last Parliament, managed to hold on to his Perth and North Perthshire constituency – but by the narrowest of margins.
He was returned to the Commons after securing just 21 more votes than Conservative MEP Ian Duncan. After a recount, it was declared Mr Wishart had 21,804 votes, putting him ahead of Mr Duncan on 21,783.
But the Tories took Ayr, Carrick and Cumnock from the SNP, with local councillor and former fireman Bill Grant winning the seat.
Aberdeen South also switched from SNP to Conservative, with MSP Ross Thomson claiming the Westminster constituency.