The SNP and the Liberal Democrats have lost a legal challenge against ITV over the broadcaster's exclusion of their party leaders from a TV election debate.

Both parties launched separate actions in the High Court in London over the decision not to include Nicola Sturgeon and Jo Swinson in the debate on Tuesday night.

Boris Johnson and Jeremy Corbyn will go head-to-head in the first televised showpiece of the general election, broadcast live on STV at 8pm.

The SNP said the court decision meant voters in Scotland were being treated as "second-class citizens".

Two leading judges ruled there was "no arguable breach of the broadcasting code" in ITV's decision to exclude the SNP and Lib Dem leaders.

Lord Justice Davis, sitting with Mr Justice Warby, said: "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."

Responding to the decision, the SNP's Ian Blackford said: "The result of the decision to exclude the SNP is to discriminate against Scottish voters and to effectively treat them as second-class citizens.

"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.

"There is not a single seat in Scotland, where the contest is between the Tories and Labour - it is only the SNP that can stop the Tories in Scotland.

"But both the Tories and Labour will be given a leg-up by a system that fails to recognise the multi-party, multi-national nature of the UK."

In a statement, ITV said: "We welcome the court's decision and will continue with our comprehensive election coverage as planned."

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.

Lawyers for the Lib Dems had argued that Brexit is the "dominant" issue of the election and that "the voice of Remain has been excluded" by ITV's failure to include Swinson in the leaders' debate.

The SNP's legal team said the party represents a range of views which would not be given voice 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.