Aberdeen North is now the only yellow spot on the electoral map in north-east Scotland after Kirsty Blackman held on with a reduced majority.
The seat returned a Labour MP on every occasion bar one between the end of the First World War and 2010 but two years ago joined almost all of Scotland in returning an SNP MP.
On that occasion Mrs Blackman secured 56% of the vote and a majority of 13,396.
But this time round her margin of victory was reduced to 4,139 over Labour candidate Orr Vinegold as she polled 15,170 votes.
The Conservative’s vote also surged by 10.6% as 8,341 people backed Grace O’Keeffe.
The result was the first to declare in the Aberdeen Exhibition and Conference Centre shortly after 2am but was the only positive for the SNP in the venue on the night.
Speaking after her victory Mrs Blackman promised to be as responsive to her constituents as possible.
She said: “My focus is going to be on household budgets – people are concerned about meeting end’s meet and concerned about how much money they have.
“Wages have not been increasing and that’s a really big concern.
“I’m hoping to be as accessible as possible, I have tried my very best to be an MP that people can come to if they have got any problems and I am hoping to continue that.”