Image copyright Reuters Image caption Lawyers for the government insisted Mr Johnson would comply with the law

The UK government "can't be trusted" to comply with the law aimed at avoiding a no-deal Brexit, Scotland's highest civil court has been told.

The Court of Session is being asked to spell out what sanctions would apply if ministers fail to comply with the so-called Benn Act.

Documents confirmed Boris Johnson would write a letter seeking a Brexit delay if a deal is not agreed by 19 October.

But the petitioners said this was contradicted by other statements.

Under the Benn Act, passed last month, the prime minister must write to the EU, requesting a Brexit extension if no deal is signed off by Parliament by 19 October, unless MPs agree to a no-deal Brexit.

Suspicion that Mr Johnson may seek to circumvent this law has prompted a new case in the Court of Session.

Businessman Dale Vince, QC Jo Maugham and SNP MP Joanna Cherry have asked the judge to set out the penalty for non-compliance.

However, a document submitted by the UK government confirmed it would write a letter requesting a delay if no deal is agreed by 19 October.

Skip Twitter post by @JolyonMaugham Here are the paragraphs Aidan O'Neill QC, Counsel for @DaleVince, @joannaccherry and myself, has just read out. They are from the written case of the Prime Minister and if the Prime Minister promises the court he will comply we need take no further time. Why will he not? pic.twitter.com/YnYLJ0iMhn — Jo Maugham QC (@JolyonMaugham) October 4, 2019 Report

The government's lawyer Andrew Webster QC told the court "it could not be clearer" that it intended to comply with the law.

Mr Webster argued there was no need for an order to be made forcing a letter to be sent, because the court had it on record that it would be done.

Asked by judge Lord Pentland why they would not make written undertakings under oath to allay the concerns of the petitioners, Mr Webster said this was not necessary.

He also argued a court order could "ruin" the government's negotiation position with the EU, adding: "It would be quite inappropriate for the court to enter the negotiating arena, by saying what can be done."

Image copyright PA Media Image caption Joanna Cherry and Jo Maugham argue Boris Johnson cannot be trusted on Brexit

But Aidan O'Neill QC, for the petitioners, claimed Mr Johnson's previous statements went against what had been said to the court through the documents.

He referred to promises made by the prime minister that he would rather be "dead in a ditch" than send a letter requesting an extension, and that the UK will leave on 31 October "do or die".

Mr O'Neill said: "We can't trust this government, in light of statements it has made, that it will comply with the law."

Lord Pentland will deliver his ruling on Monday.

A separate aspect of the case - whether the court could use its "nobile officium" power to, in effect, sign a letter to European leaders on Mr Johnson's behalf will be considered by a panel of Inner House judges next Tuesday.

At a preliminary hearing, a judge said it would be "unprecedented" for an official to exercise powers in this way as the nobile officium power has never previously been used over a prime minister.

Why are there two parts to the case? BBC Scotland political correspondent Andrew Kerr explains

You can think of this as one train - but a part of that train is detaching and going down a slightly different track.

Under the Benn Act, Boris Johnson has to seek a Brexit extension if there isn't a deal that's been signed off by Parliament.

The case heard today by Lord Pentland is about the remedies or punishments that could be inflicted on the prime minister if he doesn't seek an extension - whether that is a fine or imprisonment.

Next week there's this other case - the nobile officium case - which is about whether the court has the power to sign a letter in the absence of Boris Johnson requesting an extension, if he is refusing to do that.

That letter would be signed by the clerk of the court.

This all could be appealed at the Supreme Court with a decision there.

The government has said it will stick to the law but it wants to test the limit of what is lawfully required.

The UK government has insisted it remains focused on sealing a deal with the EU to ensure the UK can leave at the end of October, the current deadline, but says a no-deal exit is the only other alternative.

A senior Downing Street source told the BBC the Benn Act "only imposes a very specific narrow duty concerning Parliament's letter requesting a delay".

The source added: "The government is not prevented by the Act from doing other things that cause no delay, including other communications, private and public."

Mr Johnson himself tweeted: "New deal or no deal - but no delay. #GetBrexitDone #LeaveOct31"

At the end of Friday's hearing, one of the petitioners, Jo Maugham QC, accused Boris Johnson of making contradictory statements.

Speaking outside the court, he said: "The prime minister said for the first time he would send the letter that Parliament has required him to send - that is the letter asking the EU for an extension beyond the 31st October.

"The prime minister also said for the first time that he wouldn't frustrate Parliament's intention.

"The reason that's so important is that at the same time he's telling Parliament that we will leave on the 31st of October come what may."

"There is no way to reconcile those two statements."