Former Liberal Democrat minister Jo Swinson was swept back to Westminster after ousting a key SNP MP.
She was one of a handful of opposition candidates who picked up SNP seats in Glasgow and the west of Scotland.
As well as East Dunbartonshire, four other seats in and around Scotland's biggest city saw the SNP lose ground.
However, Mhairi Black, who was Britain's youngest MP when elected in 2015, was voted back in, albeit with a smaller majority.
Miss Swinson regained her former seat from high profile MP John Nicholson after overturning the majority of about 2,200 he picked up in 2015 - turning that into a 5,339 majority with a 16% swing.
Former BBC TV presenter Mr Nicolson was appointed as the SNP's spokesman on culture, media and sport, and sat on the Culture, Media and Sport Committee in Westminster.
Former Women and Equalities minister Ms Swinson 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."
Meanwhile, Labour staged a fight back in its former Glasgow heartland taking an unexpected seat from the SNP.
Majorities were also dramatically cut in the city's constituencies as Paul Sweeney, 28, celebrated winning Glasgow North East for Scottish Labour.
The SNP's David Linden held off a strong challenge from Labour's Kate Watson in Glasgow East.
SNP leader Nicola Sturgeon arrived late in the night to congratulate the other re-elected MPs - Carol Monaghan, Alison Thewliss, Stuart McDonald, Patrick Grady and Chris Stephens - but the celebrations were just as jubilant among Labour activists.
Labour recently lost control of Glasgow City Council to the SNP and were wiped out in the city in the 2015 general election so candidates had gone into the snap election saying they had "nothing to lose".
Mr Sweeney, a Scottish Enterprise worker, defeated Ann McLaughlin as the SNP vote fell.
The Tories had returned eight seats in May's council elections but there were no further shocks despite a rise in the party's share of the vote across Glasgow.
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.
Patrick Harvie was aiming to become the first Scottish Green MP, but failed to make an impact in the Glasgow North seat.
The party stood just three candidates in Scotland's 59 seats.
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.
'Continue to batter'
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 held the neighbouring Paisley and Renfrewshire North seat for the SNP.
Ms Black denied reports she had become disillusioned with the House of Commons and said: "If anybody was to be told they have a job for another five years, potentially, that's good news.
"And although I make no secret of the fact that I find Westminster archaic, I still think that so long as it's our political institute we have to get involved in it."
"So I'm glad to be re-elected again to go back down and continue to batter in to whoever's in government, to tell them that austerity is not working, it's not benefiting people's lives whatsoever."