The Conservatives have held West Aberdeenshire and Kincardine – but saw their majority slashed.
MP Andrew Bowie said it was an “honour” to serve his constituency again as he retained his seat.
Securing 22,752 votes, his majority was 843, compared to more than 7,000 in the 2017 election.
The SNP, which previously held the seat from 2015 to 2017, took second place, with candidate Fergus Mutch receiving 21,909 votes.
Meanwhile, Liberal Democrat candidate John Waddell, who also ran in the seat at the last election, took in 6,253 votes, while Labour’s Paddy Coffield received 2,431.
Mr Bowie said: “It’s amazing, it’s a huge honour to be elected to serve in the House of Commons for your home. West Aberdeenshire is where I’m from, and I’m absolutely delighted to do it again.
“That people have trusted me to be their MP again is an incredible honour.
“I knew we’d get our vote out, it was just a case that our vote got out and we had more people out than the SNP, which proved to be the case.
“We knew it was going to be tight from the get-go and so the fact we got it across the line is a huge relief and I think it says a lot for our support across the north-east of Scotland.”
The total turnout for West Aberdeenshire and Kincardine was 73.59%, with 53,459 valid ballot papers counted.
The newly re-elected MP, who won the seat from the SNP’s Stuart Donaldson two years ago, previously said the two most important issues to consider were Brexit and Scottish independence.
Aberdeenshire voted 54.9% in favour of remaining within the European Union at the 2016 referendum.
SNP candidate Mr Mutch said his party fought a fantastic campaign.
He added: “What really made the difference was that we had a huge campaign on the ground. Our activists were so dedicated, so committed, so motivated, and that filtered through to our wider support.
“For the first time ever, people were telling us that they couldn’t vote Tory, they couldn’t stomach the politics that Boris Johnson stands for, and I think that shows – we increased our share of the vote significantly.”
Liberal Democrat candidate Mr Waddell said: “I am proud to have stood on a platform that was unfettered and unbelievably anti-Brexit. Obviously this is not the result that we would have wanted, but I’m proud of the campaign that we have ran and I’m proud of the campaign team.”