Former SNP frontbencher Stewart McDonald has warned his party should not respond to  defeat in the Rutherglen and Hamilton West by-election with an “emotional spasm”.

The Glasgow South MP said the scale of the Labour victory could not be “dismissed or diminished” by the low turnout, saying “we’ve been skelped and there’s no point in pretending otherwise”.

Writing in The Scotsman, he said the SNP should take a long-term view when members debate the strategy for independence at the upcoming conference.

Any strategy should not be an “emotional spasm”, he said, arguing: “There are no victories in becoming a fundamentalist tribute act.

“Just look at the Tories.”

Meanwhile, Sir Keir Starmer has said he would be a prime minister for the “whole of Scotland”, including those who voted Yes to independence, as he pitched to SNP supporters following his party’s by-election win.

Rutherglen and Hamilton West by-electionLabour’s Michael Shanks took 58% of the vote (Jane Barlow/PA)

Labour’s huge majority in the by-election result has also led to an SNP MP warning his party should not turn into a “fundamentalist tribute act”.

Taking 58% of the vote, Labour’s Michael Shanks won more than twice as many votes as SNP candidate Katy Loudon, exceeding expectations and providing Sir Keir’s party with a boost ahead of its annual conference.

While turnout at the by-election was low at 37.2%, analysts said that if the 20.4% swing to Labour were replicated at a general election the party could win around 40 seats north of the border.

Speaking to the Daily Record, Sir Keir said the SNP was now “on the ropes”.

He added: “What happened here in this constituency, in this by-election, is historic because we ran a positive case for change by a changed Scottish Labour party, working with a changed Labour Party, and people came out in their thousands.”

Pitching to SNP supporters, he said: “Whether you voted Yes or No in the referendum here in Scotland, I will be a prime minister for the whole of Scotland.”

Labour’s conference begins in Liverpool on Sunday, while the SNP will hold its conference in Aberdeen starting on October 15.

UK Parliament portraitsStewart McDonald said the SNP had been ‘skelped’ (David Woolfall/UK Parliament/PA)

SNP members will discuss a leadership motion which could see talks on leaving the UK start if the party wins a majority of Scottish seats at the next general election.

Rutherglen and Hamilton West by-electionHumza Yousaf said his party must take the result ‘on the chin’ (Andrew Milligan/PA)

First Minister Humza Yousaf said on Friday that his party must take the result “on the chin” and promised to regroup.

On Friday, Mr Yousaf said his party would “reflect, regroup and we’ll reorganise, and come back stronger”.

Discussing the conference motion, he said: “I always said I will listen to the party and reflect on the amendments that come in, and then see if we can find a position that carries all of the party in the same direction.

“That’s what I’m hoping to do.”