DAVID Mundell has dismissed the row over Brexit and devolution as a “pinhead argument”.

The Tory Scottish Secretary also predicted the dispute between London, Wales and Edinburgh would “go to the wire”, with no deal possible until late April or May.

The timescale makes it all but inevitable that the UK government will refer recent continuity bills passed by Holyrood and Cardiff Bay to the UK Supreme Court to test their validity.

The UK and devolved governments are deadlocked over how to amend the EU Withdrawal Bill at Westminster to redistribute devolved powers returning from Brussels next year.

The UK government wants to “ring fence” some powers at Westminster in order to create UK-wide common frameworks to preserve the UK internal market.

However the devolved governments regard that as a “power grab”, and want control of all powers due to them the devolution settlement, or an effective veto power over frameworks.

The UK government regards that as going beyond the current devolution settlement.

With the impasse continuing, the Welsh Assembly and Scottish Parliament last week passed their own continuity bills to take control of devolved EU law if there is no deal.

The UK government has until April 18 to challenge them at the UK Supreme Court.

Asked how that arguments had strengthened the “precious union” and relations between the UK and Scottish governments, Mr Mundell told BBC Radio Scotland: “I’m not going to suggest that the process that we’ve had for the discussion of the powers has been ideal.

“I would have liked it to have been resolved a long time ago. But it’s just clear now that the nature of these negotiations and discussions is that they have to go to the wire.

“The wire is as the end of April, beginning of May.”

He said more than 80 of 111 devolved powers would go to Holyrood.

He said: “There’s widespread agreement, even with the Scottish government, that we will need to have UK frameworks in relation to certain areas of responsibilities, areas like animal movement, animal health.

“Everybody agrees about that, and we’ve just got into one of these pinhead arguments about how we choose those areas, when actually we are pretty much in agreement what those areas should be.

“But it’s important that we have a proper process. It’s important we respect the devolution settlement, and we will continue those discussions. I’m hopeful that we can reach agreement with the Scottish Government, and our efforts will continue to go into doing that.”

However at First Minister’s Questions, Nicola Sturgeon restated her unhappiness with the EU Withdrawal Bill and respecting the devolution settlement was a “red line”.

She said: “I’ve been very clear that the government cannot give its consent to the EU Withdrawal Bill without changes being made to protect devolution.

“We’ve already set out to the UK government the changes that could resolve this issue, but they are still insisting on the right to take control of devolved powers without the consent and regardless of the views of this parliament.

“We’ve repeatedly said we’re ready to agree UK-wide frameworks, where these will be in the interests of Scotland, but these have to be agreed and not imposed.

“We are continuing our discussions with the UK government and we will continue to make every effort to reach a conclusion that respects the devolution settlement.”