So much happened in this year’s car crash of a UK general election that the disaster suffered by the SNP got too little attention. It lost almost half a million votes and 21 of its 56 seats.

This stunned a party that had grown used to winning. It put in a storming performance after losing the 2014 Scottish independence referendum. Its slick party machine that won an overall majority in the Scottish Parliament elections of 2011 (which is not designed to happen under the voting system) went up a gear in 2015 and marmalised the Scottish Labour party and the Tories, taking 56 out of the 59 available Westminster seats in the process. The Nationalist cause, which has always rested on the notion of an inevitable advance towards the end of the UK, looked poised for triumph.

There were then setbacks – canaries in the coal-mine. First Minister Nicola Sturgeon fell short of an overall majority in the devolved Holyrood election of 2016. The personality cult built around Sturgeon – maintained by her husband, the SNP chief executive – had started to annoy a lot of Scots. This coincided with a realisation that on the economy, education and health, the SNP had a pretty poor record after almost a decade in power in Edinburgh.

Still, when First Minister Nicola Sturgeon announced earlier this year that she would go for a second referendum on breaking up the UK this was hailed south of the border as a masterful move by a genius strategist. She had given the Tories a lesson in the art of surprise. Brexit would hasten independence, because Scots would opt for independence as a way of getting back into the EU

On the contrary, Brexit had made the SNP’s task – at least in the short term – much more difficult. Voters are not idiots. They know, in Scotland, that Brexit is happening and it is difficult enough to handle one historic constitutional upheaval without adding in Scottish independence at the same time too. Then the Scottish Tory leader Ruth Davidson galvanised Unionist opinion and some Labour voters who had switched to the SNP were attracted back by the new shiny left-wing thing Jeremy Corbyn. Fashion – as the sharply-tailored and rebooted Sturgeon should have anticipated – is a fickle mistress.

In the general election of 2017 the cleverly constructed SNP geographical coalition – posing as Tartan Tories in the glens and other affluent parts of the country while being lefties or social democrats in the cities – fell apart.

The result was a calamity on election day. In a devastating piece for The Times Redbox, the Populus pollster James Kanagasooriam has laid it out in stark terms.

He says:

“It is difficult to overstate how poor the SNP’s performance was in June’s general election. The party’s share of the vote fell from 50.0 per cent to 36.9 per cent.”

Indeed, as he points out, there could be worse to come:

“Unfortunately for Nicola Sturgeon, the challenge facing the SNP could get even more acute in the future. The average majority for an SNP seat has fallen from a comfortable c.10,000 in 2015, to a marginal c.2,500 for the 35 seats it currently holds.”

And he calculates that if just 4,800 voters had voted differently this year the SNP could have lost 36 rather than 21 seats.

Has the SNP had it? The party has an impressive infrastructure and members who will not give up. In addition, there have been plenty of reversals of fortune and strange twists in recent years. Perhaps the SNP can rethink.

But it should not be overlooked that Sturgeon and her husband exercised complete control over the SNP, a party in which dissent is banned (yes banned), only on the basis that they were the experts taking the party forwards towards independence. This year they took it a long way backwards. Oops.