LABOUR transformed its Alamo moment in Edinburgh into a spectacular victory that sent shockwaves across Scotland and the UK.

Ian Murray increased his majority to more than 10,000 to secure his seat in the leafy south of the city.

It threw shade on an already lacklustre overall Nationalist win in the Scottish capital.

Read more: Theresa May under pressure to abandon 'hard Brexit' in wake of election humiliation

Despite securing three of the five constituencies, the SNP shed upwards of 17,000 votes, and Edinburgh West - which it previously held - fell to a first time Lib Dem MP.

Mr Murray, below, a former Shadow Scottish Secretary, has fans across communities in Edinburgh, having helped set up the supporter ownership model that now runs Hearts FC.

The Herald:

The one-time lone-standing Labour MP in Scotland notched up one of the biggest majority increases in Scotland from 2,637 just two years ago to 15,514.

The Edinburgh-born 40-year-old was elected as the party's only Scottish MP in 2015, and this time won the Edinburgh South constituency with 26,269 votes, with the SNP's Jim Eadie in second place on 10,755.

Read more: Theresa May under pressure to abandon 'hard Brexit' in wake of election humiliation

In his victory speech at the Meadowbank count, 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.

"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."

Read more: Theresa May under pressure to abandon 'hard Brexit' in wake of election humiliation

The SNP celebrated first, however, with Tommy Sheppard, below, winning Edinburgh East with 18,509 votes, beating Labour's Patsy King into second place on 15,084.

The Herald: The speech given by Tommy Sheppard, the new MP for Edinburgh East, was a tour de force Edinburgh East, was a tour de force

Around 3am it was the first constituency to call in Edinburgh.

The former comedy club operator’s five-minute stint at the mike was applauded by SNP supporters.

Mr Sheppard though had seen his majority rating reduced from 9,106 to just over 3,400.

He said: "The overwhelmingly story of tonight is that this is the Conservative Party snatching defeat from the jaws of victory.

"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.

Read more: Theresa May under pressure to abandon 'hard Brexit' in wake of election humiliation

"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."

Scottish Tory leader Ms Davidson, only a commentator in the wings this time, struggled to get her piece to camera completed from the Meadowbank gallery as new Lib Dem MP Christine Jardine, below, took the Edinburgh West seat with 18,108 votes to 15,120 for the SNP's Toni Giugliano.

The Herald: Christine Jardine

The seat was won by Michelle Thomson in 2015, who later resigned the SNP whip after allegations relating to property transactions.

Ms Jardine is a former broadcast journalist who has also worked as a Downing Street media adviser for the Lib Dems.

Read more: Theresa May under pressure to abandon 'hard Brexit' in wake of election humiliation

In 2015, many expected Ms Jardine to be elected to Westminster when she was chosen as the party's candidate for the Gordon constituency, the area which veteran Lib Dem Sir Malcolm Bruce had represented since 1983.

However, former SNP leader and first minister Alex Salmond, who lost his seat this time round, then declared his intention to stand and went on to win the constituency, polling 27,717 votes to Ms Jardine's 19,030.

Ms Jardine said: "We've been away for a wee while but the Scottish Liberal Democrats are back."

She paid tribute to her late husband, former Herald digital editor Calum Macdonald who died last month, during her speech.

The Lib Dem win comes against a backdrop in Edinburgh where the SNP lost an average of more than 500 votes each month since 2015.

With the Labour and Tory vote gains on the Nationalists the campaign managers don’t have to do the maths to see opportunities for next time.

Deidre Brock, below, held her Edinburgh North and Leith constituency with 19,243 votes, despite a strong challenge from Labour's Gordon Munro on 17,618.

The Herald:

Read more: Theresa May under pressure to abandon 'hard Brexit' in wake of election humiliation

Ms Brock is back in with a 1,625 majority, against 5,597 last time.

The SNP's Joanna Cherry also kept her Edinburgh South West constituency, with 17,575 votes to the Conservative Miles Briggs on 16,478.

While Ms Cherry, a QC, successfully defended the seat, she had a majority of just over 1,000, down from 8,135 two years ago.

However, one SNP supporter said: “A win is a win tonight."