The UK has the legal power to stop Brexit by unilaterally revoking Article 50, the EU‘s top court, the European Court of Justice (ECJ), has ruled.

The ruling matches legal advice given to the ECJ last week by its advocate general, who said as a sovereign country Britain could reverse its decision even at this late stage.

The legal decision is significant because means Britain could prevent a no-deal Brexit from happening if it wanted, even if Theresa May‘s deal is eventually voted down by MPs. The vote, originally due to be held on Tuesday, has been postponed with no new date yet given.

In their judgment released on Monday morning the panel of judges said it would be “inconsistent with the EU treaties’ purpose of creating an ever closer union among the peoples of Europe to force the withdrawal of a member state” against its wishes.

The court went even further than its advocate general and said the UK could even revoke Article 50 if the period had been extended. This is significant because it means time could be bought to hold a referendum or general election where the result could see Brexit cancelled.

“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,” the Luxembourg court said.

“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 court said any revocation must be decided “following a democratic process in accordance with national constitutional requirements”. In the UK, the Supreme Court ruled that a vote of parliament was required to trigger Article 50 in the first place: this condition may apply to revocation.

The UK’s government lawyers had argued at the ECJ that whether Article 50 could be revoked was a hypothetical question, and should not be ruled on. The government had been using the threat of “uncertainty” to convince MPs to vote for Theresa May’s deal, warning that an accidental no-deal could occur if it was rejected by the Commons.

[The] member state is free to revoke unilaterally that notification [of withdrawal] European Court of Justice

The European Council and European Commission’s lawyers were against giving member states the power to revoke Article 50 unilaterally and said the consent of other member states should be required. They argued this on the basis that an extension of the period requires the consent of member states, and said the power could potentially be abused by a malign government hoping to cause trouble.

The ruling is one of the fastest ever made by the court, which normally takes a matter of months to come to a conclusion, even when a case is fast-tracked. The legal question was raised by campaigners through the Scottish courts, which ultimately referred the case to the ECJ.

It was previously legally disputed as to whether Article 50 could be unilaterally revoked, as the wording of the Lisbon Treaty clause is ambiguous.

Stopping Article 50 can prevent the UK leaving but once it has left it would have to rejoin under Article 49 – using the normal process of a country applying for membership.

Tuesday’s vote on the EU withdrawal agreement has been postponed (AFP/Getty)

Dame Margaret Beckett, a leading supporter of the People’s Vote campaign for a second referendum, said the ruling was “confirmation that it is still up to us to decide whether we want to keep the existing deal we’ve got in the EU rather than accept a bad deal negotiated by the government”.

She added: “What has happened in the last week is that any prospect of no deal has been removed by amendments allowing parliament to take control, while we now all know beyond any doubt that we can stay in the EU – it’s not too late.”

