The Scottish and Welsh governments said on Tuesday they will introduce bills into their parliaments aimed at keeping regional powers that come back from Brussels after Brexit, in a move that could complicate British plans to leave the EU.
The bills are to be debated by the devolved parliaments in the coming days.
Several powers which have been devolved onto the regional governments, such as agriculture and fisheries, are administered from Brussels because they fall within EU frameworks.
But after Brexit those powers will come back to Britain, and Scotland and Wales want to make sure they stay within the remit of regional parliaments and do not just revert to the British government.
The sides are currently negotiating exactly how the powers will be returned, but have reached a stumbling block.
The coming regional bills are designed as a back-up in case no deal can be reached.
It was not immediately clear what legal weight the Scottish and Welsh bills would have, but the process of establishing whether they are binding could take weeks or even months, while the British government has limited time before Brexit day in a year's time.
The British government needs a deal with Scotland and Wales before the summer in order to pass the European Union (Withdrawal) Bill in Britain's national parliament.
Strained relations
Although Britain's devolved parliaments do not have a veto on Brexit legislation, ignoring their wishes has worsened already strained relations and may stoke nationalism in Scotland, further complicating the EU withdrawal process.
Scotland and Wales say that the British Brexit withdrawal bill makes a mockery of two decades of power-sharing agreements.
"The EU (Withdrawal) Bill, as currently drafted, would allow the U.K. government to take control of laws and policy areas that are devolved. This is simply not acceptable to the Welsh government, or the people of Wales who have voted for devolution in two referendums," the Welsh government said.
Prime Minister Theresa May's government says it wants to make unspecified exceptions to their powers where it deems it necessary for overall British unity, and that is the stumbling block in talks.
By introducing its own bill now, the Scottish government can ensure enough time for it to be made effective before Brexit legislation is passed in Britain's national parliament in London, the Scottish bill said.
It added: "It is a bill which prepares Scotland's devolved laws for the U.K.'s withdrawal from the European Union. This means that EU laws currently in force will be retained after withdrawal and the Scottish government will be given the tools needed to make sure these laws keep working after withdrawal."
The Scottish challenge to Prime Minister Theresa May's authority comes after her government indicated on Monday it would go no further in offering concessions to Scotland, Wales and Northern Ireland in reaching agreement over the EU (Withdrawal) Bill.
Scotland's first minister said earlier that the Scottish parliament would not consent to the U.K. legislation as it stands.
"I will not sign up to something that effectively undermines the whole foundation on which devolution is built," Nicola Sturgeon told BBC radio.