Nicola Sturgeon has said the chances of an SNP majority at Holyrood hang “in the balance” as early results saw her party pick up a number of seats.
Ms Sturgeon - who is on course to remain as first minister after the first day of vote counting - warned Boris Johnson that if most Scottish parliament seats are held by parties in favour of another independence vote, “that has to be respected”.
As the first round of vote tallying drew to a close Ms Sturgeon’s party won 39 of the 48 declared seats so far - and were the only party to make gains on their rivals as they picked up three additional seats.
Among them was Edinburgh central, once held by the former Scottish Tory leader Ruth Davidson, who bucked trends for the party north of the border in the 2016 election before stepping down from the role and taking up a seat in the House of Lords. Her place was taken up by Angus Robertson, the SNP’s former leader in Westminster.
However, while the potential for a turnaround remains, nationalist hopes for a majority were dealt a blow on Friday night after Labour held the key marginal of Dumbarton with an increase in vote share. Jackson Carlaw, another former Scottish Tory leader, was also re-elected to an SNP target seat with a growth in support.
Hopes for an independence “supermajority” as touted by the former SNP chief Alex Salmond also vanished, with his newly formed Alba party retaining just 2 per cent of the vote across Scotland. The Scottish Green party, which also supports an independence referendum, has so far polled nationally at 7 per cent.
The SNP argues a majority would bolster its case for a second referendum, just seven years after Scots voted to stay in the UK.
Last night senior Scottish Labour figures suggested that the issue might come down to the outcome of a single seat.
Earlier Ms Sturgeon told Sky News: “If people vote for a pro-independence referendum majority in the Scottish parliament, whether that is an SNP majority - which is very much in the balance and, you know, has always been a longshot - or an SNP-Green majority, then that has to be respected and that’s a basic principle of democracy.”
As counting got underway the SNP made two gains, taking Ayr from the Conservatives and East Lothian from Labour.
But the Scottish parliament’s electoral system can mean that parties are penalised for gains they make in constituencies when it comes to the allocation of additional member top-up “list” seats.
Elsewhere, the SNP only narrowly held on to Banffshire and Buchan Coast, where the candidate Karen Adam won with 14,920 votes, just ahead of the Tories’ Mark Findlater on 14,148. The SNP had previously had a majority of 6,683 in the seat, but that was cut to just 772.
The SNP also held Clydebank and Milngavie but the Labour vote in the seat increased by almost 10 per cent.
Although counting is still at an early stage, the mixed bag of results could suggest pro-UK voters are lending other parties their votes in a bid to deny the SNP a majority.
While cagey about the chances of an outright majority, Ms Sturgeon was more bullish when it came to predicting that her party was on course for a fourth government term.
Her deputy also forecast that the SNP would be the “largest party” after the elections, but refused to be drawn on the chances of his party securing a majority.
John Swinney, who is also the Scottish government’s education secretary, comfortably held his own Perthshire North seat, increasing his majority over the Tories.
On the issue of a second independence referendum, Mr Swinney vowed he would "do all that I can" to "ensure that the people of Scotland have a choice on their future as they should have".
He added: "That is an absolutely gigantic feat for the Scottish National Party to have achieved, to be on the brink of a fourth continuous term."
The first seat to be declared in the race for Holyrood was Orkney, a long-time Liberal Democrat stronghold, where the party’s candidate Liam McArthur was re-elected.
The SNP also held Aberdeen Donside, a seat previously filled by Mark McDonald, who resigned from the party after allegations of inappropriate behaviour.
Early results also suggested turnout among voters was up on the last election in 2016.
Of the first 30 seats in the Scottish parliamentary contest to declare, 26 went to the SNP, three to Liberal Democrats and one to the Tories.