Scotland's First Minister Nicola Sturgeon admitted she would have to "reflect" on the idea of having another referendum.
3/5 We will now reflect carefully on the results and move forward in the best interests of all of Scotland.— Nicola Sturgeon (@NicolaSturgeon) June 9, 2017
Two of the casualties were the former First Minister Alex Salmond and another SNP grandee, Angus Robertson.
Conservative candidate Colin Clark wins Gordon with 21,861 votes. Former First Minister Alex Salmond had 19,254 votes. pic.twitter.com/knYSvPsa69— Rachel Bell (@rachelbellABDN) June 9, 2017
It could have been even worse for the SNP but Stephen Gethins held off a Liberal Democrat challenge to his seat in North East Fife by just two votes.
Sturgeon ignored her own party's terrible performance and turned the attention on the Prime Minister: "This is a disaster for Theresa May. She called an election arrogantly thinking she would crush the opposition."
"I'm disappointed at the SNP losses but I'm pleased that we've won the election," Sturgeon said.
Speaking from her official residence in Edinburgh, Sturgeon added: "Undoubtedly the issue of an independence referendum was a factor in this election result, but I think there were other factors in this election result as well."
The SNP remains the biggest party in Scotland, but Labour, which was virtually wiped out in 2015, staged a recovery north of the border and both the Tories and Lib Dems also gained at the expense of the Nats.
"The big issue of this campaign up here wasn't about Brexit. It was about what Nicola Sturgeon started in March, trying to ram through a second independence referendum… We've seen so many SNP seats fall here. Honestly, I think IndyRef2 is dead," Ruth Davidson said.
A BBC interviewer asked her whether she would challenge Theresa May for leadership of the Conservative Party, but she pointed out she was a Member of the Scottish Parliament, but not an MP at Westminster.
William McDougall, a lecturer in politics at Glasgow Caledonian University, said the election campaign in Scotland was "completely different" to the battle in England, with the Tories, Labour and the Lib Dems all playing the union card at the expense of the SNP.
He said it may be too early to say that so-called "indyref2" was a non-starter now.
"But it's certainly something which the SNP — Nicola Sturgeon and her strategists — will have to consider carefully," McDougall told Sputnik.
"It may depend on Brexit because if they are able to stay in the Single Market it may give Nicola Sturgeon the reason to row back on that policy."
He said Sturgeon had clearly miscalculated when she called the second referendum and had under-estimated how it would play with the electorate.
"She also underestimated the effect of Corbyn, who was portrayed as harking back to the politics of the 1970s, being another Michael Foot, and all that and that has all been thrown in the air," he told Sputnik.