"Brexit betrayal" march in London Show all 43 1 /43 "Brexit betrayal" march in London "Brexit betrayal" march in London A protester holds an anti-BBC sign Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit demonstrator holds a sign in the picket line Angela Christofilou/The Independent "Brexit betrayal" march in London A protester carrying a noose at the "Brexit betrayal" march. The man carrying it told a reporter: "That's what the traitor May deserves." AP "Brexit betrayal" march in London Pro-brexit supporters hold a sign opposed to Nigel Farage Angela Christofilou/The Independent "Brexit betrayal" march in London Protesters carry a defaced British flag on the march Angela Christofilou/The Independent "Brexit betrayal" march in London Tommy Robinson addresses a rally after taking part in a Brexit 'betrayal' march in central London PA "Brexit betrayal" march in London Police officers attempts to keep rival protesters from clashing at the Brexit 'betrayal' march in London Victoria Jones/PA "Brexit betrayal" march in London A protester holds an anti-Theresa May sign Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit demonstrator and his dog Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit demonstrator at the protest Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit sign at the rally Angela Christofilou/The Independent "Brexit betrayal" march in London Pro-brexit demonstrators endorse UKIP Angela Christofilou/The Independent "Brexit betrayal" march in London A Brexit 'betrayal' march protester wearing a Make Britain Great Again hat in London on 9 December 2018 Chris J Ratcliffe/Getty "Brexit betrayal" march in London Brexit 'betrayal' marchers gathering on Park Lane ahead of a protest Angela Christofilou/ The Independent "Brexit betrayal" march in London The "Brexit Betrayal" march passes through Central London Angela Christofilou/The Independent "Brexit betrayal" march in London Tommy Robinson tells protesters to join Ukip via their mobile phones on stage next to leader Gerard Batten (right) at the Brexit 'betrayal' march Gareth Fuller/PA "Brexit betrayal" march in London A protester speaks thorugh a megaphone on the march Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit demonstrator walks in the picket line Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit anti-May sign at the rally Angela Christofilou/The Independent "Brexit betrayal" march in London A protester carries a Union Jack on the march Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit demonstrator wrapped in the Union Jack Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit anti-May sign at the rally Angela Christofilou/The Independent "Brexit betrayal" march in London Pro brexit demonstrators move through Central London Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit demonstrator marches with sign Angela Christofilou/The Independent "Brexit betrayal" march in London A pro-brexit demonstrator holds a rude sign in the rally Angela Christofilou/The Independent "Brexit betrayal" march in London The march passes down Victoria Street near Parliament Angela Christofilou/The Independent "Brexit betrayal" march in London A festive protester marches near Parliament Angela Christofilou/The Independent "Brexit betrayal" march in London A protester holds a mock noose as the march passes down Victoria Street towards Parliament Angela Christofilou/The Independent "Brexit betrayal" march in London A protester wrapped in the Union Jack marches down Victoria Street towards Parliament Angela Christofilou/The Independent "Brexit betrayal" march in London A protester makes some noise on the march Angela Christofilou/The Independent "Brexit betrayal" march in London A protester dressed as a dinosaur holds a sign rallying against "Davocracy" - in reference to the annual World Economic Forum meeting in Davos Angela Christofilou/The Independent "Brexit betrayal" march in London A protester holds a pro-brexit sign on the march Angela Christofilou/The Independent "Brexit betrayal" march in London The march approaches parliament Angela Christofilou/The Independent "Brexit betrayal" march in London A protester distributes pro-brexit lapel badges Angela Christofilou/The Independent "Brexit betrayal" march in London A demonstrator wears an anti-EU poster and holds an anti-BBC sign Angela Christofilou/The Independent "Brexit betrayal" march in London A smoke bomb is deployed in Parliament Square as the march comes across the counter-demonstration Angela Christofilou/The Independent "Brexit betrayal" march in London Angela Christofilou/The Independent "Brexit betrayal" march in London A flag bearing the Arms of Plantagenet flies in theprot Angela Christofilou/The Independent "Brexit betrayal" march in London Protesters on the Brexit 'betrayal' march in London on 9 December 2018 Angela Christofilou/ The Independent "Brexit betrayal" march in London Protesters on the Brexit 'betrayal' march in London on 9 December 2018 Angela Christofilou/ The Independent "Brexit betrayal" march in London Brexit 'betrayal' marchers gathering on Park Lane ahead of a protest on 9 December 2018 Angela Christofilou/ The Independent "Brexit betrayal" march in London Brexit 'betrayal' marchers gathering on Park Lane ahead of a protest on 9 December 2018 Angela Christofilou/ The Independent "Brexit betrayal" march in London Angela Christofilou/The Independent

Jo Maugham QC, a senior lawyer and director of the Good Law Project, which backed the case, said: “The tiny Good Law Project and six brave Scottish parliamentarians have taken on the government, the 27 other member states, and the Commission – and won.

“This is the biggest upset since the first Book of Samuel and arguably the most important case in modern domestic legal history.”

He added that the 2016 referendum “would shame a banana republic”, stating: “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.”