There were two losers on Thursday. Most media attention has naturally been directed at Theresa May – “a dead woman walking”. Fair enough. She called the election expecting to win a handsome majority which would strengthen her hand in the Brexit negotiations, and ended up losing seats. To survive even for a little while she will need the support of Dr Ian Paisley’s heirs, as indeed will any successor. Or so it seems.

But what of the other loser? Mrs May’s party is down by 13 seats.  Nicola Sturgeon’s lost 21. From having 56 of Scotland’s 59 seats in the Commons it now has 35. That’s to say it lost more than a third of its Westminster seats. That’s a real drubbing.

In extenuation the SNP still says that it won the election in Scotland – just as Mrs May pretends she won the overall UK election because the Conservatives are still the largest party in the Commons. Moreover the SNP explains that they were starting from a very high watermark. This of course is true. To win 56 seats in 2015 was remarkable. So, when the election was called, Nationalists accepted that they might lose a handful of seats. But 21? That’s several handfuls.

Look at the results, and they get worse for the SNP. It’s not only that huge five-figure majorities melted away like snow off a dyke. It’s that the SNP’s share of the vote slumped to 37 per cent. They can’t even claim to have been the victims of tactical voting. No doubt there was some of that; equally it is certain that the Nationalists would have lost even more seats if more people had chosen to vote for the candidate most likely to beat the SNP. If only three of the 10,088 who voted Conservative in Fife North-East had voted Liberal Democrat, the Nats would have been defeated there. It would have required only a couple of dozen of those who voted Lib Dem in Perth and North Perthshire to switch to the Tories for Pete Wishart to have been ejected from Westminster.

The Unionist parties, especially the Tories, put the demand that there should be no second IndyRef at the heart of their campaign. By doing so they turned the parliamentary election into an unauthorised referendum on Independence – and won it handsomely. The three Unionist parties got some 62 percent of the vote, against the SNP’s 37. That’s to say they more than doubled the margin of victory in the authorised 2014 Referendum. Independence has been kicked into deep long grass – and will stay there for a bit.

There were of course other issues, chief among them the Ms Sturgeon’s failure to do her “day job” competently. Education and the Health Service are devolved responsibilities. Failure there is seen as the Scottish Government’s failure, and the SNP has now been in government for ten years.

So what of Ms Sturgeon’s position now? She has lost more heavily than Mrs May, and this is actually the second election in which the party she leads has fallen back. It lost its Holyrood majority last year and now has to rely on the support of the Greens. But that was a small loss, a narrow defeat. This time she has lost big and heavily.

Moreover it has been very much her party, and this her election. Vote Nicola Sturgeon for Scotland’s future. Scotland has turned that on its head. The immediate question isn’t Scotland’s future but Nicola Sturgeon’s.

The SNP was for long a party tolerant of its leaders’ failures. In 1992 they called for Scotland to be free by ’93, and won only three seats. Yet Alex Salmond survived that embarrassment, and continued to survive defeats as long as the party was making progress, the march to the Promised Land of Independence continuing. I never thought he would get there. In newspaper articles I compared him to Moses, permitted to view the Promised Land but not to lead them across Jordan.That role was reserved for Joshua.

Well, it seemed that Nicola Sturgeon was destined to be the SNP’s Joshua. But far from crossing Jordan she is sinking in the river and the Promised Land seems more distant than it was when she became the SNP leader. Can she survive? Should she?

The knives aren’t out yet, and the SNP doesn’t have the ruthlessness of the Conservative Party. Indeed if the English Tories are snarling wolves who tear a failing leader to bits, the Scottish Nationalists are more like sleepy lap-dogs that may growl and snap but rarely draw blood from the hand of their master or mistress.

Accordingly there hasn’t yet been a call for Nicola to do the decent thing and allow the Party to find a better Joshua. She can count herself lucky she isn’t a Tory leader. And yet some nationalists must surely be muttering, wondering how long they should tolerate failure.

For, when the dust has settled, the clamour died away, the pretence that they won the election in Scotland will be unsustainable. This election was a disaster for them. Nicola Sturgeon is damaged goods. If she played football or rugby, the coach would be calling her off and sending on a substitute.