LEGISLATION intended to keep European Union law over devolved areas in place in Wales post Brexit - which was the brainchild of a Gwent AM - has been overturned.

The so-called 'continuity bill' was introduced in March and passed through the Welsh Assembly's legislation process in a matter of weeks following concerns the UK Government's EU Withdrawal Bill, which sets out the terms of Brexit, would result in a loss of devolved power.

But the following month the Welsh Government announced it planned to repeal the act after coming to an agreement with the UK Government, which it said protected devolved power.

And this evening AMs voted 40 to eight to repeal the legislation, despite protests from Plaid Cymru.

South Wales East AM Steffan Lewis, who initially proposed the act, said he was concerned overturning it would give Westminster free reign to legislate on devolved areas without Wales' consent.

"I would much rather there not be a need at all, or in the first place, for Welsh continuity legislation," he said. "It has always been my view that the UK Government, if they really cherished this union, if they genuinely respected the nations of the UK, then, from the outset, the mechanics of EU withdrawal could and should have been negotiated between the nations of the UK before Article 50 was even triggered."

He added: "This issue, for me has always been bigger than personalities, parties and even politics itself.

"I very much fear that precedents set now during these extraordinary times may linger well into the future and cast lasting doubt over the ability of this place to legislate in key areas, and could well normalise a new-found Westminster habit of legislating in devolved matters into the future.

"I simply believe that no-one has the right to use Brexit of any other crisis as an excuse to change Welsh devolved laws without the agreement of the democratically elected members of this Parliament.

"What's at stake here goes beyond a piece of legislation. This is about enshrining in Welsh law all those rights and standards that we cherish so that no-one can take them away from us."

But finance secretary Mark Drakeford, who has been acting as the Welsh Government's Brexit minister, said: "The act has done its job, it is time to move on."

Saying "we have obtained every drop of leverage to be extracted (from the act)", he added: "The agreement we reached has ensured that not a single devolved responsibility has left this Assembly. Areas already devolved remain devolved, and the necessary safeguards are in place to ensure that this continues to be the case.

"Devolution is entrenched in the inter-governmental agreement, not diluted by it, and not undermined by it as the EU Withdrawal Bill, as originally enacted, certainly would have done. "

And Conservative AM Darren Millar welcomed the motion, saying: "We said at that time that is was an unnecessary bill because we were confident that an agreement could be reached between the Welsh and UK Governments that respected the devolution settlement and that accommodated the concerns - the quite rightful concerns - that some people had in this chamber, and that the Welsh Government quite rightly had with the originally drafted EU Withdrawal Bill, as it was at that time."

The Scottish Government introduced a similar act, which was later referred to the Supreme Court, which is yet to rule on it.