Welsh EU Continuity Bill fast-track backed by AMs
AMs have voted to fast-track a law to prevent what Welsh Government ministers have called a post-Brexit "power-grab".
The bill would bring devolved powers currently wielded at EU level to the Welsh Assembly.
It has been proposed by Cardiff ministers amid a row with the UK government over a key Brexit bill.
UK ministers have promised most powers in devolved areas will come to Cardiff - but agreement has remained elusive.
The vote in the Senedd asked AMs to back the introduction of what has become known as the Continuity Bill as emergency legislation.
A total of 44 AMs backed the plan, with 10 against.
This means the legislation will now pass through the assembly quicker than usual. The bill could clear the legislative process by as soon as 21 March, if AMs choose to make it law.
Leading the debate, Finance Secretary Mark Drakeford said introducing a so-called Continuity Bill as emergency legislation was "less than ideal" but that the cost of not doing so "could be very high indeed".
Mr Drakeford said Welsh ministers would continue to work with the UK government to reach agreement on changes to its Withdrawal Bill but that ministers in Westminster have "been given every possible opportunity" to do so.
He added that "implementation of the bill will require a substantial, indeed a wholly unprecedented volume of legislative action on the part of the Welsh ministers and the National Assembly."
The Welsh Conservative group in the assembly decided to vote against the bill, with Tory AM David Melding saying the timetable for debate was so "lightning fast that scrutiny would only be cursory where it would be possible at all".
Plaid Cymru leader Leanne Wood said it was "unfortunate" that the vote in the Senedd was not unanimous because "a much stronger message is sent when all parties are united".
Ms Wood said: "This bill provides the most significant leverage we have as a country in this debate at this present time."
As a defender of the EU referendum result, UKIP Wales leader Neil Hamilton said he also respected the public decision to support Welsh devolution in two referenda.
Mr Hamilton supported the Continuity Bill, saying he could not see how it "gets in the way of the Brexit process".
Most of the UKIP group, which had a free vote, voted with Mr Hamilton with the exception of Gareth Bennett who voted against introducing the bill as emergency legislation.
The proposed law is the Welsh Government's insurance policy against plans included in the withdrawal bill, which is currently making its way through Parliament.
Under the bill's current plans, powers in devolved areas such as agriculture that are currently operated in Brussels are due to flow back to Westminster rather than Cardiff, Edinburgh and Belfast.
It has led to months of negotiations between UK, Welsh and Scottish government ministers about changing the bill.
UK Cabinet Office Minister David Lidington said, in a speech last week, that a "considerable" offer had been made to amend the bill, which would see the vast majority of the powers returning from the EU going to the devolved administrations.
But the proposals have been rejected by the Welsh and Scottish governments for not going far enough.
The discussions are set to continue, and the Welsh Government is asking AMs to agree to fast-track the bill so it can be passed before the withdrawal bill is passed into law by MPs in Westminster.
Scottish ministers have also proposed similar legislation.
Welsh Finance Secretary Mr Drakeford and Scottish Brexit Secretary Michael Russell will meet Mr Lidington on Thursday, ahead of further talks between the first ministers of Scotland and Wales, and Prime Minister Theresa May on 14 March.
A bill was previously proposed by Plaid Cymru's Brexit spokesman Steffan Lewis last year. His proposal received unanimous backing in an assembly vote in January.
A UK government spokesman has previously said that a Continuity Bill was unnecessary and that it would be better for the Welsh Government "to concentrate on reaching an agreement on the withdrawal bill".