Image copyright PA Image caption Mike Russell and John Swinney sat down with Damian Green and David Mundell

The Scottish and UK governments have held "constructive" talks over Brexit, but are still a long way from a deal.

Scotland's Deputy First Minister John Swinney and Brexit minister Mike Russell met First Secretary of State Damian Green in London to discuss concerns about the EU Withdrawal Bill.

UK ministers have said it is time to "get serious" about the issues.

The Scottish government is seeking changes to the legislation for taking the UK out of the EU.

It has described the legislation as a "power grab" and has said it will not ask Holyrood to give consent to the bill in its current form.

The UK government has insisted that Holyrood will see "significant" new powers devolved after Brexit.

After an hour of talks in London, both sides said the meeting had been "constructive" but conceded there is still a long way to go before any deal can be reached.

Further negotiations are planned.

The dispute stems from what happens to powers which are currently not reserved to the UK government, but which are exercised from Brussels. UK ministers want them to go to Westminster in the first instance, before some are incorporated into UK-wide frameworks and others are sent on to the devolved administrations.

Both the Welsh and Scottish governments say this plan would undermine the founding principle of devolution, that any powers which are not specifically reserved to Westminster should be devolved. They do not oppose UK-wide frameworks, which UK ministers say are necessary to prevent trade barriers developing within the internal UK market, but say they want them agreed jointly.

The Scottish government has also been pushing for single market membership to be retained, and wants the country to remain in the European customs union.

Image copyright Getty Images Image caption The UK and Scottish governments have been locked in a dispute over the EU Withdrawal Bill

Following the meeting, Mr Swinney said it had been a "useful opportunity for an exchange of views", but said there was still some way to go towards a deal.

He said: "The discussions were constructive but we remain absolutely clear that, as things stand, we will not recommend to the Scottish Parliament that it gives its consent to the EU Withdrawal Bill.

"We made clear, we are not opposed in principle to UK-wide frameworks in certain areas - but this must be on the basis of agreement among equals, not imposed by Westminster.

"The bill as currently drafted is impractical and unworkable. It is a blatant power grab which would take existing competence over a wide range of devolved policy areas, including aspects of topics like agriculture and fishing, away from Holyrood, giving them instead to Westminster and Whitehall.

"That means that unless there are serious and significant changes to the proposed legislation, we will not recommend that the Scottish Parliament give consent to the bill."

What is the repeal bill?

Formally known as the European Union (Withdrawal) Bill, the draft legislation is a key plank of the government's Brexit strategy

The first line of the bill says the European Communities Act 1972, which took Britain into the EU, will be "repealed on exit day"

This will end the supremacy of EU law and stop the flow of new regulations from Brussels

But all existing laws derived from the EU will continue to be in force - they can be changed or scrapped by further legislation

The bill does not detail policies line-by-line but transfers all regulations into domestic law

It gives the UK two years after Brexit to correct any "deficiencies" arising from the transfer

Mr Green said he was "cautiously optimistic" a way forward could be agreed.

He said: "I said that it was time for the talks to get serious and today they have got serious.

"We had a positive and constructive meeting and we are now starting to get into the nitty-gritty of the detail of how we make sure Brexit works for all parts of the UK.

"We are in agreement that we do not want to damage the UK internal market that is so important to Scottish businesses and their customers.

"The key point is that we want to bring back these powers from the EU in a way that protects the UK market and also preserves the spirit and letter of the devolution settlement."