Could indyref2 be held without the UK's consent?
The Court of Session is hearing arguments about whether Holyrood can legislate to hold a new Scottish independence referendum even if the UK government continues to oppose one. What could it mean for indyref2?
What's this all about?
The court case seeks to settle the legal question of whether the Scottish Parliament has the power to pass the necessary laws for a new referendum on independence.
The previous vote in 2014 was underpinned by a "section 30 order", an agreement between the UK and Scottish governments, before legislation was passed by MSPs.
First Minister Nicola Sturgeon wants a similar deal to be struck for a new referendum, but has been rebuffed by successive prime ministers - with Theresa May saying "now is not the time" for a vote and Boris Johnson insisting that 2014 was a "once in a generation" event.
Ms Sturgeon insists this UK government position is unsustainable, and will crumble if the SNP win May's Holyrood elections - but others in the independence movement want to see more action to force the issue.
Hence a case at the Court of Session which has not been brought by Scottish ministers, but by activists - led by Martin Keatings, who raised huge sums in online crowdfunders to bring a full legal team on board.
What is the argument?
The pursuers - represented in court by Aidan O'Neill QC - argue that Holyrood has the competence to legislate for a referendum, if not to directly break up the union.
They say Holyrood gets its legitimacy from the people of Scotland, not from Westminster, and is directly accountable to them rather than to UK ministers.
The constitution and indeed "the Union of the Kingdoms of Scotland and England" are clearly reserved matters, as listed in the Scotland Act.
But the pursuers argue that the bare fact of holding a referendum about the union would not automatically lead to constitutional change, regardless of the result.
They point to Brexit as an example of how "complex and lengthy negotiations" would follow a Yes vote, arguing that "a referendum - nor indeed the outcome of a referendum - is not the act of secession".
And they say this is a prime moment to answer the question of Holyrood's powers, given indyref2 seems set to be a key issue in May's election.
Mr O'Neill said the SNP government has repeatedly pledged to bring forward a referendum bill and indeed hold a vote in the coming years - and that "any informed voter needs to know whether that claim can be carried out, or whether it is just bluff and bluster".
What do the UK government say?
Given Boris Johnson and his ministers have repeatedly insisted that 2014 was a "once in a generation" vote, it is no surprise that they are opposed to letting MSPs legislate for one at the time of their choosing.
Lawyers for the UK government raised a number of procedural complaints about the case, saying the proceedings are academic, premature and irrelevant. If any of these were upheld, it would essentially see the case thrown out without the question being answered either way.
However they have also offered a straightforward riposte to the core argument - that the constitution is clearly a reserved matter, and that a vote on a constitutional matter should require an agreement with Westminster.
What is the Scottish government's position?
Scottish ministers are obviously in favour of indyref2, but have kept their cards rather closer to their chest when it comes to this case.
The government was initially represented in the case, and opposed it on procedural grounds - arguing it was hypothetical and premature - without making any submission about Holyrood's competence.
They then formally withdrew in August 2020, but somewhat confusingly the Lord Advocate - a Scottish minister - is still represented in court as a defender.
The chief worry for the Scottish ministers here is a political one - should the case go against Mr Keatings, would it set a precedent in law that they must win agreement from Westminster for indyref2?
Ms Sturgeon has essentially been keeping court action in her back pocket as a contingency plan, should another electoral mandate fail to move Mr Johnson.
Her government views this case as a complicating factor - if they wanted to go to court, they would far rather have a straight legal battle between themselves and the UK government on grounds of their choosing.
What could the ruling mean?
Should the court rule one way or the other on Holyrood's competence, it could have far-reaching implications in terms of legal precedent. But would it change the facts on the ground in the referendum row?
First, let's imagine a world where the pursuers are successful, and the court rules that MSPs can call a referendum without a section 30 order.
That might undermine Boris Johnson's position somewhat, but there would still be nothing to stop him arguing against a referendum for one political reason or another - or indeed of the unionist side boycotting any poll which is set up in the absence of an explicit agreement.
And this would still be a major consideration for Ms Sturgeon. It is not for purely legal reasons that she wants a "gold standard" agreement in the vein of 2014.
She wants any new vote to be unimpeachable in its legitimacy, to have international recognition - particularly from the EU, which she would like to see Scotland rejoin some day. The first minister does not just want a referendum, she wants it to deliver independence.
Such a ruling would pile further pressure on Ms Sturgeon to push ahead with a vote - but ultimately she would still want both sides to accept the terms, and to fight things out in a campaign rather than a courtroom.
That will equally remain the SNP leader's position should the ruling go against Mr Keatings. She might be effectively bound into it, but her preferred approach would still be a political one rather than a legal one.
And such a result might not even rule out further court action, beyond the matter of appeals by the pursuers. One of the Scottish government's arguments against the Keatings case is that it is premature, because they have not even published their draft bill yet.
The court rebuffed an attempt by the pursuers to have the government hand over their legislation, so it will not be picked over line by line.
So once it has been drawn up, Scottish ministers could potentially still launch a far more focused legal battle over its competence - by simply passing it, and forcing UK law officers to challenge it at the Supreme Court.
The draft legislation is due for publication in the run-up to the Holyrood election, so the issue of indyref2 is set to come to the boil in the coming months regardless.
This court case may be the opening salvo in year of constitutional collisions - which could decide the future of the union.