Image copyright PA Image caption Carwyn Jones and Nicola Sturgeon have previously spoken out against the Brexit legislation jointly

Scottish ministers have rejected the latest bid to settle the dispute over post-Brexit powers, despite the Welsh and UK governments striking a deal.

The UK government is to publish changes to the EU Withdrawal Bill in an effort to end the long-running row with the devolved administrations.

Welsh ministers reached an agreement with their UK counterparts on Tuesday.

But the Scottish government said there was still a "key sticking point" and called for further changes to be made.

First Minister Nicola Sturgeon has written to Prime Minister Theresa May accepting that "substantial progress" had been made in talks, and setting out potential ways to settle the "remaining issue".

Scottish Secretary David Mundell said he was disappointed by the Scottish government's decision, but said his "door remains open" for further talks.

The UK and devolved administrations have been entangled in a long-running dispute about how powers currently exercised from Brussels will work post-Brexit.

All agree that some powers should be built into UK-wide frameworks, so the same rules and regulations in areas such as food labelling are used across the country.

But there has been disagreement over whether the devolved administrations should only be consulted about any changes, or whether they need to formally give their consent.

'Compromise on both sides'

Ministers from Edinburgh and Cardiff had previously coordinated opposition to what they termed a "power grab", issuing joint statements and passing their own Brexit bills on the same day.

However the Welsh government confirmed on Tuesday that it had reached an agreement with the UK government after "compromise on both sides".

Finance Secretary Mark Drakeford said the deal meant powers that were currently devolved "remain devolved" .

And he said that "all powers and policy areas rest in Cardiff, unless specified to be temporarily held by the UK government".

He added: "These will be areas where we all agree common, UK-wide rules are needed for a functioning UK internal market."

Scottish Brexit minister Mike Russell told MSPs that there was still a "key sticking point" for his government on a "fundamental point of principle" over devolution.

He said ministers had given the latest amendments "serious and respectful consideration", but said they "continue to give Westminster the power to prevent the Scottish Parliament from passing laws in certain devolved policy areas".

He said: "The effect of the UK government's latest proposal remains this: the Scottish Parliament's powers could be restricted without consent. This is not something the Scottish government could recommend the Parliament approves."

Further talks

In her letter to the prime minister, Ms Sturgeon suggested two methods of settling the dispute - by deleting the offending clause from the UK government's EU Withdrawal Bill altogether, or by sticking with the present system of the UK government seeking the express consent of Holyrood for legislating in devolved areas.

Further talks between ministers are expected next week, with Mr Russell setting a deadline of the final reading of the Withdrawal Bill in the House of Lords - the middle of next month - for changes to be agreed.

If they are not, then ministers will not put forward the Withdrawal Bill for a consent vote at Holyrood. MSPs have already prepared for this possibility by passing their own legislation as a stop-gap measure, although UK law officers have formally challenged it in the Supreme Court.

Image copyright PA Image caption A series of meetings between the UK and devolved governments have been held

The UK government views the position put forward by Mr Russell as potentially giving devolved ministers a "veto" over certain powers.

Lord Keen, the advocate general for Scotland, told peers earlier in the year that needing formal consent for changes to power-sharing frameworks would be "a fundamental change in the devolved competence".

He said: "If we have a black and white, sharp-edged consent mechanism for the devolved administrations, then we have the basis for what has been termed the veto problem.

"We have the situation in which, beyond the existing devolved competence, any one of these assembles could proceed to legislate within its devolved competence in a manner that impacted upon those in another country within the United Kingdom. We cannot go down that road."

'Utterly isolated'

The Scottish Conservatives said the fact the Welsh government had struck a deal meant the SNP was "utterly isolated and exposed".

The party's constitution spokesman, Adam Tomkins, said the Scottish government had rejected the deal for "narrow political reasons", namely "obsession with a second independence referendum".

Labour's Brexit spokesman Neil Findlay said it "would be wrong for the SNP government to play politics with devolution in order to further their goal of independence".

UK government sources told BBC Scotland they were convinced that they had reached a deal with Mr Russell, only for Ms Sturgeon to "scupper" it at the last moment.

Mr Russell flatly denied that he had been "overruled" by the first minister, saying he stood "foursquare behind" the government's position on devolved powers and insisting his relationship with Ms Sturgeon was "fine".

The Greens meanwhile continued to oppose the Brexit legislation outright, with co-convener Patrick Harvie saying MSPs "must dig our heels in and refuse to give consent to the EU Withdrawal Bill".

And the Lib Dems said Mr Russell had "behaved in a misleading fashion" by claiming not to know what was going on between the Welsh and UK governments.

Mr Russell had told MSPs that Scottish and Welsh ministers would continue to work together regardless of what decisions they took over the deal.