Mr Johnson, who has held the seat since 2016, received 20,760 votes.
The seat was a three-way marginal, with the SNP’s Catriona MacDonald needing just a 1.47 per cent swing to nab the seat, and Tory candidate Miles Briggs needing a swing of just 4.74 per cent to unseat Mr Johnson.
However, the SNP received 16,738 votes to finish second, and give Mr Johnson a majority of 4,022, and the Conservative vote collapsed.
In third place, the Tory candidate Miles Briggs received 5,258 votes. However, Mr Briggs is top of the Tories’ Lothian regional list, meaning he is very likely to enter the Scottish parliament when the regional list results are announced on Saturday evening.
In fourth place, the Scottish Liberal Democrats candidate Fred Mackintosh received 2,189 votes, while the Scottish Family Party candidate, Philip Holden, received 317 votes.
As part of his victory speech, Mr Johnson said: “Can I thank the people of south Edinburgh.
“For the past five years I have striven to be a local representative above all - to serve the community where I live, and bring up my family.
“I am truly humbled by this overwhelming endorsement, and I’m truly grateful for the trust placed in me by the people of Edinburgh Southern.
“Can I also pay tribute to Anas Sarwar, who in ten short weeks has transformed the fortunes of the Scottish Labour Party and has set the agenda for this election: being focused on what united us, not what divides us; being clear that we cannot seek to heal from Covid by reopening the wounds of the past; and that recovery necessitates all of our attention and resources.
“This is the agenda that Scottish Labour will continue to pursue through the next five years of the Scottish parliament, and this is the clear and unequivocal mandate the people of south Edinburgh have given me, because they are clear that I must work relentlessly to pursue recovery, and I must reject a second divisive independence referendum.”
Speaking after her loss, Ms MacDonald said: “It’s a really fantastic increase in our vote, to get 36 per cent of the vote, that’s a really big turnout.
“We saw SNP voters really turning out to support us in all of the areas in which the SNP is strong and that’s fantastic.
“Obviously what happened is the Tory and Lib Dem vote collapsed, I see the Lib Dems particularly lost quite a lot of votes.
“I’m really, really pleased with the support the SNP supporters gave us to come out and vote, despite the weather, despite the campaign, it’s been massive.”
A message from the Editor:
Thank you for reading this article. We're more reliant on your support than ever as the shift in consumer habits brought about by coronavirus impacts our advertisers.
If you haven't already, please consider supporting our trusted, fact-checked journalism by taking out a digital subscription.