The Welsh Government has prepared a post-Brexit continuity bill, the first minister Carwyn Jones has said.
Plaid Cymru wants ministers to bring forward the legislation as a "legal insurance policy" unless changes are made to UK Brexit legislation.
But Mr Jones said he would prefer to see changes to the UK legislation which he thinks amounts to a power-grab,
The continuity bill has been proposed as a way of keeping EU regulations in Welsh law through assembly legislation.
Amendments to the EU Withdrawal Bill suggested by the Welsh and Scottish governments have been tabled and will be discussed in the House of Commons on Monday 4 December.
The administrations have dubbed the bill a "power-grab", claiming it does not return powers from the EU to the devolved administrations as promised, but hands them back to the UK government and Parliament
The UK government says that it expects the process to result in more powers for Wales' devolved institutions.
Giving evidence to assembly committees on Monday, the first minister said all of the proposed changes to the EU Withdrawal Bill were "red lines".
Mr Jones said: "A bill has been prepared, that work has been undertaken but our preference at the moment is that we get to a point where all amendments have been accepted and we won't need a continuity bill."
"If that doesn't happen then that would be the time to consider introducing a continuity bill," he added.
Asked about when he would consider introducing counter-legislation in the assembly, the first minister said: "It's not an exact science, but clearly the continuity bill will need to have gone through the assembly and received Royal Assent before the Withdrawal Bill had gone through both Houses of Parliament."
Mr Jones said his government supported the principle of the EU Withdrawal Bill, which proposes to transfer EU laws on to the UK statute book, but not the exact detail as it stands.
"We share the same destination but it's the nature of the journey that concerns us - it should be a journey that is undertaken through partnership not through imposition," he said.
Plaid's Brexit spokesman Steffan Lewis said the assembly had agreed to give him the opportunity to force a vote on the introduction of a continuity bill in January.
"But I would be urging (the Welsh) government to bring that forward and to table it itself in its own time if the EU Withdrawal Bill goes forward with... the anti-devolution paraphernalia intact."
"As the reality of the process in Westminster unfolds it's clear that we desperately need a continuity bill as an insurance policy not just to defend our constitution but to safeguard the rights and standards in devolved areas that derive from European Union rules and laws," the South Wales East AM said.