EDINBURGH (Reuters) - A legal appeal to decide if Britain alone can change its mind about leaving the European Union should be given consideration by the European Court of Justice (ECJ), Scotland’s highest court said on Friday in a boost to anti-Brexit campaigners.

FILE PHOTO: An anti-Brexit demonstrator waves flags outside the Houses of Parliament, in London, Britain, September 10, 2018. REUTERS/Hannah McKay

Rounding out a week of bad news for Prime Minister Theresa May’s Brexit plans, petitioners argued successfully that legal certainty about the process is needed in advance of any British parliamentary vote because no country has ever withdrawn from the European Union.

The Court of Session decision means the ECJ should say whether it is legally possible for Britain to stay in the world’s biggest trading bloc if and when the UK parliament so decides.

Brexit continues to be mired in doubt after EU leaders cautioned Prime Minister Theresa May on Thursday that unless she presented an alternative to her current proposals, Britain would crash out of the EU without a deal.

Jo Maugham, a lawyer funding the judicial appeal, described the Scottish court’s decision to refer the issue to the European court as an “absolute bombshell” for the government.

London has argued that the question of whether Britain alone can stop Brexit is irrelevant, since it does not intend to change its mind.

The Court of Session disagreed.

“If Members of Parliament are to cast their votes in a responsible manner, it is surely obvious that they should be properly advised as to the existing legal position so far as that may be relevant to their deliberations,” Lord Carloway said in his judgment.

Britain’s Brexit ministry said it was “disappointed” by the decision and would carefully consider its response.

“As the government has repeatedly said, we are committed to implementing the result of the (2016) referendum and will not be revoking Article 50 (withdrawal clause),” a spokesman said.

Friday’s decision could now, theoretically, face another appeal before the UK Supreme Court, although legal sources close to the case believe that option is unlikely.

Pro-European petitioners argued that while there is no legal doubt that Britain could stop Brexit with the permission of the other 27 member states, it should seek to establish a legal right to do so unilaterally whether the rest of the bloc likes it or not.

The lawmakers behind the challenge represent electoral areas in Scotland which voted strongly to remain in the EU in the June 2016 referendum. The United Kingdom as a whole voted to leave.