EDINBURGH (Reuters) - Britain’s devolved parliaments in Scotland and Wales on Wednesday approved bills that aim to keep their current powers unchanged after Brexit, a backstop in case a dispute with Prime Minister Theresa May’s government drags on.

FILE PHOTO: First Minister of Wales Carwyn Jones and Scotland First Minister Nicola Sturgeon attend a meeting of the Joint Ministerial Committee, chaired by British Prime Minister Theresa May at 10 Downing Street in London March 14, 2018. Daniel Leal-Olivas/Pool via Reuters/File Photo

The bills, tabled by the pro-independence Scottish National Party-led government in Edinburgh and its Labour Party-led counterpart in Cardiff, may potentially attract legal challenge from London under Britain’s constitutional arrangements.

That would add a layer of complication for May’s Conservative government and undermine her authority while she has her hands full with the thorny process of Britain’s exit from the European Union.

All parties say they are still hopeful of a solution.

Welsh First Minister Carwyn Jones said he preferred his concerns to be reflected in the legislation the UK government has itself tabled for Britain’s post-Brexit legal framework, currently making its way through the national parliament.

In the absence of an agreement on that, however, this bill was necessary, he said.

“Our strong preference remains for satisfactory, UK-wide legislation with a (UK) EU withdrawal bill which is amended to ensure devolution is respected. However, we have introduced the Continuity Bill because the UK government has been so slow and reluctant to recognise our legitimate concerns,” he said.

Wales and Scotland are at loggerheads with London over what clout they should have after Britain’s departure from the EU. They say May’s government is not taking them fully into account in the remapping of powers which Brexit necessitates, something the UK government denies.

Powers which are currently devolved to Edinburgh and Cardiff, such as over agriculture and fisheries, will come back to the national parliament once Britain leaves the EU. Edinburgh and Cardiff are concerned that the British government plans what they call a “power grab” to keep those powers in London.

Both parliaments have pressed on with their own bills as a backstop in case a deal cannot be reached, but have made more positive statements on an agreed outcome recently.

Both bills were passed by a large margin, a measure of the strength of feeling in support of devolution across party lines, with May’s Conservatives standing as the main party to vote against the legislation in Edinburgh.

(This version of the story has been refiled to add dropped words in paragraph 3)