Court showdown: Should Holyrood play a role in Article 50?
Who has the power to trigger Article 50, starting the formal process of the UK leaving the European Union?
That's the question at the heart of this week's Supreme Court hearing.
The High Court ruled the parliament at Westminster should have a say. The UK government is appealing, arguing it should be able to make the decision based on the result of June's referendum.
It wants to use what's known as the Crown Prerogative to bypass parliament. My colleague Clive Coleman has written more on that here.
The Scottish government's top law officer - Lord Advocate James Wolffe - thinks that a vote of the UK Parliament is needed. But in a written submission, he argues triggering Article 50 will have a significant impact on Scotland, so Holyrood should have a say too.
He draws on a range of historical constitutional landmarks to make his case (among them the Claim of Rights from 1689, The Act of Union from 1707 and the Scotland Act which set up the Scottish Parliament).
He contests that these make clear it is Parliament that has the power to change laws in Scotland, not the crown, hence the need for MPs and Peers in London to have their say.
Devolution adds factor, which could complicate things.
His argument goes:
- Leaving the EU would have a significant impact on areas controlled by the Scottish Parliament and the Scottish government (examples given include agriculture and the environment)
- That means Holyrood's approval for the decision should be sought
- In normal circumstances, this would mean MSPs are asked to pass a Legislative Consent Motion, giving their approval for Westminster to make the decision
The Lord Advocate's submission also argues Scottish laws would be affected. For example, many pieces of legislation passed by Holyrood have been designed around European law.
Leaving the EU would mean their terms change. Mr Wolffe contests that needs approval too.
Similarly, the Scottish Government and the Scottish Parliament would no longer be bound by the rules of EU membership.
Ministers in Edinburgh who currently manage EU funded projects would no longer do so.
That, he argues, would mean their powers change. And that, he thinks, requires approval from Westminster and Holyrood.
Complicated stuff, but it boils to the argument that triggering Article 50 will impact on Scotland in a way that means the Scottish Parliament should have a role in the process.
The UK government disagrees. Its main focus is on arguing the case that it can make the decision to trigger Article 50 without any votes in any parliament, including Holyrood. But it has also published a rebuttal to the cases made by the Lord Advocate and others.
Attorney General Jeremy Wright (he's the UK government's top legal figure) says the devolved governments in Edinburgh, Cardiff and at Stormont have no power over foreign affairs.
The Westminster parliament has decided not to devolve any say over international relations in the past. That he says means devolved legislation does not impact on the UK government's ability to use the royal prerogative to trigger Article 50.
What about the idea Holyrood needs to give consent when there will be an impact in devolved areas? The UK government's submission argues this doesn't apply.
First of all, it says there is no actual legislation being considered so the court shouldn't express any view on this (remember the UK government's main aim here is to avoid the need for legislation on Article 50).
Secondly, it says it is up to politicians and not the courts to decide when legislative consent is needed.
The Sewel convention says Westminster should not normally legislate on devolved areas without the backing of the Scottish Parliament. What constitutes normal should be up to politicians, the Attorney General says, and not the courts.
Thirdly, Sewel was designed as a political convention, not a legal principle.
And fourthly, this is a foreign affairs issue so does not fall under the Sewel convention, which applies to legislation "with regard to devolved matters".
Law and politics
The Attorney General suggests the Scottish Government's Lord Advocate is inviting the Supreme Court to stray into the political world. Given the "political sensitivity" of Brexit, the UK government's man adds, that should be resisted.
The politics of this matters hugely.
Even if the UK government loses, it is likely to get an Article 50 bill through the House of Commons. The Lords may prove trickier.
And what about Holyrood, where a majority of MSPs argue the voice of Scottish voters - the majority of whom backed remain - must be respected?
Some in the Conservative Party think the UK government should have dropped this appeal in case it does give the Scottish Parliament some right on Article 50, potentially delaying its triggering.
Scotland's former SNP first minister Alex Salmond told the BBC on Sunday that such a decision could put Holyrood in an extremely powerful position.
The judgement of the 11 Supreme Court justices hearing this case is expected early next year. It could have a significant impact on what happens next on the road to Brexit.