The UK’s Supreme Court has heard arguments on the case brought by the SNP for a legal Scottish independence referendum and will announce their ruling on Wednesday.
Here’s all you need to know about the court case ahead of their final decision and how it fits into the complicated route to a second vote on Scotland’s future.
What caused this legal test on Scottish independence?
Ms Sturgeon intends to hold a second independence ballot on October 19 next year.
But a major problem stands in the SNP’s leader’s way: the UK Government refuses to let it happen.
Former prime minister Boris Johnson snubbed pleas from Holyrood for the legislation which would let Ms Sturgeon’s party have a referendum, known as a Section 30 Order.
New Tory leader Rishi Sunak has shown no signs of backing down.
However, the SNP leadership say they should have the right to hold IndyRef2 without needing the explicit approval of the UK Government.
Why is the Scottish independence question with the Supreme Court?
Scotland’s top law officer, Lord Advocate Dorothy Bain, deferred the SNP’s case to the Supreme Court to get the necessary degree of confidence that a proposed Referendum Bill would be within Holyrood’s powers.
Britain’s top court said it would be in the interests of judges to hear arguments from both sides.
The UK Parliament law which created Holyrood lets Scotland’s Lord Advocate send legal cases to the Supreme Court if they concern devolved matters.
As a result it will be up to judges in London to come to a verdict on whether the SNP’s case is valid.
What happens if the SNP’s case succeeds?
A victory at the Supreme Court would give Ms Sturgeon a major boost in her hopes of keeping to her IndyRef2 timetable.
It would allow her government to push ahead with plans for a vote despite lacking the approval of the Conservatives at Westminster.
However, the UK Government and unionists in Scotland could pursue other means to undermine a vote.
In August, it was reported the Tories were considering a new law which would mean a majority of all eligible voters in Scotland has to back independence for it to pass.
Legal expert Dr Andrew Tickell said the UK Government would not be completely powerless to stop a vote even if their own case fails.
What happens if the SNP case fails?
Failure at the Supreme Court would deal a massive blow to Ms Sturgeon’s hopes of holding a rerun of the 2014 poll.
The first minister has repeatedly insisted a second referendum must be held legally.
In June, the SNP leader came up with a plan B, saying she would fight the next UK general election on the single issues of independence if she had to.
But the UK Government would likely refuse to recognise this as valid, which would spark a further constitutional crisis.
Under Ms Sturgeon’s definition, pro-independence parties would need to win more than 50% of the vote – not just a majority of seats – for that vote to be considered a success.
Labour’s resurgence a factor in Scottish independence
The lack of support for the Tory government north of the border has often been used by the SNP as a key argument in favour of independence.
But this could be complicated by Labour’s resurgence in the polls.
Sir Keir Starmer will want to peel voters away from the SNP at the next UK election in his bid to enter 10 Downing Street.
However, Scotland’s polling guru John Curtice has said support for Ms Sturgeon’s party remains strong despite events at Westminster.