Judges at the UK Supreme Court are to begin hearing arguments in a case which could allow the Scottish Parliament to legislate for a second referendum on independence.
On Tuesday morning, the panel of five justices will start hearing evidence from the Scottish Government.
Two days have been set aside for the hearing at the Supreme Court in London, with the UK Government expected to respond on Wednesday.
The case concerns proposed legislation at the Scottish Parliament called the Scottish Independence Referendum Bill.
Judges have been asked to decide whether the Bill relates to “reserved matters” – meaning it is out with Holyrood’s competence.
Nicola Sturgeon asked the Lord Advocate, Scotland’s chief law officer, to refer the Bill to the Supreme Court when she published the legislation in June.
This was in order to head off any legal challenge from her opponents, with the First Minister saying she wanted an “indisputably lawful” referendum to take place.
The UK Government, represented in the court by the Advocate General, is opposed to a second referendum.
The Advocate General has argued in written submissions that a referendum plainly relates to reserved matters and is outside Holyrood’s legislative competence.
He has also asked the court to rule on whether it has jurisdiction to hear the case, saying the Bill has not yet been introduced to the Scottish Parliament.
At the weekend, the First Minister spoke to journalists about the upcoming case while attending the SNP conference in Aberdeen.
Asked if she was confident the Supreme Court will grant Holyrood the ability to hold a second referendum, Ms Sturgeon said: “I am very hopeful and optimistic of that.
“But anybody who knows anything about court hearings would know that there’s not a lot of point trying to second-guess a court or speculate about the court’s outcome.”
The five Supreme Court judges who will hear the case are Lord Reed, Lord Lloyd-Jones, Lord Sales, Lord Stephens and Lady Rose.
While there is no set time for the judgment to be issued, it could be weeks or months away.
Lord Hope, a former deputy president of the Supreme Court, has suggested such a decision could take six to eight weeks.
A Scottish Government spokesman said: “There is a substantial majority in the Scottish Parliament in favour of an independence referendum and therefore a clear democratic mandate.
“However, as the First Minister has set out, there remains debate over whether the Scottish Parliament has the powers to legislate to hold a referendum.
“Referring this question to the Supreme Court is intended to achieve legal clarity on this point.
“The Scottish Government hopes that a referendum will be deemed to be within the legislative competence of the Scottish Parliament and that is now a matter for the Supreme Court to decide.”
A UK Government spokesman said: “People across Scotland want both their governments to be working together, focusing on the issues that matter to them, not talking about another independence referendum.
“On the question of legislative competence, the UK Government’s clear view remains that a bill legislating for a referendum on independence would be outside the legislative competence of the Scottish Parliament.
“We will set out our arguments in full at the Supreme Court hearing.”