ANAS Sarwar is facing a tough few years. The blush of hope may have been spreading through Labour ranks lately, but the party’s route to the next general election just got trickier to navigate. There are fresh craters ahead since Nicola Sturgeon lobbed her constitutional grenade this week, and Keir Starmer and Sarwar must pick their way carefully through in order to win in 2024.

But Nicola Sturgeon’s attempt to turn the 2024 general election into a poll on the constitution also opens up a huge opportunity for Labour. Where the endless discussion of a second binary referendum pits independence against the status quo and excludes any third way option, Ms Sturgeon’s general election poll – what she calls a “de facto” referendum – would allow Labour to lay before voters a third constitutional choice in their manifesto.

The Conservatives and SNP have made the constitutional issue a fight between independence and the status quo over the last decade, but in a general election fought on the constitution, with Labour in pole position, Labour would be able to displace the Tories’ offer with their own more progressive one, creating a contest – independence versus federalism – that is harder for the SNP to win.

It won’t be easy for Keir Starmer’s party though.

It is now reasonable to say, electorally, that Labour has a modest edge over the Tories. Labour has always been the only serious potential challenger to both the SNP in Scotland and the Tories at Westminster, but was on the back foot for years.

READ MORE: Who will carry can for cost of living crisis?

That’s been changing. In May’s Scottish local elections, Labour snatched second place from the ailing Tories and the latest Ipsos Mori survey ranks Mr Sarwar the most popular leader in Scotland, above Ms Sturgeon.

At UK level, Labour has been polling ahead of the Tories for six months and turned this into victory in last week’s Wakefield by-election.

This week, shadow foreign secretary David Lammy even predicted a “comfortable majority” for his party in the 2024 general election.

But the pesky Scottish question makes Labour vulnerable to some well-worn but potentially damaging attacks.

It faces a pincer offensive from the SNP and Tories.

Assuming that the Supreme Court knocks back Ms Sturgeon’s right to hold a referendum next October, then we’re heading for that general election in 2024 which Ms Sturgeon would like to fight on the constitution.

She can’t force people to vote on a single issue in that election, of course, so it’s not a referendum in the true sense; independence wouldn’t flow from it even if the SNP won a majority of Scottish votes.

But an SNP vote majority would put intense pressure on the new Westminster government to accede to a second formal independence referendum.

So that question will dominate the campaign. Keir Starmer in particular will be asked: what will you do if the SNP win a majority of votes in Scotland? Will you agree to a formal referendum?

That creates a bit of a tactical dilemma for the Labour leader. If he campaigns on the basis that as Prime Minister he won’t agree to a Section 30 order in any circumstances, then Ms Sturgeon will ruthlessly portray him as showing contempt to Scotland and for democracy generally. A lot of Scottish voters would agree with her. He would lose some votes over it.

Any wobble in his opposition to a second independence vote, however, and the Conservatives will ruthlessly portray him as weak on the union. He would lose some votes over that too.

READ MORE: Renewable energy rip-off

Starmer certainly won’t want to end up in the same position as Ed Miliband in 2015, when the Tories launched a stinging social media campaign showing the then Labour leader in the pocket of Nicola Sturgeon (the accusation being that Miliband was preparing to make a deal with the SNP to get into government). It was campaign gold for the Conservatives, in England and Scotland, and damaged Labour at the ballot box.

If Starmer stands firm on a referendum, however, there will be endless pelters from the SNP. Nicola Sturgeon’s insistence that Labour are Tory lapdogs, based on their support for the UK union, has done Labour harm in the past and she alluded to it again at First Minister’s Questions yesterday.

So by making the next general election so explicitly about the future of Scotland, Ms Sturgeon has given Keir Starmer a serious headache.

But she’s also created one for herself by opening up for Labour a way of seizing control of the 2024 narrative and, in effect, put federalism on the ballot paper.

Work on Labour’s refreshed vision of a reformed UK is already underway, of course. A Labour constitutional commission chaired by former Prime Minister Gordon Brown was launched last year. Brown has spoken of the need for a “constitutional revolution” to save the union. We don’t know yet exactly what Labour’s offer will be going into the general election, but probably some form of federal arrangement in the UK (which Mr Starmer signalled his support for while a Labour leadership candidate), with further devolution to the nations and regions of the UK (decentralisation of power to the English regions being essential to create a balanced UK), and reform of the House of Lords to create a Senate of the Nations and Regions. Voting reform is also a possibility.

Critically, the Lib Dems – long-term advocates of federalism who could be instrumental in removing the Tories from power in 2024 by taking key southern seats off the Tories – have welcomed Labour’s commission and declared a willingness to collaborate.

Voters will have a great deal on their mind by 2024 and changing the UK constitution is unlikely to be very top of the list.

But if the SNP want to make that vote all about the constitution, then Labour (and the Lib Dems) look set to be ready with their pitch and are likely to be more formidable opponents than the Conservatives have ever been.

On the other hand, the SNP might win its hoped-for majority for independence, in which case the moral pressure for a real referendum would become completely irresistible and independence itself much more likely.

We don’t know yet, but the famously cautious First Minister has just made her greatest gamble yet.

Our columns are a platform for writers to express their opinions. They do not necessarily represent the views of The Herald.