The Liberal Democrats and SNP have lost a High Court challenge against ITV over its decision to exclude their party leaders from a televised election debate.

A head-to-head debate between Boris Johnson and Jeremy Corbyn is due to air on Tuesday night, which will exclude any other party leaders.

The Lib Dems and the SNP contested the broadcaster’s decision at a hearing in London on Monday, arguing it was unlawful because it breached impartiality rules.

READ MORE: SNP take legal action against ITV over exclusion from election debate

But two leading judges ruled the decision was not open to challenge in the courts and that the parties’ only recourse was to complain to Ofcom.

Lord Justice Davis, sitting with Mr Justice Warby, said that, even if the court did have jurisdiction to deal with the case, the format of the debates was a matter of “editorial judgment” and there was “no arguable breach of the Broadcasting Code”.

He added: “The clear conclusion of both members of this court is that, viewed overall, these claims are not realistically arguable.

“It follows that the television debate scheduled for tomorrow evening between the leader of the Conservative Party and the leader of the Labour Party may lawfully go ahead.”

ITV lawyers had told the court that the debate – and an interview with Lib Dem leader Jo Swinson due to follow it – would have been pulled from its schedule altogether if the judges had found ITV breached its duties under the code.

Ian Blackford, SNP Westminster leader, said: “Nicola Sturgeon was ready, willing and able, to take on Johnson and Corbyn in tomorrow night’s debate – now it is incumbent on them to commit to the all party debate on 1st December or tell everyone what they are so scared of."

“It was already clear that the Westminster political system is utterly broken and incapable of properly representing Scotland's interests. 

"What is now clear is that the UK broadcasting system is similarly incapable. Indeed the result of the decision to exclude the SNP is to discriminate against Scottish voters and to effectively treat them as second-class citizens.”

He added: "That is, quite simply, a democratic disgrace, and the fact that election law and broadcasting codes allow such gross unfairness is unacceptable.   

“The SNP has long supported calls for decisions on TV debates to be made independently of politicians and broadcasters – and today’s decision makes that even more important.”

Lawyers for the Lib Dems had argued that Brexit is the “dominant” issue of the General Election and that “the voice of Remain has been excluded” by ITV’s failure to include Ms Swinson in the leaders’ debate.

READ MORE: Decision to omit SNP from Sky election debate 'defies democracy' says Nicola Sturgeon

Lawyers for the SNP said the party represents a range of views which would not be represented in a debate between Labour and the Conservatives, including on Brexit and Scottish independence.

ITV lawyers contended its decision was not capable of challenge in the courts and that, in any event, there is no basis for alleging any unlawful conduct on its part.

Sky News has proposed a November 28 date for its debate, while the BBC has confirmed it will host two debates, on November 29 and December 6, in addition to a series of Question Time specials.