A disastrous night for the SNP saw it lose its “biggest beast”, Alex Salmond, along with its Westminster leader, its chief whip and its international trade spokesman.

The loss of 21 seats, after a high-water mark just two years ago when it took 56 of Scotland’s 59 seats, is a major blow to the party, to Nicola Sturgeon’s leadership and to her ambitions for a second Scottish independence vote.

Mr Salmond, the party's foreign affairs spokesman, Scotland's first minister between 2007 and 2014 and an MP for 25 years, saw a majority of nearly 8,700 overturned by the Tory candidate Colin Clark as the Conservatives increased their share of the vote in Gordon by 29 per cent.

His defeat at the age of 62 comes after a remarkable political career in which he has also been leader of the SNP for more than 20 years, in two separate terms, and an MSP for 11 years.

He was first elected as MP for Banff and Buchan in 1987 and represented the seat in the north-east of Scotland until 2010. He has been the MP for Gordon for the last two years.

Defeat will be a huge personal blow for such a "weel kent" face in British politics, and comes just three years after he lost the 2014 independence referendum, which led to his resignation as first minister.

However, the SNP veteran was typically bullish in his concession speech, saying the reduced number of MPs would still be in a position of “very substantial influence indeed”, which would be used in a bid to keep the Tories from power.

Tasmina Ahmed-Sheikh failed to hold on to Ochil and South PerthshireCredit:
Getty

He also warned voters that he might not be ready for a quiet retirement in Strichen, rural Aberdeenshire, borrowing the words of a famous Jacobite song, Bonnie Dundee, written by Walter Scott in 1825, to make the point.

Slightly misquoting the line in the process, he said: “So laugh, false whigs, in the midst of your glee/ You have not seen the last of my bonnets and me.”

The actual line, towards the end of the song popularised by the Scottish folk group The Corries, is: “And tremble, false whigs, in the midst of your glee/ Ye hae no seen the last o’ my bonnets and me”.

The SNP also lost Angus Robertson, the SNP’s Westminster leader and another high-profile figure, who was defeated by Douglas Ross in the north-east of Scotland, where fishermen have angrily opposed the SNP’s bid to stay in the EU. Mr Ross overturned a majority of 9,065 to defeat Mr Robertson by 4,200 votes in Moray.

The SNP's Tasmina Ahmed-Sheikh, a rising star in the party, a close ally of Mr Salmond, and its international trade spokesman, lost her lost Ochil and South Perthshire to the Tories, who were a distant third in 2015.

Mike Weir, meanwhile, the chief whip, and an SNP MP for Angus since 200,1 who increased his majority by 8,000 votes just two years ago, was defeated by Tory unknown Kirstene Hair, who took more than 45 per cent of the vote.

Angus Robertson, a loser in MorayCredit:
Getty

Mr Weir, a former solicitor, has held a string of party spokesman roles in Westminster, on business, environment, health and trade and industry.

Good news was in short supply for the SNP, but came in the form of two closely contested seats, with Pete Wishart, Scotland’s longest serving MP, winning by just 21 votes from the Tories in Perth and North Perthshire, and Stephen Gethins, the SNP’s Europe spokesman, holding off a Lib Dem challenge by a remarkable two votes in North East Fife. That result was a far cry from 2015 when he defeated Sir Menzies Campbell with a 4,344 majority.

Our manifesto: Real political insight, free for 30 days.

Rely on unrivalled insight and sharp analysis from our stellar team of Westminster insiders.

Join the most trusted voice in politics. Follow Election 2017 with Telegraph Premium.