Boris Johnson could be held in contempt by a Scottish court after he urged EU leaders to ignore a letter asking for an extension to the Brexit deadline.

Scotland’s most senior judge, Lord Carloway, and two other judges will hear allegations on Monday that the prime minister broke a promise he made to the court that he would not try to sabotage the request for an extension.

The UK government’s lawyers pledged in writing and in court this month that the prime minister would honour the provisions of the Benn act, seeking an extension to article 50 if he failed to get a Brexit deal passed by 19 October.

Q&A What does the 'Benn act' say? Show Hide The EU Withdrawal (No 2) Act, often referred to as the Benn act, is a law that was passed by MPs in an attempt to prevent Boris Johnson's government leaving the EU without a deal. It specifies that by 19 October the government must have either secured a deal that parliament has approved, or secured explicit approval from parliament to leave without a deal. If neither of those conditions are met – and if Johnson cannot get his deal passed on 'super Saturday' – it requires the prime minister to write to the EU to ask for a further Brexit extension. The form of the letter that the prime minister must send is set out in full in the act. The act says the extension should last until 31 January 2020, or longer if the EU suggests. Here is the full text of the European Union (Withdrawal) (No 2) Act 2019 Martin Belam

The court needs to decide whether those pledges included not trying to frustrate that act, known in full as the European Union (Withdrawal) (No 2) Act, by simultaneously asking for the extension request to be ignored.

Carloway postponed a ruling at the first hearing of this case on 9 October, in part because the government’s lawyers made “detailed and specific” statements to uphold the law on Johnson’s behalf.

If the three judges find Johnson is in contempt, he could theoretically face a fine or even jail, but the court could suspend a ruling on sanctions to give the prime minister time to comply with its ruling.

After losing a knife-edge Commons vote on Saturday on a delay to his deal, Johnson sent an unsigned copy of the letter required by the act but also sent another personal letter to Brussels that explicitly asked EU leaders not to agree yet to an extension.

Johnson is reported to have spoken privately to key EU figures on Saturday to make the same point, as he tries to buy extra time to force his deal through Westminster before the planned Brexit day on 31 October.

Lawyers for three anti-Brexit campaigners are expected to argue on Monday that these steps are a clear breach of the government’s promises to the court, made by lawyers acting on behalf of Lord Keen, the advocate general and the UK government’s law officer for Scotland.

The government objected to an application from those campaigners – Dale Vince, a green energy entrepreneur, Jolyon Maugham QC and Joanna Cherry QC, an SNP MP – for an interdict or injunction that would force the prime minister to stick to the Benn act’s provisions.

Acting on Keen’s behalf, the government’s lawyers told the court there was no need to issue an interdict because Johnson accepted “that he is subject to the public law principle that he cannot frustrate its purpose or the purpose of its provisions”.

The submission repeatedly added that “the prime minister is subject to the law and, as would be expected of a minister of the crown, there is no question but that he will comply with the requirements of the law. He has repeatedly said so.”

Play Video 1:23 Keir Starmer suggests Labour could back Brexit deal if second referendum attached – video

Aidan O’Neill QC, the anti-Brexit campaigners’ advocate, is expected to ask the judges to replay sections of a BBC recording of the first hearing on 9 October when government lawyers confirmed Johnson would not try to sabotage the Benn act’s provisions.

The government is expected to argue on Monday that Johnson honoured his promises to the court by sending the letter as required, and that it was lawful for him to simultaneously argue against an extension.

However, David Johnston QC, one of the government’s two QCs, told the court this month that Johnson knew he faced legal sanctions if he broke the law. “I would have to accept that the court will be able to deal with that one way or another,” he said.

Maugham and his co-campaigners had originally asked the court to consider using its unique powers, known as nobile officium, to write that letter on Johnson’s behalf if he failed to do so. That part of the case is now likely to be dropped.

Maugham said it was up to Carloway and his fellow judges to consider now whether they felt the court had been misled about Johnson’s plans to frustrate the act and, if so, what sanction should be imposed.

“The court’s role is to uphold the law,– not to act as parent to a stroppy child,” he said. “The question of whether the prime minister is in contempt of court, as many commentators have argued, is really one for it. But we will supply the court with the relevant footage from the inner house hearing [of 9 October].”