First Minister Mark Drakeford’s decision to repeal an act preventing a Westminster ‘power grab’ of Welsh powers has “backfired in spectacular fashion” after the Supreme Court mostly backed a similar act in Scotland.

When the UK Government challenged Welsh and Scottish legislation in May, the Labour Welsh Government agreed to the transfer of powers after Brexit.

The Scottish Government went to the Supreme Court, who ruled that their bill was “as a whole” within Holyrood’s competence, although MSPs had acted beyond their powers in relation to one section.

The Welsh Government, however, voluntarily repealed their own legislation preventing the transfer of powers. The now First Minister, Mark Drakeford, was the minister responsible for Brexit at the time.

Plaid Cymru said that he had missed an opportunity to prevented the Tory government in Westminster from legislating in devolved fields after Brexit.

“The First Minister’s first act will have to be admitting his wrongdoing in capitulating to the shambolic Tory government in Westminster over the Brexit power grab,” Plaid Cymru leader Adam Price said.

“Mark Drakeford’s whole argument for repealing the Welsh Continuity Act was premised on his belief that the Scottish Government would lose the Supreme Court case over their equivalent Bill.

“He said that if Scotland lost they would have nothing, while Wales would still have its paltry agreement with the UK Tory Government.

“Drakeford’s wager backfired in spectacular fashion. Scotland won which means their powers are legally protected.

“It is Wales, therefore, that is left with nothing but a bad deal which gives away Welsh powers to Tory ministers with no guarantee we will ever get them back.

“Labour’s actions have left Wales at the mercy of a shambolic Tory Westminster Government that is currently in complete disarray.”

The President of the Supreme Court of the United Kingdom, Lady Hale, said that judges had unanimously rejected many of the UK government’s arguments related to Scotland’s Continuity Act.

However. She said that one section – relating to MSPs having to give consent for UK Brexit laws – was not within Holyrood’s remit.

The UK government had also made changes to its legislation so that it could not be altered by MSPs.

That meant a number of sections of the bill could not now stand which were competent when it was passed by Members of the Scottish Parliament in March.

Scottish Brexit Secretary Mike Russell said the UK government had “changed the rules of the game midway through the match” in an “act of constitutional vandalism”.

But Scottish Secretary David Mundell said the judgement had provided “much needed legal clarity” that the bill “goes beyond the powers of the Scottish Parliament”.