The UK Parliament can change the laws of Scotland regarding Brexit - but not the UK Government using royal prerogative powers, Scotland's most senior law officer has told the Supreme Court.

Lord Advocate James Wolffe QC argued that an Act of Parliament was required to trigger Article 50 of the Lisbon Treaty to start the two-year process of withdrawing from the EU.

And he said the Scottish Parliament was also entitled to a voice on the issue, which involved the serious loss of EU rights for Scottish people.

READ MORE: Brexit offers 'opportunities' for fishing, says SNP Rural Economy Secretary Fergus Ewing

The Lord Advocate said that was "a matter of significance and not simply a footnote" and it would be unlawful for the Article 50 process to start without a legislative consent motion from Holyrood under devolved legislation.

He said: "The powers to change the laws of Scotland were given to Parliament, and of course those Parliament has authorised, and not to the Crown.

"That sets the bounds to the use of the prerogative and precludes the UK Government from asserting a power to make significant changes to laws of the land by virtue of the prerogative."

The Lord Advocate was speaking on the fourth and final day of the landmark legal battle before 11 justices over Brexit.

The proceedings, which began on Monday amid a blaze of publicity around the world, will finish later with a ruling not being given until the new year.

The hearing at the UK's highest court follows a High Court ruling against the Government in November.

Three judges ruled that Theresa May lacked legal power to use the royal prerogative

MPs have now voted in favour of the Government's timetable to trigger Article 50 by March 31 next year.

Richard Gordon QC, presenting arguments on behalf of Mick Antoniw, the Counsel General for Wales, told the justices: "On behalf of the Counsel General for Wales, who sits next to me, I want to make it clear that the position of the Welsh Government and the Counsel General is that the result of the referendum to leave the EU should be respected."

He added: "Wales is not here because it wants either to stop or to stall Brexit, or the implementation of Brexit.

"It is here precisely because the constitutional issues at stake go far beyond Brexit."

He argued that the case presented to the court by the UK Government was "flawed".

Mr Gordon said having a "treaty-making power" did not mean there was a power to "dispense with laws, or subvert statutory schemes or crucify human rights".

READ MORE: Brexit offers 'opportunities' for fishing, says SNP Rural Economy Secretary Fergus Ewing

He told the justices: "We say use of the prerogative will dispense with law. If we are right about that, we win and the Government loses."

The QC said that what was being sought was the use of the prerogative power "to drive through the most major constitutional change in our system at least since 1972".

That constitutional change was, he said, of a "seismic nature".

Mr Gordon, describing "what at heart these appeals are really about", told the court: "They are really about the proper distribution of power between Parliament and the executive in our society."