It was an insurrection of the discontented, a cry of anguish and anger, a single transferable protest vote.

Many congratulations to Michael Shanks for his victory in the Rutherglen and Hamilton West by-election. He fought a good fight and won.

However, let us also be a mite circumspect. Yes, Scottish Labour has doubled its presence at Westminster. From one to two.

Much can happen between now and the UK General Election, expected next year – let alone the next Holyrood elections in 2026.

READ MORE: Rutherglen and Hamilton West by-election: Sarwar hails seismic win

I am certain that, alongside the triumphant feasting, there will be a side order of caution from Anas Sarwar and Sir Keir Starmer. They each have reason to recall the turmoil from which Labour has only recently escaped.

Perhaps we might look at a few of the factors which influenced the pattern of voting in this contest.

Firstly, local. Margaret Ferrier, the former SNP MP in this constituency, worked long and hard – to anger and distance the electorate.

She contracted Covid, she concealed the fact, she exposed the public in the words of a subsequent court case to “the risk of infection, illness and death”.

Seemingly not content with that, she clung on to her Westminster seat until finally ousted by a recall petition. Not, all in all, an ideal prelude to the SNP campaign.

But the Nationalists would make a grave error if they were to attribute this defeat to the Ferrier factor. It is a mistake I am certain they will avoid.

For, like Ms Ferrier, the SNP has been striving diligently of late to exasperate the citizenry.

OK, so they could perhaps do little about a prolonged police inquiry into their party finances. Still does not help win favour and influence people. Those images of a tent outside the erstwhile leader’s home.

And how about that leadership contest in which one contender trashed the record and reputation of the eventual winner?

Or how about the atmosphere in the party since? The bickering and backbiting? The squabbles over the pact with the Greens?

Or the policy problems? Lengthy waiting lists in the health service. And, while you wait, time to scan the Herald website and catch up on the latest about deposit return or short-term lets.

Within it all, a serious discourse about Scotland’s economic direction. Vitally important, inevitable in fact – but scarcely likely to attract sympathy and support from voters anxious about paying their own bills.

So, this defeat has been building. But, equally, it is possible that it can be reversed – or, at least, modified – if the SNP can contrive to settle internal disquiet while Labour is obliged to set out, in detail, its own programme.

Let us deal with the dog which did not bark in this by-election. The question of Brexit.

The SNP tried again and again to raise the subject of the European Union. With, on the face of it, good reason.

SNP canvassers linked Brexit to austerity, arguing that the economy has been measurably damaged by leaving the EU – while Labour has openly declared that it will not reverse the UK’s exit, mandated as it was by a narrow referendum choice.

Nationalists tried. They really tried. They listed Brexit alongside such issues as the two-child benefits cap in accusing Labour of abandoning core values.

Now, issues such as benefits may well surface again, once there is a sharper focus upon domestic choices. But Brexit simply does not seem to be setting sail as a marker for the electorate.

I have long suspected that would be the case. Yes, Scotland voted by two to one to remain in the EU. On balance: partly from conviction, partly following SNP prompting and partly to distinguish Scotland from England.

But, frankly, as an issue, it does not annoy enough people to be electorally decisive. It is just not as salient as independence. It does not engender sufficient enthusiasm, either way.

The Tories, Labour and even the Liberal Democrats quietly sideline Brexit. And they get away with it, despite protests from the SNP.

Then another Rutherglen dichotomy. The voters were offered competing strategies.

Humza Yousaf and his chums argued that Westminster only took notice of Scotland when folk voted for the SNP. Make them pay attention – and respond, he urged.

But Anas Sarwar said Scotland was beset by two failing governments, the SNP at Holyrood and the Tories at Westminster.

The offer to fretful voters was “change” – endlessly trumpeted again and again at Labour’s victory rally in Rutherglen. It worked.

Never neglect the scunner factor in Scottish politics. Folk are angry, anxious and scared. Labour found the right demeanour to match that mood.

In west of Scotland constituencies like this, they used to weigh the Labour vote. That generated complacency. Smug, self-satisfied complacency.

No longer. Mr Sarwar said Labour would win through “hard work and humility”. Note the second element of that formula. Instead of privileged incumbents, he pitched his Labour Party as the opposition to both the SNP and the Tories.

Again, it worked. The SNP support stayed at home or switched while pro-Union Tories in Rutherglen’s douce districts voted tactically to punish the Nationalists.

Sir Keir Starmer described the result as “seismic”, no doubt contemplating the 20 or more Scottish gains which might help propel him into Downing Street.

This was a fine victory for Labour. A deserved victory. It could indeed be the beginning of something sizeable.

Read more by Brian Taylor: Fergus Ewing is a standing rebuke to Humza Yousaf

But by-elections do not always translate. Labour’s rivals must hope that voters may take a more sceptical look at Sir Keir’s policies – and, indeed, at Sir Keir - as the General Election nears.

The Liberal Democrats will be disappointed, if sanguine. The Tories have work to do. But then they already knew that.

SNP support is spread across Scotland. A strength when they are on the up. A problem in decline. They have few certain footholds – although Tory opponents may present less of a challenge.

Right now, a choice. The SNP can deploy this defeat to turn up the volume on that endlessly stimulating internal conflict.

Or, starting next weekend at their annual conference, they can admit the scale of the challenge and confront it, collectively. Touch and go, I reckon.