The Scottish parliament does not have a veto over the UK government's decision to leave the European Union, Scotland's top lawyer has confirmed.
Nicola Sturgeon has previously suggested that Holyrood could effectively block the legislation necessary for the UK to leave the EU by asking the Scottish parliament to withhold consent for it.
On Wednesday, Scotland's Lord Advocate told the Supreme Court in London that Holyrood has no such veto and that the decision to leave the EU ultimately lies with Westminster, but added that Holyrood should be consulted on the matter.
James Wolffe QC spoke at the hearing to argue against the UK government's case that it would be able to trigger Article 50, and therefore begin the process of leaving the EU, without consulting the Westminster parliament.
"I do not assert that the Scottish parliament has a veto on the decision to withdraw the United Kingdom from the European Union," said Woolfe. "That decision is ultimately, I say, for the Queen and parliament.
"What I do say is that the question of whether the Scottish parliament consents or does not consent to the effects of withdrawal with regards to devolved matters is, by virtue of the legislative consent convention, a matter of constitutional significance."
Wolffe argued that, because the UK leaving the EU would affect matters devolved to Scotland, Holyrood would normally have to give its blessing to the changes in law with what is known as a "legislative consent motion" or convention.
However, Scots lawyers have previously told BuzzFeed News that Westminster could ignore such a motion with no legal implications as it is merely a convention that is expected to be carried out rather than a law.
The Lord Advocate went on to invite the court to consider the separate roles of the Scottish and UK parliaments and the effect that leaving the EU would have on matters already devolved to Holyrood.
"In that context, it is constitutionally relevant and significant to know if the Scottish parliament consents to those effects," said Wolffe. "It is then for the UK parliament to decide, in light of the views of the devolved legislatures and its own assessment, what to do."
Wolffe will continue to put forward his case on Thursday morning.
Jamie Ross is a Scotland reporter for BuzzFeed News and is based in Edinburgh.
Contact Jamie Ross at firstname.lastname@example.org.
Got a confidential tip? Submit it here.