The Scottish Government has not ruled out the prospect of legal action to try to prevent UK ministers from legislating in devolved areas, according to Constitution Secretary Michael Russell.

He said he is "cautious about going to court" but added there are "maybe a range of legal options".

The comments come amid a clash between Holyrood and Westminster over the UK Internal Market Bill – with SNP ministers in Edinburgh having vowed to withhold consent for this.

READ MORE: Tories admit they're going to break law 'in limited way' with Brexit power grab

Meanwhile, the Scottish Government is pushing ahead with its own legislation to allow Holyrood ministers to keep pace with European Union laws after Brexit.

Russell said the 10-year period proposed for such powers would cover "very comfortably" the time it would take for Scotland to become independent and rejoin the EU.

The Sewel Convention, which underpins the relationship between the UK Government in London and administrations in Edinburgh, Cardiff and Belfast, states Westminster will "not normally" pass legislation in devolved areas without their consent.

But the UK Government has in the past pushed through laws without this – such as with the EU Withdrawal Agreement Bill.

Scottish Greens co-leader Patrick Harvie questioned if it is time for Scottish ministers to go to court to resolve the issue of UK ministers legislating in devolved areas.

He said the convention of Westminster "not normally" legislating in devolved areas had been altered by the UK Government.

Harvie said: "Not normally apparently to the UK Government just means unless we feel like it, not unless we want to. Is it not time for the Scottish Government to take that to court and seek a judicial review on what that means?"

WATCH: Ian Blackford brands Boris Johnson a liar over power grab plan

Russell said while the UK Government had adopted an "overbearing approach" he is "cautious always about going to court", noting the UK's unwritten constitution could be difficult to enforce.

But he told Harvie he has not ruled out such action, adding: "I am not going to necessarily advertise those actions before they are taken. I have not ruled out any actions at all and I hear clearly what you are saying.

"There are maybe a range of legal options in front of us but I wouldn't like to go any further than that at this stage."

While the Scottish Government has attacked Westminster over the UK Internal Market Bill, branding it a "power grab", the Tories claimed new legislation from Holyrood ministers would give then "sweeping powers".

The Scottish Government has introduced the UK Withdrawal from the European Union (Continuity) (Scotland) Bill to Scots law to "keep pace" with EU law in devolved areas, where they believe this is appropriate.

Questioning Russell about the Bill at Holyrood's Constitution Committee, Tory MSP Murdo Fraser said: "Cabinet Secretary, you spend a lot of time talking about power grabs, this is exactly what this Bill is as it stands.

"It is giving sweeping powers to ministers to introduce new laws to Scotland without the required level of parliamentary scrutiny and consultation."

Russell responded: "I don't accept it is giving ministers powers, sweeping powers, to introduce new laws by means of secondary legislation."

Instead he argued it would be a "waste of parliamentary time" if Holyrood had to introduce new primary legislation every time EU laws changed.

The Constitution Secretary said: "It is critical to ensure Scotland is able, where it makes sense to do so, to continue to align with EU law in the future – as the people of Scotland expressed was their preference in the 2016 referendum."