NICOLA Sturgeon has issued a demand for the UK to remain in the European single market after a landmark High Court ruling threw Theresa May's Brexit strategy into chaos.

The First Minister’s office said she would insist on continued membership of the single market as part of a battle plan to flex Scotland’s “muscle” in the negotiation process.

“One of the First Minister’s objectives in all this is using whatever political influence and muscle we have, as a government and through our MPs in Westminster, to achieve a soft Brexit for the UK as a whole if possible,” her spokesman said.

Read more: Ian McConnell - Brexiters who long for days of Empire should reflect instead on 1970s

The shift in SNP strategy, which has moved from insisting Scotland retains access to the single market to one encompassing the entire of the UK, emerged after judges in London ruled that Parliament must be allowed to vote on whether the UK can begin the process of leaving the EU.

Lord Justice Thomas said the rights given by parliament in the European Communities Act 1972 could not be taken away by the government - only by parliament.

Within hours Downing Street announced plans to appeal to the Supreme Court while insisting it would stick to an original March timetable to enter Brexit negotiations with Europe.

But Nicola Sturgeon ramped up the pressure on the Prime Minister by insisting the Scottish Government could help to oppose her in the Supreme Court.

Until now, the Scottish Government has only been an observer in the legal proceedings.

Describing the judgement as underlining the "chaos and confusion" at the heart of the UK government, Ms Sturgeon said: "We will actively consider whether or not there is a case for the Scottish government to become participants in that case."

If the government loses in the Supreme Court, it will have to publish some form of new law for MPs - and the House of Lords - to vote on.

MPs could then push to set the terms for negotiating withdrawal.

Read more: Ian McConnell - Brexiters who long for days of Empire should reflect instead on 1970s

The seismic legal challenge that has unsettled UK politics was brought by fund manager Gina Miller and others, including a Spanish hairdresser and expats living in France.

She said the action was about "process not politics" and vowed to remain part of the debate to "bring some sobriety as we go forward".

In the wake of the ruling, Brexit Secretary David Davis was forced to admit that the “presumption” was now that ministers would have to bring forward an Act of Parliament, opening up the possibility that MPs and even unelected peers will have more of a say over the Tory Government's exit plans

In the House of Commons, there were about 480 MPs in favour of UK remaining in the EU before the Brexit referendum in June with 150 opposed. The majority of the House of Lords was also in favour of remaining

Ms Sturgeon has strongly hinted her 54 MPs would vote against triggering the Article 50 withdrawal process if it came to the Commons.

She said yesterday: “In whatever eventually comes forward from the UK Government to parliament, SNP MPs will not vote in any way that would undermine Scotland’s interests.”

The SNP leader has previously called for a bespoke deal that would see Scotland remain in the European single market, but earlier this week a report by leading academics warned that Scottish independence would be less "viable" if a hard border existed with England.

As the impact of the High Court ruling sunk in, Tory MPs warned that should MPs threaten to block or delay the Brexit negotiations, the Prime Minister to could decide to call a snap general election

It is thought that Ms May's March deadline to trigger Article 50 could be postponed if MPs demanded to debate and amend the Government's exit plan.

Shadow Brexit secretary Sir Keir Starmer MP called on ministers to lay bare the negotiating position for parliament to scrutinise.

Read more: Ian McConnell - Brexiters who long for days of Empire should reflect instead on 1970s

"The Prime Minister was trying to sideline Parliament and the court has now ruled against her and reminded her that Parliament is sovereign, so the Government needs to urgently review its approach and refer this issue to Parliament where it should be debated," he said.

He added: "I really don't think that, in light of this ruling, the Government can get away with refusing to disclose its negotiating stance."

Welsh First Minister Carwyn Jones said it was a mistake for the UK Government to launch an appeal against the ruling - and said that the devolved administrations should also get a vote on Mrs May's Brexit negotiating position.

"It is important that votes take place in all four nations to endorse the UK negotiating position," he said.

Shadow Scottish Secretary Dave Anderson said if a vote came before parliament he would respect the outcome of the referendum while Outgoing Ukip leader and key Brexit campaigner Nigel Farage said: "I worry that a betrayal may be near at hand."

Meanwhile, Charles Livingstone, a partner and constitutional law expert at Brodies LLP, said that the Scotland Act, which governs the devolution settlement for Scotland, contained a principle that Westminster would not legislate on devolved matters without Holyrood’s consent.

“There could therefore be further constitutional arguments about whether the Scottish Parliament’s consent should be sought before the UK Parliament passes legislation permitting the UK Government to trigger Article 50," he said. "That principle and the relevant provision of the Scotland Act 2016 are generally not thought to create a legal obligation that can be enforced in court, but that has never been tested: it is not inconceivable that further challenges might follow in the event that the Supreme Court upholds today’s decision.”

The legal case hinged on the idea that triggering Article 50 would inevitably lead to the loss of EU rights incorporated into UK law by the European Communities Act 1972.

Judges ruled that the prerogative should not be used to change domestic law.