A last ditch bid to halt Brexit will go ahead later this month after a UK Government appeal against the move was rejected by Scotland's top judges.

A cross-party group of politicians is seeking a ruling from Europe's highest court on whether parliament can revoke the UK's withdrawal from the EU.

They were given permission to take the case to the Court of Justice of the European Union (CJEU) in a landmark ruling earlier this year, however the government tried to appeal against the decision.

Following a tense hearing at the Court of Session on Thursday, which saw the Advocate General for Scotland drafted in to represent the government, the application to appeal was thrown out by Scotland's most senior judge, the Lord President, Lord Carloway.

The case will now be heard at the CJEU later this month, although the government could still attempt a further appeal to the UK Supreme Court.

Speaking outside court, SNP MP Joanna Cherry QC, one of the politicians behind the action, said: "I'm absolutely delighted that the hearing before the Court of Justice will go ahead on the 27th November.

"It's absolutely vital for MPs that they get the answer to this question. The UK Government want people to think the only choice is deal or no deal, but there is the possibility of a third choice - to reverse the madness of Brexit."

If the ECJ rules that parliament can revoke Article 50 without the permission of the other 27 EU states, Brexit could, in theory, be stopped.

However, it would be up to parliament to make that decision, with many politicians reluctant to overturn the result of the referendum.

Ms Cherry added that the case was simply about clarity over the legal position, saying: "We're not trying to usurp parliament, we just want an answer to the legal question of whether or not Article 50 can be revoked."

The legal battle is being led by Green MSP Andy Wightman, alongside his fellow Green MSP Ross Greer, Labour MEPs Catherine Stihler, David Martin, SNP MEP Alyn Smith, Scottish LibDem MP Christine Jardine, and Ms Cherry.

LibDem MP Tom Brake and Labour MP Chris Leslie are additional parties to the action.

The UK Government tried to argue that judges had made a mistake in allowing the case to proceed by rejecting claims that the case was purely "academic or hypothetical".

They also claimed that any decision in the case could "constitute a breach of parliamentary privilege".

In rejecting the appeal bid, Lord Carloway said the government's application was "largely a rehearsal of the points made" in the earlier hearing, which were rejected by the court.

However, it was the issue of timing which ultimately led to the application being refused.

Lord Carloway said that if permission to appeal were granted, there would be "little prospect" of a final decision in the case in advance of any parliamentary vote on the final Brexit deal.

He added that the UK Government could still go on to appeal any decision by the CJEU at a later date.

During the hearing, the Advocate General for Scotland, Lord Keen, argued that the issue was a "matter of high constitutional importance" which should be referred to the Supreme Court.

However, Aidan O'Neill QC, representing the politicians, said the government's bid made no "arguable point in law for appeal to the Supreme Court".

He added: "The Court of Justice should be allowed to get on with its job."

Mr O'Neill also asked: "Why is the UK Government so keen on keeping the public, members of parliament, in ignorance of what the position in law is."

Lord Carloway responded: "That's a very interesting question but it's got nothing to with these proceedings."

The advocate also raised the issue of expenses in the case, saying that the "procedural wrangling" was adding to his clients' costs.

"The Government has very deep pockets," he said. "It has access to taxpayers' money - we don't."

A UK Government spokesman said: "The Government has made submissions to the CJEU. In any event, the Government will not be revoking Article 50."