The Prime Minister has accepted he must send a letter requesting an Article 50 extension if no deal is agreed with Parliament by October 19, Scotland's highest civil court has heard.

Documents submitted to the Court of Session on behalf of Boris Johnson were read out on Friday, in which he makes it clear he will not attempt to frustrate the so-called Benn Act.

The legislation, passed by Westminster last month, requires the Prime Minister to ask the EU for a Brexit extension to January 31 if Parliament does not agree to any withdrawal deal Number 10 may come back with by October 19.

Legal action launched at the Outer House of the court seeks to create an order which would force Mr Johnson to send the letter and prohibits him from frustrating the Act's purpose.

This includes banning him from asking EU member states to deny the letter's request or by sending an additional letter which contradicts it.

Aidan O'Neill QC, representing the campaigners behind the legal action, claimed Mr Johnson's previous statements go against what he has 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 October 31 "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."

The trio behind the court action - businessman Vince Dale, SNP MP Joanna Cherry QC and Jolyon Maugham QC - are seeking an order to ensure Mr Johnson requests an extension if he refuses to abide by the terms of the Benn Act.

The hearing before judge Lord Pentland continues.

Meanwhile, a judge at the court's Inner House has said it would be "unprecedented" for an official to exercise powers to sign an Article 50 extension on behalf of Mr Johnson.

It heard the unique power of nobile officium - which would allow a court official to sign the letter - has never been used over a Prime Minister.

Lord Drummond Young said: "In the circumstances of this case, it is unprecedented. There's a question of competence."

The three judges - Lord Drummond Young, Lord Menzies and Lord Turnbull - set the date for the hearing on this aspect of the case for Tuesday.