Here's a brief reminder of the arguments from both sides...published at 07:53 Greenwich Mean Time 23 November 2022
First Minister Nicola Sturgeon wants a referendum to be held on 19 October next year.
But the UK government has so far refused to give formal consent for the vote to go ahead.
The Supreme Court was asked to clarify whether the Scottish Parliament can legislate for a referendum without that consent.
Dorothy Bain KC, the Scottish government's top law officer, has argued that a referendum would be "advisory" and would have no legal effect on the Union.
Ms Bain told the court that while Scottish ministers might have the "subjective intention" of independence, the bill itself would be objectively neutral.
But Sir James Eadie KC, the UK government's independent barrister on legal issues of national importance, said it was "obvious" that the bill related to reserved matters and the Union.
He said that meant it would fall outside of the competence of the Scottish Parliament, and argued that the Supreme Court should not rule on the case.