In the wake of the SNP’s annus horribilis, from the resignation of Nicola Sturgeon and the bitterness of the ensuing leadership contest to the party’s hammering in Rutherglen and Hamilton West, SNP politicians know they are in a hole, but most of them believe they can climb out of it.

One might think that it is incumbent on them as politicians to project confidence that they can win the upcoming general election in Scotland. But there is genuine belief, too, that they can at least partly recover by the autumn.

That belief contradicts the dominant narrative of Labour’s resurgence and momentum and an expected wave of political change. But setting aside that narrative, if the SNP is to recover in 2024, what would that recovery look like?

While there has been a large swing from the SNP to Scottish Labour, the hole the SNP is in is not as deep as you might think. The swing from the SNP to Labour between the final five polls of 2022 and the final five of 2023 was 7.4 points, reducing their average poll lead from 15.2 points to 0.4 points.

Scotland’s electoral geography, particularly the concentration of Labour votes in the central belt and urban Scotland, combined with First Past the Post, would mean that an SNP lead of this size would still lead to Labour becoming Scotland’s largest party. But the swing back to the SNP needed for them to retain their position as Scotland’s largest party at Westminster (albeit still with heavy losses) would be just a single point.

To win a majority of seats in Scotland, they would need a swing back to them from Labour of just 2.3 points. To match their 2017 seat total – their worst national election performance since 2010 – would require a swing of just 3.2 points.

READ MORE: Scottish independence: Reports of its death are greatly exaggerated

The SNP in Scotland are not our localised equivalent of the Conservatives UK-wide – their decline is not yet locked in, and Labour’s resurgence is not a done deal.

They can conceivably secure their recovery by winning back 2019 SNP voters who are undecided. Polling suggests that 62% of 2019 SNP voters intend to vote SNP in the next general election, with 15% to 22% intending to vote Labour and 8% to 17% undecided.

Take the more challenging scenario, in which 8% of 2019 SNP voters are now undecided, but 22% intend to vote Labour. Winning back those undecideds would see the SNP and Labour finish on 24 seats each. In the scenario of 17% undecided, winning them back would deliver a similar result to 2017 for the SNP and blunt Labour’s advance.

On a strategic level, the audience for the SNP’s 2024 campaign is clear. This will be a defensive campaign for the SNP to retain as many of their 2019 voters as possible.

The more difficult question is finding the right message to retain those voters. The First Minister spent the first six to nine months of his tenure clearing the decks of problematic policies and political issues that were acting as a drag on his party, but he has failed to convincingly set out what his mission in government is or what a vote for the SNP is for in a post-independence referendum era.

So many SNP voters are now looking at Labour because of their desire for change and belief that, as independence is not going to be delivered any time soon, change must be delivered within the Union. The SNP will not persuade them otherwise, so they must go with the grain.

READ MORE: Scotland and foreign affairs: both our governments need to grow up

The economy and the NHS are, by far and away, the top issues for 2019 SNP voters, as they are for voters overall. Independence comes a distant third. These are the two issues – the economy in particular – that will dominate the campaign and which the SNP will need to craft their messaging around.

The stall Mr Yousaf sets out this year will need to centre on what the SNP would want to see the UK Government do to support families through the cost-of-living crisis better, to grow the economy, and to deliver economic security. The SNP must persuade their voters that SNP MPs would be a voice for economic radicalism in the face of severe global economic headwinds and a force for change at Westminster.

At the same time, they must convince their voters that Sir Keir Starmer’s Labour will not be the force for change that Labour will paint themselves as, exploiting Sir Keir’s penchant for watering down or flatly u-turning on radical policies and Labour’s buy-in to Conservative framings of government spending.

Remember that the audience here is left-leaning, pro-independence SNP voters – not the electorate overall. The message that Sir Keir is too conservative to bring about the change such voters want is not difficult to sell.

All political campaigns have limited bandwidth. They can communicate only a few messages effectively throughout an election, which must be simple and easily repeatable. For the SNP, that core message is that only a strong contingent of SNP MPs at Westminster can push for the change voters want and that Labour cannot be trusted to deliver on their own.

READ MORE: Victory for Sarwar? Next year could build the path to victory

There will be no room for making this election about independence. Efforts to do so would merely muddy the SNP’s messaging and put off the voters they risk losing to Labour, doing Labour’s work for them.

Of course, they will also need a helping hand in the form of Operation Branchform concluding without charges being brought against senior party figures. Renewed difficulties for the party would throw it off-message and convince swithering voters to look elsewhere. You can forget about a political recovery if charges are brought against a senior party figure.

They must also maintain discipline if they want to fight an effective campaign. They cannot afford weeks-long, self-inflicted scandals à la Michael Matheson’s iPad, nor the infighting that has scarred the party in recent years.

If all of this sounds more like the SNP of 2015 than of late, that might indicate how likely I think it is that the SNP can pull off this kind of campaign in their current state. I stand by my prediction that they will lose the upcoming general election in Scotland. But there is a path to victory if they are willing and able to walk it.