NICOLA Sturgeon's Government will likely lose any court battle over another independence referendum, a former senior civil servant who played a key role in negotiating the terms of the 2014 vote has said.

Professor Ciaran Martin, who was constitution director at the Cabinet Office between 2011 and 2014, predicted the row is heading for a "stalemate".

The SNP previously said it will legislate in Holyrood for another vote and request the power to hold a referendum from the UK Government.

The party insists Downing Street would then be left with three options: agree that the Scottish Parliament already has the power to legislate for a referendum, agree to a section 30 order to put that question beyond any doubt, or take legal action to dispute the basis of the referendum "and seek to block the will of the Scottish people in the courts".

Mr Martin said he did not think the Scottish Government would win such a court case.

He made the comments during an event at the Edinburgh International Book Festival, in which he appeared alongside Professor Sir Tom Devine, Scotland's pre-eminent historian. 

READ MORE: Sir Tom Devine: Those who think independence threat is receding are living in fool's paradise

The pair were discussing the question: where next for the United Kingdom?

Mr Martin, a professor at Oxford University’s Blavatnik School of Government, predicted a "prolonged game of constitutional chess".

He said: "At some point, Holyrood will use its comfortable pro-referendum majority to pass a motion requesting a Section 30 order to grant a referendum. 

"The UK Government will refuse that.

"Holyrood will begin to legislate for a referendum anyway, probably at some point next year, and it will likely end up in court.

"I think, but I'm not a lawyer nor can anyone predict court cases with confidence, but I think the Scottish Government will lose.

"But ultimately, I think that even if they pulled off a surprise win, Westminster could change the law, it could refuse to recognise the result or unionists could boycott the vote.

"My point here is that in law the smooth path to independence sought by Scottish nationalists depends entirely on Westminster's acquiescence, so if Westminster withholds that acquiescence then there's a stalemate.

"We're heading for a stalemate and how a stalemate plays out is something I can't predict."

Elsewhere, Sir Tom said those in London who think the threat of Scottish independence is receding are living in a "fool's paradise".

He argued the union remains in greater danger than at any time since the 1745 Jacobite rising. 

Mr Martin also said the narrative that the threat to the union is receding is "short-term political analysis gone mad".

He said there has been a "sustained, enduring swing" to independence over the course of a decade, while younger Scots back Yes in substantial numbers.

He added: "Now demography is not always destiny and people change their minds, but I think in the historical context these are terrible numbers for the British state.

"The union in 2021 is in better shape than it was in 2020, but apart from that the prospects for it are in worse shape than it any time since, I would venture, the 1760s."

Ms Sturgeon previously said a second independence referendum should be held in the "first half" of this parliamentary term.

The First Minister said she did not propose holding another vote "while we are still grappling with the Covid crisis".