Can the UK still choose to revoke Article 50 and stop Brexit?

Yes, according to a landmark ruling from the European Court of Justice.

Europe's highest court says that Westminster has the power to order the UK Government to revoke the withdrawal notice which underpins Brexit.

The ruling, which follows a year-long legal bid led by a group of Scottish cross-party politicians, comes on the eve of a crunch vote by MPs of the Prime Minister's Brexit deal.

So what happens now?

HeraldScotland: SNP MEP Alyn Smith said he would be investigating

What did the ECJ say?

The European Court of Justice ruled that the UK is free to unilaterally revoke the notification of its intention to withdraw from the EU.

Simply put, the court ruled that MPs have the power to revoke Article 50 - the withdrawal notice which underpins Brexit - without relying on the consent of the other 27 EU nations.

The ruling of the ECJ will be a "preliminary" ruling to enable Scotland's Court of Session to give its final say.

How will the UK Government react?

The UK Government has maintained the question being asked is entirely hypothetical and academic, and challenged the cross-party group at every legal stage.

The government insists it is committed to implementing the result of the EU referendum in June 2016 and has no intention of revoking Article 50.

Ministers have argued it is not for courts to enter into a hypothetical or premature debate.

How did the case get all the way to Europe?

A ruling from European judges is what the group has sought from day one.

The politicians have overcome a series of legal hurdles at every stage in the process, which first came to court in February.

At the Court of Session in Edinburgh, they lost an early bid to have a full hearing on the matter, and later secured one on appeal.

Following that full hearing, the court knocked back their bid to have the issue referred to the ECJ.

Again, this was overturned by senior judges in Edinburgh upon appeal and the case was allowed to proceed to the ECJ.

A further attempt by the UK Government to stop the case getting to Europe was rejected last month at the UK Supreme Court.

Who was involved in this legal challenge?

The case was initially brought to court by a group of politicians from four parties, working in three different parliaments.

The current group features Green MSPs Andy Wightman and Ross Greer, SNP MEP Alyn Smith and Labour MEPs David Martin and Catherine Stihler.

The politicians are supported by campaigning lawyer Jolyon Maugham QC, director of the Good Law Project.

The case, formally known as Wightman and others v the Secretary of State for Exiting the European Union, was opposed by the UK Government.

What did the cross-party politicians hope to achieve?

In March 2017, Prime Minister Theresa May started the formal process for the UK to leave the European Union (EU) when she triggered Article 50 of the Treaty on European Union - the legal mechanism for a country to leave the EU.

The politicians wanted judges at the European Court of Justice (ECJ) to indicate whether the UK can unilaterally revoke that Article 50 request to leave the EU.

Read more: Supreme Court rejects UK Government bid to appeal Brexit reversal case

In other words, can the UK stop the Brexit process on its own, without the consent of the other 27 EU member states?

As the Good Law Project puts it: "Many experts believe we can choose to stay in the EU without permission. That, if we want, we can just withdraw our notice. But there is only one way to be sure: a court has to decide what Article 50 means."

Mr Maugham argues the case "could decide the fate of the nation".

Post-ruling - what happens now?

The issue is now referred back to the Court of Session for further action. 

But the ruling means that Westminster could suspend Article 50 as a prelude to a People's Vote. 

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