Downing Street has been forced to distance itself from claims Scottish judges were “politically biased” following the ruling that the suspension of Parliament was unlawful.

The Sun’s political editor Tom Newton Dunn quoted “sources in No 10” as saying the activists who brought the case in the Court of Session in Edinburgh “choose the Scottish courts for a reason”.

The comments brought an angry reaction, with claims ministers were seeking to undermine the independence of the judiciary.

In response, the Prime Minister’s official spokesman said: “We absolutely respect the independence of the judiciary.

“I have spoken emphatically for the Prime Minister and for No 10.”

The statement, to reporters at Westminster, came after Justice Secretary Robert Buckland made clear his unhappiness at the reported comments.

“Our judges are renowned around the world for their excellence and impartiality and I have total confidence in their independence in every case,” he said.

His predecessor David Gauke – one of 21 MPs to have the Tory whip withdrawn after rebelling over Brexit – said the remarks were “neither responsible nor acceptable”.

“Criticism of this type from within Government undermines the independence of the judiciary and, therefore, the rule of law,” he tweeted.

SNP MP Tommy Sheppard said the Prime Minister should apologise for the comments.

“The buck stops with Boris Johnson,” he said.

“It is dictatorial and dangerous for the Prime Minister or his office to be questioning the integrity and independence of the Scottish courts, just because he doesn’t like what they’ve ruled. He should apologise immediately.”

The Government has said it will lodge an appeal against the ruling with the Supreme Court.