EDINBURGH East MP Tommy Sheppard has promised that whatever happens over the next 24 hours, the SNP will oppose the Tories’ hard Brexit deal.

“The overwhelming story of tonight is that this is a case of the Conservative Party snatching defeat from the jaws of victory,” he told the crowd of activists and journalists gathered in Hall 1 of Edinburgh’s Meadowbank Sports Centre to hear the result.

The former Scottish Labour deputy general secretary turned comedy club impresario turned SNP MP reclaimed his seat with 18,509 votes, and a majority of 3425, a third of what he won last time, but in a night where bigger majorities were wiped out all over Scotland, a convincing victory.

Edinburgh, a city that was 61.1 per cent No, rejected the SNP last night.

Labour, the LibDems and the Tories all had a good night in the capital.

It annoyed SNP supporters that the other parties in the election campaign spent the last seven weeks talking about an independence referendum, but, it was the argument that pushed the buttons of voters, more than any other.

So again and again and again, they emphasised the no to an independence referendum argument.

“We are witnessing things happening tonight we weren’t expecting to happen when this election was called seven weeks ago,” Sheppard said in his victory speech.

“No matter what happens as a result of this election tonight I promise you one thing — we will look again at the Brexit deal that has happened to the United Kingdom,” he added.

“And in Scotland we will put back on the table the fact that we wish to remain part of the single market, and if we don’t achieve that for the United Kingdom we will press that for our own country because we are not driven to be dragged out of the partnership of our European neighbours against the stated will of the people of Scotland.”

Sheppard put part of the surprising result of the night down to “Ruth Davidson’s obsession with trying to prevent people in Scotland having a choice in their own future”.

The “right wing labour voters for whom the union is more important than social and economic reform” had backed the Tories.

But, he argued, that had been more than compensated by former SNP supporters who backed Labour because they liked what Jeremy Corbyn stood for.

“I only hope that those who did that today will not be too disappointed when they realise what we are doing now in Scotland is sending people to Westminster with a Labour mandate to oppose Jeremy Corbyn and the Labour manifesto,” he said.

“In Scotland tonight there is one clear victor. One party is on a course to win more seats than all other parties put together and that party is the Scottish National Party.”

Tory MSP Jeremy Balfour, who was in the hall as Sheppard spoke, disagreed.

“People are saying we do not want a second referendum. We’ve seen the Conservative vote go up, we’ve seen the Labour vote go up and we’ve seen the SNP vote go down. That’s a clear message.”

He added: “Whatever happens we need to get on and get Brexit done. We’ve only got two years. We need to get that deal done and get the best deal we can for Scotland and the whole of the UK.”

Christine Jardine, who beat the SNP’s Toni Giugliano agreed with the Tory MSP: “The voters in Edinburgh West have made it clear they don’t want independence let alone an independence referendum.”