Image copyright Getty Images

Scotland's highest court has delayed a decision on whether the prime minister has fully complied with a law requiring him to ask for a Brexit extension.

Campaigners said the move would ensure that Boris Johnson followed the law.

Mr Johnson sent an unsigned letter to Brussels asking for a delay, along with a signed letter saying he believed that doing so would be a mistake.

The UK government argued at the Court of Session that this fulfilled its legal obligations under the Benn Act.

But Lord Carloway said the case should be continued until it was clear that the obligations under the legislation had been "complied with in full".

The court was originally asked earlier this month to consider using "nobile officium" powers to request a Brexit extension on the prime minister's behalf - but the judges delayed making a ruling until the political situation become clearer.

What happened in court?

Image copyright Getty Images Image caption Joanna Cherry and Jolyon Maugham had asked for the case to be continued

On Monday, those behind the petition - SNP MP Joanna Cherry, businessman Dale Vince and QC Jolyon Maugham - asked for a further extension.

Their lawyer, Aidan O'Neill QC, described the manner in which the second letter was sent by Mr Johnson as "unusual".

He told the three judges that it was "not entirely in accordance with undertakings which were given to this court" and said it was "sailing close to the wind".

Lord Carloway noted that it was "a very carefully-written letter".

David Johnston QC, representing the UK government, argued that the appeal should be dismissed as the letter had been sent.

However, the judges refused to dismiss the action and continued the hearing to a later date.

What has the reaction been?

Image copyright Getty Images Image caption Protesters have gathered outside the Court of Session during the case

Ms Cherry said: "The decision keeps the Sword of Damocles hanging over Boris Johnson, and to make sure he fully complies with the law and the cross-party Benn Act.

"This is a victory for those of us who have been campaigning tirelessly to make sure he follows the law."

Mr Maugham added: "It is a pity to have to say it, but this is not a prime minister who can be trusted to comply with the law. And because he cannot be trusted he must be supervised."

Ms Cherry had earlier said the legal action had been instrumental in forcing Mr Johnson to send the request for an extension.

She told the BBC Radio's Good Morning Scotland programme: "After all his huffing and puffing, the prime minister has had to climb down and seek an extension.

"And I think he was trying to spin that by not signing the letter and issuing another letter. The good news is that the EU have ignored that nonsense and are taking the request seriously.

"It will be for the court to decide whether or not the prime minister has broken his promise to the court. His promise wasn't to me or any of the other petitioners - it was to the court."

Why is this back in court again now?

Media playback is unsupported on your device Media caption Lord Carloway explained why the court was delaying a decision

The Benn Act, passed in September, required Mr Johnson to request a three-month Brexit delay unless he could pass a deal or get MPs to approve a no-deal exit by 19 October.

Fearing he might find a way to circumvent this, campaigners sought to provide a "safety net" by asking Scotland's highest court to use "nobile officium" powers to write a letter on the prime minister's behalf if he failed to do so.

An earlier hearing was told Mr Johnson had given an undertaking to "fully comply" with the law and that he accepted he could not "frustrate" the purpose of the act.

The judges decided that the political debate had still to "play out" and therefore delayed making a decision.

They agreed the court should sit again on 21 October by which time they hoped the circumstances would be "significantly clearer".

At a special sitting of the House of Commons on Saturday, MPs passed passed an amendment, put forward by Sir Oliver Letwin, delaying approval of Boris Johnson's Brexit deal. This meant, by the terms of the Benn Act, he had to write to the EU requesting an extension.

He did send this request, along with the second letter, saying he believed a further Brexit delay was a mistake, late on Saturday.

What did the letters say?

Image copyright Downing Street

Image copyright Downing Street

What is the nobile officium?

The procedure of petitioning the nobile officium is unique to Scots law. Its name is a Latin term meaning the "noble office".

The procedure offers the opportunity to provide a remedy in a legal dispute where none exists.

In other words, it can plug any gap in the law or offer mitigation if the law, when applied, would be seen to be too strict.

In this case, it could have seen an official of the court sign a letter to the EU requesting a Brexit extension, as set out in the Benn Act, should the prime minister have failed to do so.