BORIS Johnson will send a letter to the EU requesting a Brexit extension if no deal has been agreed by October 19, a court has been told.

Documents submitted to the Court of Session, Scotland's highest civil court, concede the Prime Minister will comply with the so-called Benn Act.

It comes despite Mr Johnson insisting he would rather be "dead in a ditch" than delay Brexit further and repeatedly arguing the UK will leave the EU on October 31 “come what may”.

Yesterday, he also wrote on twitter: "New deal or no deal - but no delay."

Legislation passed by MPs last month compels the Prime Minister to ask for another Brexit delay if no agreement has been reached with Brussels by October 19.

However, there have been suggestions from Downing Street sources that Mr Johnson will seek to find a way round this.

READ MORE: Court to be asked if PM can be jailed over No Deal 

The latest papers emerged in a legal challenge brought by businessman Dale Vince, QC Jo Maugham and SNP MP Joanna Cherry.

The trio want to ensure Mr Johnson complies with the law.

The court documents, submitted by the UK Government, accept the Prime Minister will send a letter asking for an extension until January 31 under the conditions outlined by the Benn Act.

They also add that Mr Johnson accepts “that he is subject to the public law principle that he cannot frustrate its purpose or the purpose of its provisions.

“Thus he cannot act so as to prevent the letter requesting the specified extension in the Act from being sent.”

Aidan O'Neill QC, who is representing the petitioners, said this "directly contradicts" Mr Johnson's public statements on the issue.

He said the UK Government cannot be trusted to comply with the law, and called on the court to issue a legally binding order forcing Mr Johnson to do so.

He said: “It should not have come to this. We don’t wish to be before this court.

“But it has been required because of the manner in which the constitution has been undermined and the rule of law challenged.”

In a modern twist to the court proceedings, Mr O’Neill also raised comments made by a senior Number 10 source to the BBC while the hearing was still ongoing.

The quote, which was reported on the BBC's website, said: "The Government will comply with the Benn Act, which only imposes a very specific narrow duty concerning Parliament's letter requesting a delay - drafted by an unknown subset of MPs and pro-EU campaigners - and which can be interpreted in different ways.

"But the Government is not prevented by the Act from doing other things that cause no delay, including other communications, private and public.

"People will have to wait to see how this is reconciled. The Government is making its true position on delay known privately in Europe and this will become public soon."

Mr O’Neill said such remarks showed exactly why a court order is needed, as the Prime Minister apparently planned to frustrate the Benn Act.

READ MORE: Rebecca McQuillan: Jackson Carlaw is sending Scots Tories into reverse 

However, Andrew Webster QC, representing the UK Government, said the documents submitted in court are a "clear statement" as to what the Prime Minister will do.

He said: "They have been put on record so there can be no doubt."

He insisted there was no need for a court order, or for Mr Johnson to submit a sworn statement under oath that he will comply with the legislation passed by MPs.

Mr Webster also insisted a court order or undertaking could disadvantage the UK Government during its negotiations with the EU.

He said: "It would be quite inappropriate for the court to enter the negotiating arena, by saying what can be done."

Judge Lord Pentland will announce his decision on Monday.

Speaking after the hearing, Ms Cherry said she was pleased with the way things had gone.

She said: “The nub of the matter is this: Boris Johnson is prepared to say in the court pleadings that he will sign the letter, but that doesn’t sit easily with what he has been saying in Parliament – even yesterday and in his speech at Tory Party conference.

“The judge was very sceptical about why what was said in the pleadings has not been put into a sworn statement.

“From our point of view, the very least we want is a written undertaking from the Prime Minister that he will obey the law in this regard, noted in the minute of proceedings in the court.

“Because if he breached that, that would have the same effect as breaching an interdict.”

This could include a fine or even imprisonment.

Ms Cherry said the UK Government cannot be trusted.

She added: “I don’t believe that Boris Johnson is to be trusted. That’s not my belief – it’s based on experience, and therefore my lawyers have insisted that what’s required at the very least is an undertaking in the minute of proceedings in the court.”

Meanwhile, a further aspect of the legal action – which would allow a court official to sign the extension letter on Mr Johnson’s behalf if he refuses to do so, using a unique power known as "nobile officium" – will be heard on Tuesday.

Yesterday, a judge at the Court of Session's Inner House said it would be "unprecedented” for such a power to be used on a Prime Minister.

It came as Irish premier Leo Varadkar said Ireland would likely agree to a request by the UK for a Brexit extension.