SNP ministers are to hold talks with the Scottish Tories to avert a constitutional crisis over Brexit, after a sudden shift to a more conciliatory tone at Holyrood.

A day after Nicola Sturgeon called for more political consensus, her Brexit minister dropped his usual fiery rhetoric and “warmly welcomed” an offer from the Tories to discuss how to improve the EU Withdrawal Bill going through Westminster.

Michael Russell said that after the Greens, Labour and LibDems had pledged to work with the SNP on the issue, the approach from the Tories was a “significant step forward”.

He hoped there could be “unanimity” among MSPs on how to amend the Bill.

However Mr Russell also warned that if no agreement was reached, the SNP Government was prepared to bring forward its own Bill to protect devolved laws from “the shock of Brexit”.

He said: “If the UK Government is not prepared to make the appropriate amendments, this Government will consider, as the Welsh Government is also considering, the options available for rapid legislation in this parliament to allow us to prepare devolved laws for the shock of Brexit. That route is not our first choice however. There is a better way.”

Mr Russell was speaking after the Government issued its formal verdict on the Withdrawal Bill, which said it was so flawed ministers could not recommend its approval by MSPs.

In particular, Clause 11 says all powers currently exercised in Brussels will be repatriated to Westminster at Brexit, even those in devolved areas such as agriculture and fishing.

Westminster would then decide which were forwarded to the devolved legislatures, and could change laws in devolved areas unilaterally, without even informing Holyrood.

Mr Russell said this ran counter to a founding principle of devolution - that powers not explicitly reserved to Westminster are devolved by default.

He told MSPs: "The EU (Withdrawal) Bill appears to represent a deliberate decision by the UK Government to use the process of Brexit as cover for taking powers in areas of policy which are clearly within the responsibility of this Parliament.

“It is not a logical, or essential, part of any Withdrawal Bill that new limitations are placed on the Scottish Parliament’s powers, on the National Assembly for Wales’s powers, or on the powers of the Northern Ireland Assembly. But that is what the Bill does.

“The only appropriate way to divide powers between the governments is this: powers in relation to policy areas which are devolved must be for devolved ministers and devolved legislatures."

He said the concerns were “not arcane constitutional points”, but concerned “the role and duty of these parliaments to improve the lives of the citizens they service.

"The current proposals from the UK Government cut across, impede and diminish what we do day-in and day-out to serve everyone who lives in Scotland. We can not allow that to happen."

The government would therefore not table a legislative consent motion (LCM) for a vote by MSPs - procedurally the same as withholding consent - unless the Bill was overhauled.

The Scottish and Welsh governments are now working on joint amendments which would see more powers repatriated directly to Edinburgh and Cardiff.

If the Bill is changed to their satisfaction, the devolved governments will support its approval in their respective legislatures.

If not, the governments will withhold approval, plunging the UK into a constitutional crisis in the New Year.

In theory, Westminster could impose the legislation on Scotland, but this would be an option of last resort for both sides - the SNP would not get the powers they want, and the Tories would pay a political price for being seen to trample devolution underfoot.

Mr Russell said: “If the political approach was to change, [with] an acceptance of the basic simplicity of the devolved settlement, that those things not reserved are devolved, then that would produce a produce a political solution to these matters. I’m looking for that political solution.”

Scottish Tory deputy Jackson Carlaw welcomed the reduction in “hyperbole” from Mr Russell, noting he had not, for once, used the term “Westminster power grab”.

He said if there was a “genuine concern matched by an equally genuine resolve to address and overcome" issues with the Bill, then Tory MSPs would “play their part”.

Tory Adam Tomkins added: “Like the minister I think that a deal can and should be done to enable the Withdrawal Bill to pass with this parliament’s consent.”

Labour MSP Lewis Lewis Macdonald welcomed the government's willingness to work with all parties “to seek to protect the devolution settlement and mitigate the impact of Brexit”.

He said: "The Bill as it stands seeks to overturn the basic principles of devolution established by Donald Dewar in the Scotland Act and endorsed by that referendum 20 years ago, namely that what is not reserved is devolved."

Green Ross Greer said the EU Bill was “a power grab, not simply for the UK Parliament but for the UK Government over the people of these islands and their elected representatives.”

LibDem Tavish Scott rejected the idea Brexit was a "cover for taking powers" as this assumed a "constitutional conspiracy" by a UK Government too incompetent to pull it off.

"This is a UK Government which cannot sort itself out on its Brexit negotiating position nevermind work out what its position is in relation to Cardiff, Belfast and Edinburgh," he said.

Scottish Secretary David Mundell said: “The sooner we can press ahead with detailed talks the better. We want to discuss the Scottish Government’s views on this.”