Emergency Welsh legislation could be introduced to prevent Westminster taking control of devolved powers after Brexit, the Welsh Government has said.
First minister Carwyn Jones said the proposed continuity Bill - the Law Derived from the European Union (Wales) Bill - was not an attempt to "block Brexit" but a measure needed to prepare for a situation where the UK Government does not "adequately" amend its EU Withdrawal Bill "to respect the devolution settlement".
The move comes the day after Cabinet Office Minister David Lidington urged Welsh and Scottish ministers to accept an offer from Theresa May's administration to rewrite the flagship Brexit Bill to address their concerns.
He said the UK Government had made a "considerable offer" to the devolved administrations with a commitment that the "vast majority" of powers returning from Brussels will start off in Edinburgh, Cardiff and Belfast rather than Whitehall, but his offer was dismissed by the Welsh and Scottish Governments.
Both have said they cannot recommend the UK Government's EU Withdrawal Bill be granted consent in its current form as it would see EU responsibilities in devolved areas, such as fishing and farming, initially transferred to Westminster.
Mr Jones, who previously described the UK Bill as a "crude power grab" and an "attack on the founding principles of devolution", said assembly members would be asked to consider the introduction of the continuity Bill as an emergency Bill.
Announcing the plans on Tuesday he said it would transfer EU law in areas already devolved to Wales into Welsh law on the day the UK leaves the EU, providing Welsh businesses with the legal certainty and stability they had called for.
"We remain constructive partners in talks with the UK Government about changes to their EU Withdrawal Bill - and this remains our preferred outcome," he said.
"However, we are running out of time and have developed our Bill to prepare for a situation where the UK Government does not adequately amend its Bill to respect the devolution settlement.
"It would be irresponsible to refuse to give legislative consent to the UK Government's Bill while also not being prepared to put in place our own measures to give clarity about EU-derived law in Wales relating to devolved matters."
Mr Jones said his government was "simply seeking to protect the current devolution settlement for Wales" which had been backed by two referendums in 1997 and 2011.
He added: "This Bill is about respecting the will of the people of Wales."
Plaid Cymru welcomed the proposal, which was previously put forward by Plaid Cymru's Brexit spokesman Steffan Lewis last year and received unanimous backing in an Assembly vote in January.
Simon Thomas AM said: "The introduction of the Continuity Bill sends a clear message: Wales will not allow the Westminster government to run rough-shod over devolution.
"We will legislate to defend Welsh democracy."
The Welsh Conservatives said the "will of devolution must be respected, with the necessary changes made to the EU Withdrawal Bill".
A spokesman said: "With that in mind, the tone of David Lidington's speech this week was welcome.
"Leaving the European Union must not undermine the devolved settlement, and should lead to greater powers making their way to the Assembly.
"From our discussions with colleagues, it is clear that the UK Government understands that and significant progress has been made in recent months."
In January the Scottish Government proposed its own EU Continuity Bill in the event that Holyrood refuses to grant consent for the EU Withdrawal Bill.