The SNP has succeeded in snatching back the closely-watched battleground of Gordon from the Conservatives.
SNP candidate Richard Thomson won the seat with 23,885 votes, a majority of just 819 over Conservative candidate Colin Clark, in what would be the closest contest of the night at the Aberdeen count.
Mr Thomson largely put his electoral success down to Brexit, claiming voters in Gordon were “unhappy” with the direction of the UK Government over the last few years.
He said: “I’m absolutely thrilled by the result.
“It’s been obvious throughout that this has been a very close contest and I think it was fought in the right spirit.
“It’s quite obvious that people in Gordon voted to remain and that we were very unhappy with the direction the UK Government had gone over the last few years.
“I think that as much as anything is what has moved people in the direction of voting for the strongest party of Remain.
“Also the fact the SNP was making a pledge to protect the NHS and to put Scotland’s future in Scotland’s hands.”
The seat has a long Liberal Democrat history, with the party having held it under Sir Malcolm Bruce for more than three decades.
But in 2015, former First Minister Alex Salmond was to claim the seat, with a majority of more than 8,000, before losing it to Mr Clark in 2017.
The Conservative candidate said while his vote had gone up, by 1,205 votes compared to 2017, “so had the SNP’s”.
He said: “We fought a really good campaign. It was very close.
“The Labour vote has gone across to the Conservatives in England and in Scotland it appears to have gone to the SNP.”
Taking to the stage, Mr Clark said: “I’m convinced Richard will be a very dedicated MP.
“It has been a huge privilege to be the MP of Gordon and I honestly wish Richard all the best looking after the people of Gordon.”
He added that he was glad to see former Scottish Conservative colleagues hold on to seats in both Banff and Buchan and West Aberdeenshire and Kincardine, giving some “political balance” at Westminster.
Meanwhile, a Liberal Democrat revival in the seat was not to be, with the party coming in third with 5,913 votes while Labour trailed in fourth with just 3,052.