Brexit Article 50 Supreme Court appeal: Why is Wales involved?
It is difficult to think of a court case in recent years as politically charged and controversial as the legal row over whether MPs should vote to trigger Article 50 - the process to start Brexit.
The case - which has seen the faces of the judges involved splashed across newspaper front pages - began its proceedings through the Supreme Court on Monday.
There, the UK government will appeal against the ruling of the High Court, which said MPs should be able to vote on the starting-whistle to leave the European Union.
They will be joined by a number of other parties which are intervening, including the Scottish and Welsh governments.
- Supreme Court: Government appeal over Brexit powers begins
- UK government dismisses 'tortuous' Welsh case
- Article 50 would 'change devolution'
What is this all about?
In a nutshell, it is over whether ministers can use executive powers to start the process of leaving the EU without consulting MPs.
Ministers hold what are known as royal prerogative powers which allow them to take decisions without Parliament's approval.
The case brought by claimants - the investment manager Gina Miller and hairdresser Dier Dos Santos - was that the government cannot use these powers to override rights enshrined in acts of Parliament.
High Court judges agreed, but the UK government rejects this argument and has appealed to the Supreme Court.
The BBC legal correspondent Clive Coleman explains the case in more detail here.
Why is the Welsh Government involved?
The Welsh Government has been allowed to intervene in the case, arguing that triggering Article 50 would "significantly change" how devolution works.
Permission to intervene means ministers will have their case heard in front of Supreme Court judges.
Counsel General Mick Antoniw argues that triggering Article 50 changes the powers of the assembly and the Welsh Government, and that this cannot be done without a vote in Parliament.
The Welsh Government claims a large number of its functions come from EU law and will "be lost upon the UK's withdrawal from the EU Treaties".
Separately, the counsel general's case sets out that triggering Article 50 will effectively circumvent the Sewel Convention, a set of rules that mean any attempt to change a law in a devolved area of policy needs the consent of AMs.
Mr Antoniw does not ask state that the assembly has a legally enforceable right to veto any Westminster legislation authorising Article 50 to be triggered, but said instead that using executive powers to start the process would "short-circuit" the convention.
What does the UK government say about the Welsh case?
The UK government's skeleton argument has rejected the counsel general's view, saying the additional issues raised "do not provide any tenable basis" on which to uphold the High Court decision.
UK ministers argue that the Sewel Convention is a "political" convention that covers the legislative functions of the Westminster Parliament, and not a "legal principle" that can be tried in a court of law.
They argue that the issue is irrelevant anyway, because the matter of whether consent is needed for legislation concerning EU withdrawal does not tell you anything about the legality of the government using executive powers to trigger Article 50.
The conduct of foreign relations "is a matter expressly reserved" in the devolution legislation to the UK government, the document argues.
The UK government says devolved legislatures "have no competence over it" and that "prerogative power to withdraw from treaties is deliberately unaffected".
Welsh devolution legislation assumes that the UK is a member of the EU but "does not become unworkable" once the process of withdrawal begins, the argument states.
Provisions that prohibit action contrary to EU law "do not require that the UK continues to be bound" to international obligations the UK has under its membership of the union, the case argues.
It views the counsel general's attempt to "generate some relevance of EU law" on one part of the government of Wales Act as "tortuous".
When is the Welsh Government making its case and who is representing it?
The appeal will be heard over the course of four days, with the Welsh Government making its arguments on Thursday morning, but Mr Antoniw is not addressing the court.
Instead a QC, Richard Gordon, will speak for Welsh ministers.
The result of the appeal is not expected until January.