EDINBURGH (Reuters) - A legal attempt by anti-Brexit campaigners to establish that Britain could unilaterally reverse Brexit was given a boost on Tuesday by Scotland’s top court, which said it wants to examine the case in greater depth.

Anti-Brexit demonstrators wave EU and Union flags outside the Houses of Parliament in London, Britain, January 30, 2018. REUTERS/Toby Melville - RC1A41866470

The group behind the legal challenge, who include pro-EU Scottish lawmakers, want to show that Britain could stay in the European Union after all -- if, for example, the final terms of Brexit negotiated by the government were rejected by parliament.

The campaigners are ultimately seeking a formal opinion by the European Court of Justice (ECJ) asserting that Britain could reverse its decision to invoke Article 50 of the EU’s Lisbon Treaty, the formal step that kickstarted the Brexit process.

They argue that once the terms of Brexit have been negotiated, Britain’s sovereign parliament may well decide not to go ahead with it, so lawmakers need to know in advance if that is legally possible.

As things stand, there is no suggestion of a change of course over Brexit, which British voters backed by 52 to 48 percent in a June 2016 referendum. The ruling Conservative Party and main opposition Labour Party are both committed to Britain leaving the European Union.

The legal case, headed by anti-Brexit campaigning lawyer Jolyon Maugham, had been rejected by a lower Scottish court.

The British government argued that the question of whether Britain could unilaterally stop Brexit was irrelevant because the will of the voters was clear and the government was not going to back out of Brexit.

On Tuesday, the Court of Session, Scotland’s highest court, overturned an earlier ruling, saying the case raised important issues and there should be a full hearing so all the arguments could be debated.

“The issue of whether it is legally possible to revoke the notice of withdrawal is, as already stated, one of great importance,” the Court of Session said, referring to the Article 50 process which started in March 2017.

“On one view, authoritative guidance on whether it is legally possible to do so may have the capacity to influence (lawmakers) in deciding what steps to take in advance of, and at the time of, a debate and vote on the European Union (Withdrawal) Bill.”

Once a full hearing has taken place in Edinburgh, a decision will be made on whether to refer it to the ECJ, the court said, although it may ultimately decide that it should not.

If the Scottish court decided not to refer to the ECJ, the petitioners can take their appeal to Britain’s Supreme Court.

They argue that while there is no doubt that Britain could stop Brexit with the permission of the other 27 members, it should seek to establish a legal right to do so unilaterally whether the rest of the bloc likes it or not.