Supreme Court justices will announce their decision on Thursday on the “competence” of the Scottish Bill following a hearing in London in the summer.
The court has been asked to rule on whether the EU exit bill passed by the Scottish Parliament in March is constitutional and “properly within devolved legislative powers”.
At a hearing in July, a panel of seven justices, including the court’s president Lady Hale and deputy president Lord Reed, were urged to find that the legislation “cannot stand”.
The issue was referred to the court to seek legal certainty “in the public interest” by the Attorney General and the Advocate General for Scotland, the Government’s senior law officers.
Advocate General for Scotland Lord Keen told the justices that their case was that “the Scottish Bill as a whole cannot stand”.
He submitted that the Bill “impermissibly modifies” the UK Act on withdrawal from the EU.
The UK Bill was given Royal Assent on June 26 and became the European Union (Withdrawal) Act 2018.
The law officers said in their written case before the Supreme Court that the Scottish Bill was passed “without knowledge” of the outcome of negotiations between the UK Government and the EU institutions and “pre-empts them”.
They stated: “The effect of what the Scottish Bill does is to make provision for the future relationship with the EU and EU law when that relationship is under negotiation.”
They submitted that this “could serve to undermine the credibility of the UK’s negotiation and implementation strategy in the eyes of the EU”.
As well as hearing the case put forward by the law officers, the justices received submissions in response from Lord Advocate James Wolffe QC.
He argued that the justices should rule “in the negative” on the question posed by the law officers relating to whether the Bill “as a whole” is outside the legislative competence of the Scottish Parliament.
He pointed out that although the reference to the court “arises in a politically contentious context, the issues which arise for the court’s determination are strictly issues of law”.
Mr Wolffe said: “The purpose and effect of the Scottish Bill is to promote legal certainty by making provision for the continuity within the domestic legal system of existing EU-derived law upon and following withdrawal.
“Regardless of any treaty on the future relationship which may be entered into between the UK and the EU, there is a need to provide for legal certainty and continuity when the UK leaves the EU in March 2019, and that is the purpose and effect of the Scottish Bill.”
The issue the Supreme Court has been asked to decide is “whether the UK Withdrawal from the European Union (Legal Continuity) (Scotland Bill) is within the competence of the Scottish Parliament”.
The Scottish Parliament’s Presiding Officer has previously ruled that the bill is outside Holyrood’s competence - although SNP ministers say they are confident it is not.