WESTMINSTER is sovereign and the UK’s relations with the European Union are “not within the competence” of MSPs, the UK Supreme Court has heard.

On the second day of the hearing, Lord Keen of Elie, the Advocate General for Scotland, speaking for the UK Government, told the 11 judges that that it was "perfectly clear" that the so-called royal prerogative power, now exercised by Whitehall, applied in Scotland, Wales and Northern Ireland just as it did in England and its use was a matter for the UK Government.

"There is no means by which you can suggest the exercise of the foreign affairs prerogative is in any way impinged or qualified by devolution legislation," he told the court.

The UK Government is seeking to have overturned an earlier High Court ruling that said Theresa May could not invoke Article 50 by using so-called prerogative powers and MPs should have a vote on it.

The Scottish Government’s case, to be put forward tomorrow by James Woolfe, the Lord Advocate, is that MSPs should have a vote on it too because EU law is so intertwined with Scottish legislation; the so-called Sewel Convention stipulates that Westminster would “not normally” legislate on devolved matters without Holyrood’s consent.

In his initial submission, Mr Woolfe cited historical documents such as the Act of Union and the Claim of Right to bolster Edinburgh's case that there was a constitutional requirement that Holyrood should have a say.

But Lord Keen referred to an Act of the Scottish Parliament dated 1703, which stated: "’Everything which relates to treaties of peace, alliance and commerce is left to the wisdom of the sovereign.’"

He noted: “In other words, four years after the Claim of Right, the Scottish Parliament made it perfectly clear that the prerogative right in respect of foreign affairs remained the prerogative right of the sovereign.”

The Conservative peer later argued that the Sewel Convention was “wholly irrelevant to this appeal and indeed to the conduct of foreign affairs”.

“The Sewel convention is a political convention concerning the legislative functions of the Westminster Parliament, it is, as I say, essentially a self-denying ordinance on the part of Parliament,” explained Lord Keen.

He went on: “It was never intended to be a justiciable legal principle and…it is a political restriction on Parliament's ability to legislate in respect of devolved matters.

“The correct legal position is that Parliament is sovereign and may legislate at any time on any matter and that is specifically set out in the devolved legislation itself…”

Lord Keen added: “The Lord Advocate is plainly wrong as a matter of constitutional law to assert...that the freedom of the United Kingdom Parliament is constrained by the constitutional conventions, which apply when Parliament legislates with regard to devolved matters.”

Responding, Pete Wishart, the SNP’s Shadow Commons Leader, tweeted: “There's your Tory Westminster Scottish law officer saying Scotland shouldn't have a say on Brexit. Know your place, Scotland.”

Meantime in court, John Larkin QC, the Attorney General for Northern Ireland, agreed with Lord Keen that the triggering of Article 50 by the UK Government fell within the royal prerogative.

The chief legal adviser to the Northern Ireland Executive said there was no provision in Northern Ireland legislation that "purports to limit, or has the effect of limiting, the powers of the UK Government in international affairs".

Earlier, James Eadie QC for the UK Government rejected the suggestion that its Brexit strategy was an "affront" to parliamentary sovereignty.

He told the court that the idea Westminster would not be involved in the Article 50 triggering of Brexit could “not possibly be sustained".

Opposition motions were due to be debated in the House of Commons this week, he said, while the UK Parliament would be involved in subsequent questions of legislation.

“The negotiations will no doubt be long and arduous. Parliament will inevitably be involved in that process of withdrawal," explained Mr Eadie.

If the Supreme Court ruled against the UK Government, then, he claimed, the "courts would be imposing, in effect, a new control of the most serious kind in a highly controversial, and by Parliament, a carefully considered, area".

He warned that if the justices ruled in favour of the challengers, then "this would take the court over the line".

The Supreme Court judges have emphasised that the appeal concerns an issue of law and was not about the wider political questions surrounding the UK's departure from the EU.

Meantime, Lord Pannick QC, representing the claimant who won a historic High Court ruling in November, claimed the Government had no legal power to use the royal prerogative to trigger Brexit.

He told the 11 justices that the case brought by Gina Miller was that "the prerogative power to enter into and terminate treaties does not allow ministers to nullify statutory rights and duties".

 "The prerogative cannot be used to remove rights and duties created by Parliament,” he declared, adding: "Parliament is sovereign. What Parliament created only Parliament can take away."

Lord Pannick argued that if the case put forward by the Government was correct, then it would mean that the 1972 European Communities Act - which paved the way for the UK to join the EU - would, "far from having a constitutional status", have a "lesser status" than the Dangerous Dogs Act.

He claimed that it would be "quite extraordinary" if that Act "could be set at nought by the actions of a minister acting without Parliamentary authority".

Lord Pannick stressed that the question for the court was whether or not the Government had the prerogative power to notify under Article 50, and added: "This is not to deny any effect to the referendum.

"The referendum is plainly an event of considerable political significance...but the political significance, whatever it is, is not, with respect, a matter for this court.

"It is not a matter for the court because it is irrelevant to the legal issue of whether ministers enjoy prerogative powers to set aside the 1972 Act."

He told the justices: "We are submitting that there is simply no prerogative power to interfere, frustrate, nullify a statutory scheme."