The UK can unilaterally revoke its withdrawal from the EU, the European Court of Justice has ruled.

A spokeswoman for the court said: "In today's judgment, the Full Court has 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 spokeswoman continued: "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."

READ MORE: The story of how six Scottish politicians took on the UK and the EU

Monday's ruling upheld a finding by ECJ advocate general Manuel Campos Sanchez-Bordona, who said last week that Article 50 of the Lisbon Treaty allows the "unilateral revocation of the notification of the intention to withdraw from the EU, until such time as the Withdrawal Agreement is formally concluded".

He rejected the contention that the mechanism for a member state to quit the trade bloc could only be reversed following a unanimous decision of the European Council.

It comes the day before Theresa May is due to attempt to get her Brexit Withdrawal Agreement through Parliament.

In Monday's ruling the judges ruled that a country's decision to revoke Article 50 after notifying the EU of its decision to withdraw "reflects a sovereign decision to retain its status as a Member State of the European Union, a status which is neither suspended nor altered by that notification", the spokeswoman added.

The National: Green local government spokesman Andy Wightman warned the party would not back the Scottish Budget

Green MSP Andy Wightman welcome the decision on Twitter, thanking everyone who had supported the small group of Scottish politicians who fought the case.

Wightman hailed the "momentous" ruling, saying: "It is now clear that 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."

Lib Dem Brexit spokesman Tom Brake said: "The ECJ has made clear that the UK can stop Brexit unilaterally. The Government can therefore prevent a chaotic no-deal.

"For the sake of people's livelihoods, the Prime Minister must end the uncertainty and rule out a no-deal.

"It is clear any Brexit will make people poorer and reduce the UK's standing in the world.

"MPs should not only vote down Theresa May's deal, but back a People's Vote with the option to remain in the EU."

The National: MEP Alyn Smith says the UK Government must find a way to maintain EU co-operation

SNP MEP Alyn Smith, also one of a cross-party group of Scottish politicians who brought the case, said it was "dynamite".

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."

READ MORE: The story of how six Scottish politicians took on the UK and the EU

Scotland's Constitutional Relations Secretary, Mike 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 a 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."

First Minister Nicola Sturgeon tweeted: "Important judgment from ECJ - Article 50 can be unilaterally revoked by UK."

She added: "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."

However, Environment Secretary Michael Gove told BBC Radio 4's Today programme: "We voted very clearly - 17.4 million people sent a clear message that we wanted to leave the European Union and that means also leaving the jurisdiction of the European Court of Justice.

"So, this case is all very well but it doesn't alter either the referendum vote or the clear intention of the Government to make sure that we leave on March 29."