Ian Murray has held Edinburgh South.
The MP was elected with 26,269 votes, a majority of 15,541 over the SNP’s Jim Eadie.
There was a turnout of 74% in the seat with the Conservatives gaining 9,428 votes.
The result tops a memorable night for Labour with significant gains across Scotland and the UK.
Labour’s Ian Murray has increased his majority by more than 15,000 to secure his seat in Scotland’s capital.
Mr Murray, who was elected as Labour’s only Scottish MP in 2015, won the Edinburgh South constituency with 26,269 votes, with the SNP’s Jim Eadie in second place on 10,755.
His majority increased from 2,637 just two years ago to a huge 15,514.
In a victory speech at the Meadowbank count in the city, he said: “I stood here two years ago bemoaning the loss of my colleagues but tonight the Scottish Labour Party is back.
“Nobody wanted this general election. Theresa May called this election to get rid of scrutiny in parliament for the hard Brexit she wanted to deliver.
“Well the people of this country, the people of Scotland, have said tonight that we do not give the Prime Minister a blank cheque for a hard Tory Brexit.
“And to the First Minister, we said at the start of this campaign that Scotland didn’t want a second independence referendum. The people of Edinburgh South have hammered the final nail in that coffin tonight.”
The SNP held on to three seats in the city, with Tommy Sheppard winning Edinburgh East with 18,509 votes, beating Labour’s Patsy King into second place on 15,084.
“The overwhelmingly story of tonight is that this is the Conservative Party snatching defeat from the jaws of victory,” Mr Sheppard said.
“There is one clear victor in the General Election in Scotland, one party that is on course to win more seats than all other parties put together, and that party is the Scottish National Party.
“Ruth Davidson sought a mandate in this election to try to prevent the people of Scotland having a choice about their future and she has overwhelmingly been rejected by the Scottish electorate.”
Nationalist Deidre Brock held her constituency Edinburgh North and Leith with 19,243 votes, despite a strong challenge from Labour’s Gordon Munro on 17,618.
The SNP’s Joanna Cherry also kept her Edinburgh South West seat, with 17,575 votes to the Conservative Miles Briggs on 16,478.
But Liberal Democrat Christine Jardine took Edinburgh West with 18,108 votes to 15,120 for the SNP’s Toni Giugliano.
The seat was won by Michelle Thomson in 2015, who later resigned the SNP whip after allegations relating to property transactions.
Ms Jardine said: “We’ve been away for a wee while but the Scottish Liberal Democrats are back.”