Europe's highest court has confirmed MPs can halt Brexit, vindicating a year-long legal action by a group of Scottish politicians and compounding Theresa May’s agonies.

In a landmark ruling, the European Court of Justice (ECJ) said Westminster had the power to order the UK government to revoke the Article 50 withdrawal notice underpinning Brexit.

Moreover, it said MPs could revoke Article 50 unilaterally, without relying on the consent of the other 27 EU nations.

The judgment, on the eve of a crunch vote by MPs on the Prime Minister’s beleaguered Brexit plan, gives parliament another option besides Mrs May’s deal and No Deal.

For instance, Westminster could now suspend Article 50 as a prelude to a People’s Vote.

READ MORE: Brexit court battle: ECJ to deliver final ruling on revoking Article 50 next week 

The UK government insists it will not revoke Article 50, but may ultimately be forced to accept parliament’s will on the matter.

The Herald:

Issuing its ruling at 8am this morning, the ECJ supported an advisory issued last week by one of the court’s advisers, Attorney General Manuel Campos Sánchez-Bordona.

It said: "The United Kingdom is free to revoke unilaterally the notification of its intention to withdraw from the EU.

"Such a revocation, decided in accordance with its own national constitutional requirements, would have the effect that the United Kingdom remains in the EU under terms that are unchanged as regards its status as a Member State."

The ruling was the result of a year-long fight by Scottish politicians who wanted the ECJ to give a definitive view on whether MPs could order the UK government to stop Brexit.

Led by Green MSP Andy Wightman, the group included Labour MEPs Catherine Stihler and David Martin, SNP MEP Alyn Smith, SNP MP Joanna Cherry QC, briefly LibDem MP Christine Jardine, and was supported by Jolyon Maugham QC of the Good Law Project.

Mr Wightman said: "This is a momentous ruling.

"It is now clear the UK can, if it chooses, change its mind and revert to our current EU membership arrangements. MPs now know that stopping Brexit altogether is an option open to them before the end of the Article 50 period.

"Parliament can now back a People’s Vote in the knowledge that a remain outcome could be acted on unilaterally, should that be what people decide.

"The judgement vindicates the cross-party effort to establish the legal position and shames the UK Government, which has spent a small fortune trying to keep Parliament in the dark.”

Mr Smith called the ruling "dynamite" and said Scots had delivered a "way out of Brexit".

He said: "Bringing the case was a risk but it has worked better than we could have hoped for.

“Our case has confirmed, once and for all and from the highest court in the business, that the UK can indeed change its mind on Brexit and revoke Article 50, unilaterally.

"The timing is sublime. As colleagues in the House of Commons consider Mrs May’s disastrous deal we now have a roadmap out of this Brexit shambles.

“A bright light has switched on above an 'EXIT' sign.”

Ms Cherry added: “The UK government has ignored Scotland’s vote to remain and all compromises suggested by the Scottish Government.  

“They also fought us every inch of the way in this case, so it’s a particularly sweet irony that Scottish parliamentarians and the Scottish courts have provided this lifeline to the UK parliament at this moment of crisis.”

Ms Stihler said: “We now know, beyond any doubt, that Westminster can revoke its withdrawal from the European Union. This has been a lengthy and expensive legal process, but the result proves that it was worthwhile.

“When MPs vote on Theresa May’s Brexit deal, they now know they can ultimately choose to stop Brexit and keep the best deal we currently have as a full member of the EU.

“I am increasingly confident that is what will happen if MPs agree to a People’s Vote, which is what the country now urgently needs.”

Nicola Sturgeon hailed it as an “important judgment” that paved the way for the Scottish Government’s immediate demand for an extension of the Article 50 process.

The First Minister tweeted: “So an extension of Article 50 to allow time for another vote, followed by revocation of Article 50 if the outcome is Remain, seems to be an option that is now open to the House of Commons.”

READ MORE: "We have a roadmap out of the Brexit shambles" - says cross-party group post ECJ ruling 

Mr Maugham called it “arguably the most important case in modern domestic legal history”.

He said: “It is up to MPs to remember what they came into politics for, and find the moral courage to put the country’s interests before private ambition.”

The group asked Scotland’s highest court, the Court of Session, to refer the question to the ECJ for a ruling.

Despite Mrs May telling the Commons last week that the UK government “felt it was right that the issue be tested”, UK ministers tried to have the case thrown out at every step.

UK Government lawyers argued the issue of revocability was “academic and hypothetical”, and said the ECJ should not consider it.

However, after an initial win at the Court of Session in the summer, the tide turned against the UK government in the autumn with an appeal verdict by Scotland’s top judge.

The Lord President, Lord Carloway, and two other senior judges overturned the initial ruling on appeal, then refused the UK government’s request to appeal to the UK Supreme Court.

The UK Supreme Court then also rejected a request for appeal, and the 27 justices heard oral arguments on the case at the end of November.

READ MORE: Poll: Clear majority of Scots say independence better than Brexit 

To the last, the UK Government argued the court should not consider the matter, and claimed that, after a year of wrangling, UK ministers had no view on whether Article 50 could be revoked, only that it was not government policy to revoke it.

In his ruling last week, Advocate General Sánchez-Bordona flatly rejected the UK argument that the issue of revocability was academic and hypothetical, and said the dispute was genuine, of obvious practical importance, and answering it was essential to clarify the matter.

He said Article 50 process should be handled like any other international treaty, with parties allowed to withdraw unilaterally if they changed their mind, not trapped inside.

In its full judgment, the Court agreed with the Advocate General and dismissed the UK government’s central argument that revocability was an academic matter.

On the contrary, the ECJ, like the Court of Session, found it was an important live issue.

“Replying to the arguments as to the admissibility of the case brought by the UK government and the Commission, the Court finds that the question referred by the Court of Session…  given that it is precisely the point at issue in the case pending before the Court of Session.”

The ECJ “ruled that, when a Member State has notified the European Council of its intention to withdraw from the European Union, as the UK has done, that Member State is free to revoke unilaterally that notification.

“That possibility exists for as long as a withdrawal agreement concluded between the EU and that Member State has not entered into force or, if no such agreement has been concluded, for as long as the two-year period from the date of the notification of the intention to withdraw from the EU, and any possible extension, has not expired.

“The revocation must be decided following a democratic process in accordance with national constitutional requirements.

“This unequivocal and unconditional decision must be communicated in writing to the European Council.

“Such a revocation confirms the EU membership of the Member State concerned under terms that are unchanged as regards its status as a Member State and brings the withdrawal procedure to an end.”

The issue is now referred back to the Court of Session for further action, but the political genie is already out of the bottle, dramatically increasing the pressure on Mrs May.

SNP Constitutional Relations Secretary Michael Russell said: “This is a hugely important decision that provides clarity at an essential point in the UK’s decision making over its future relationship with the EU.

“People in Scotland overwhelmingly voted to remain in the EU and that continues to be the best option for Scotland and the UK as a whole.

“This judgment exposes as false the idea that the only choice is between bad deal negotiated by the UK Government or the disaster of no deal.

“We now know, thanks to the efforts of Scotland’s parliamentarians, that remaining in the EU is still on the table.”

Green MSP Ross Greer added: "This is a massive moment at the start of a vital week, pointing to a clear way out of the Brexit mess.

"MPs should now follow the lead of the Scottish Parliament and kill off the false choice between the Prime Minister's bad deal and the disaster of a No-Deal Brexit.

"We should now let the people take back control of Brexit with a referendum."