John Swinney has said he is “committed” to healing the relationship between the SNP and the electorate as he admitted his party had "failed to convince" the people of Scotland on independence.

Speaking in Edinburgh after a devastating night for the party, the First Minister said he took full responsibility for the campaign which saw the party drop dozens of seats.

“The Scottish National Party needs to be healed and it needs to heal its relationship with the people of Scotland, and I am absolutely committed to doing that,” he said.

The party had said in its manifesto that a majority of seats would be a mandate for negotiations on holding another referendum, but in the end it won just nine - down on the 48 it took in 2019 and short of the 20 it needed for a majority.

Labour meanwhile won 37 seats in Scotland - including taking all the SNP's seats in Glasgow and Edinburgh and across the central belt.

“I have to accept that we failed to convince people of the urgency of independence in this election campaign,” he said.

“Therefore, we need to take the time to consider and to reflect on how we deliver our commitment to independence – which remains absolute.

“As somebody who has devoted their entire adult life to the winning of Scottish independence – not for an abstract reason, but because I believe it will transform the lives of our people for the better – we need to get that approach correct in the forthcoming period.

“I accept that we need to engage with, listen to and learn from the people of Scotland on how we take forward our arguments for independence.”

The first result, from Kilmarnock and Loudon, set the tone for the night as Labour came from third to first to beat the SNP in a seat that was number 28 on its list of target constituencies.

Nicola Sturgeon, the former SNP leader, said there would be “a lot of questions” for her party but insisted that mr Swinney should remain leader.

Swings of about 20 points towards Labour continued to take place as candidates for Sir Keir Starmer’s party in some cases leapt to victory from third place.

The SNP's Westminster leader Stephen Flynn - won was reelected as the Aberdeen South MP - was particularly blunt last night saying that the case for independence was a “hard sell right now” and demanded that his party was “bold in our action” and changes course.

“We are experiencing something that we have not experienced for quite some time,” he said. “We are going to be beat in Scotland, we are going to be beat well. So now is the time that we must learn and we must listen.”

The Labour surge saw the return of Douglas Alexander, the former cabinet minister, and the election of potential future ministers including Blair McDougall, who ran the Better Together campaign, and Kirsty McNeill, a charity boss.

Alex Salmond said that “in reality the support for independence is strong. It is the SNP who are weak.”

Anas Sarwar, the Scottish Labour leader, said the result gave his party momentum that he would use to try and unseat the SNP from government at the 2026 Holyrood election.

“I’m confident that we are going to win this election in Scotland, I’m confident that we will have a majority in Scotland and we can start the process of change tomorrow,” he said.

“It’s going to be a significant day in Glasgow, a significant day in Scotland and right across the UK.”

Turnout fell significantly across all of Scotland’s constituencies, with just 47 per cent of the electorate voting in Glasgow North East.

Speaking on ITV, where she was working as a commentator, Nicola Sturgeon, the former first minister, said that the SNP had not put independence front and centre of its campaign. She said there would be “a lot of questions” for her party but insisted that Swinney should remain leader.

However, her predecessor Alex Salmond, now Alba Party leader, rejected the idea that a defeat of the SNP could be taken as an end for Scottish independence.

“The slaughter of the SNP is not because of independence,” he said. “How could it be? The SNP did not even campaign on it. In reality the support for independence is strong. It is the SNP who are weak.”