In May 2019, just over four years ago, Scottish Labour came fifth in a national election. In that final election to the European Parliament, the party gathered fewer than one in 10 votes, only narrowly beating the Greens.

There were, of course, some extenuating circumstances (mainly the presence of the Brexit Party) which made this an atypical national election, but that it did not come as a shock when the party attracted less than 20 per cent of the vote in the General Election later that year tells its own story.

This was a party in the mud. Led by a man, Jeremy Corbyn, on whom MI5 kept a file to monitor links to the IRA, who compared Israel to Islamic State, and who signed a statement partly blaming Nato for the war in Ukraine, the prospect of being in a position of power ever again, let alone relatively soon, seemed fanciful and ridiculous.

And yet, only one election cycle later, his successor Sir Keir Starmer sits consistently and handsomely ahead of the governing Conservatives in all opinion polls. The only realistic debate, as things stand, is whether he will win a majority at the upcoming General Election or whether he may have to make a call to the Liberal Democrat leader, Sir Ed Davey, to ask for some help.

Read more by Andy Maciver: We need to accept that it's OK for governments to change their mind

As Sir Keir continues to sanitise his party at every opportunity, placing it in the pragmatic centre ground of British politics, his and his party’s popularity in England continues to increase.

Scotland, of course, is a tougher nut to crack for Sir Keir’s chum, Anas Sarwar. There is another player in the game here, the Scottish National Party, and so overturning the advantage of the Conservative Party is only one, and indeed the lesser, part of the job.

And, yet, it appears to be happening. Much as Sir Keir’s ascent is impressive, it must be considered less so than that of Mr Sarwar, who is having to beat two larger opponents at once.

In doing so, he has two target markets. His first is what I would call the "soft unionist" voters who, since the independence referendum, have become used to voting Conservative. Their vote has been driven largely by their vociferous opposition to the holding of another independence referendum; they have seen the Tories as the strongest and best opponents of independence, and as the party in government at Westminster and therefore with the actual power to prevent it, so they have held their noses and voted Tory.

Many Tories have never tired of telling me over the last decade or so that their vote is solid and that they are on a path to power; in reality their core vote has been in the mid-to-high teens for the entire quarter-century of devolution, and the hundreds of thousands of Scots who have loaned then their vote for a particular purpose have now taken it back, and will give it to Mr Sarwar, who better represents their instinctive sensibilities.

Mr Sarwar’s turn towards economic centrism will do no harm at all in cementing this soft unionist vote. These people might reasonably be placed in the box marked "Blairite", so his recent refocusing on economic growth as the only way to alleviate poverty, and his confirmation that he will oppose yet more increases in income tax and council tax, will keep their heart rates in the safe range.

Now, as it turns out, that same shift to economic centrism is helping Mr Sarwar reel in his other key target audience; those I would characterise as "soft nationalists".

Until the SNP’s leadership election in last spring, one might have been forgiven for assuming that all of the party’s one million or so voters were unreconstructed lefties, unquestioning in their approval for high taxes, high welfare expenditure and unreformed and inefficient public services.

However the stark difference on offer in the contest between Humza Yousaf and Kate Forbes - between a socialist and a liberal - opened a window into the party’s membership, and its voter base, and helped us understand that the centrist, entrepreneurial, aspirational nationalist streak had not only survived, but was really rather prevalent.

Internal polling for the SNP, which appeared in the press last weekend, showed the SNP vote falling by 14 per cent amongst the middle-aged, and by 11 per cent amongst the middle class. Separate polling, for True North, showed that twice the number of people consider Scotland’s high income taxes to be poor value for money than the number who consider it good.

Mr Yousaf’s Programme for Government, announced on Tuesday and skewed towards that more leftist agenda, is highly unlikely to fundamentally alter that balance or reverse the momentum.

Read more by Andy Maciver: Sorry, Sir Tom, but Scotland is nothing like Ireland

The data should come as less of a surprise than it does. Scotland is a fairly typical European country, in that it has a large swathe of voters which might broadly be considered centre-left, and a roughly equally large swathe of voters who might broadly be considered centre-right. It appears counter-intuitive here only because, uniquely in Europe, the party of the centre-right, the Tories, are not considered a viable government and therefore do not attract the bulk of the centre-right votes.

So when we combine all of these factors, it should be unsurprising that Mr Sarwar and his Labour team (and his core front-bench team, it should be said, is of high quality) are attracting votes from both its opponents. The most recent poll, by Redfield and Wilton Strategies, has Labour and the SNP tied at 35 per cent, with the Tories back on their core 15%.

Tied, though. Not winning yet. And Mr Sarwar is not going to win, either at Westminster in 2024 or at Holyrood in 2026, by taking his foot off the pedal.

Cementing his position as a domestic policy centrist is one thing, but now he must also find the centre ground of constitutional policy. He is flanked by a Conservative Party which is emotionally and unquestioningly tied to a "this far and no further" mentality, and an SNP which is unrepentant in its "independence or nothing" approach.

Most people are sitting in between, including a very large number of SNP voters. That is the final piece of Anas Sarwar’s jigsaw puzzle. It remains Scotland’s great question. It looks as though only Mr Sarwar can supply the desired answer. And, if he does, the reward will be substantial.