A cross-party legal challenge to the UK Government on Brexit is not "hypothetical or academic", Scotland's highest civil court has heard.

Lawyers acting for a group of nine politicians contested claims the action was "premature" in a hearing at the Court of Session despite a counter argument that their petition was "incompetent" and would undermine parliamentary privilege.

The group is seeking a ruling from the European Court of Justice (ECJ) on whether the withdrawal process triggered under Article 50 of the Treaty on European Union can be revoked by the UK on its own, without the consent of the other 27 EU member states.

They argue the legal uncertainty surrounding the issue has to be resolved so they can carry out their duties as democratically-elected representatives.

The group includes Green MSPs Andy Wightman and Ross Greer, SNP MEP Alyn Smith, Labour MEPs David Martin and Catherine Stihler, SNP MP Joanna Cherry and Jo Maugham QC as well as recent additions Tom Brake, Lib Dem MP for Carshalton and Wallington, and Chris Leslie, Labour MP for Nottingham East.

Their attempt to have the issue referred to the Luxembourg court has already been knocked back by a Scottish judge on the basis the issue was "hypothetical and academic", but that decision was overturned by Lord Carloway, the Lord President, earlier this year.

In a full hearing at the court, Aidan O'Neill QC, acting for the petitioners, said the issue was "certainly not premature because it would come too late if left longer".

"This is not some ivory tower, theoretical question," he said.

"This is to allow them to carry out their duties as representatives of the people.

"The reason we are here is not to waste the court's time, is not to raise hypothetical issues. It's a real dispute, a real reason for this matter to be required to be resolved."

He added: "If there's a vote without knowing for certain by any parliament, the recipe for chaos is all the greater because it would be voting for the unknown."

David Johnston QC, for the UK Government, said the issue was "purely hypothetical" and academic because the UK Government's position was that the Parliament will have the opportunity to accept the final Brexit deal or go forward without one.

On Article 50, he said: "The government does not intend to seek to revoke the notification, Parliament has not instructed that that should be done and there is nothing to suggest that's going to happen.

"It's not for the court to enter into a hypothetical or premature debate."

Mr Johnston added: "This petition is incompetent and therefore it should be dismissed."

He argued that a request to the court to provide legal advice to elected representatives so that they can decide how to act or vote in Parliament "is an infringement of parliamentary privilege" and "constitutionally inappropriate" because the court was being invited to become involved in a current debate in Parliament.

Judge Lord Boyd said he understood the "need for speed" in the case and would issue his decision "in very short order".