Mr Justice Saunders said the PM's comments on former spin doctor Andy Coulson nearly wrecked the case as Tories admit he took advice from the Attorney General

A furious judge today piled fresh humiliation on David Cameron for branding Andy Coulson a liar while the crooked former editor’s court case was still ongoing.

Mr Justice Saunders declared he had considered scrapping the eight month-long £100million phone hacking trial over the PM’s decision to speak out before the jury reached all its verdicts on his one-time spin doctor.

And in further blow for under-fire Mr Cameron, Downing Street revealed he had taken legal advice from Attorney General Dominic Grieve over his grovelling apology for hiring Coulson – rushed out after the ex-News of the World chief had been found guilty of intercepting voicemails.

Mr Justice Saunders wrote an urgent letter to No10 demanding an ­explanation from the PM over his comments, that could have influenced jurors still ­considering other charges against him.

In a stinging rebuke, the judge said at the Old Bailey: “He has now told the public and therefore the jury that he was given assurances by Mr Coulson before he employed him which turned out to be untrue. The jury were not aware of that and it is a matter capable of affecting Mr Coulson’s credibility in their eyes.

“We have had an eight month trial, at huge expense, and it doesn’t seem a great deal to ask politicians to hold their comments until we have completed this, for the next 24 hours, if not shorter.

“I don’t know whether it was just done in ignorance or deliberately. What has happened is unsatisfactory so far as justice and the rule of law are concerned.”

Mr Justice Saunders spoke as jurors were discharged for failing to reach a verdict on allegations against dad-of-three Coulson and former News of the World royal reporter Clive Goodman, 56, of paying public officials for phone numbers.

He said: “This was an ­extraordinary situation where the ill-advised and premature ­intervention by the Prime Minister and others to avoid political damage or make political capital is almost impossible for the jury to ignore.

"It strikes at the heart of justice. It is ­astonishing, we say unprecedented, for a Prime Minister to make public comments in trial proceeding.”

And squirming Mr Cameron faced a torrid time in the Commons for hiring Coulson, 46, as his press aide despite repeated warnings about his conduct at the News of the World and for allowing him to slip through the normally strict vetting process.

At a stormy PM’s questions, he failed three times to say if he had been warned by Cabinet Secretary Sir Gus O’Donnell not to take Coulson on.

Labour leader Ed Miliband said: “The truth about this is that the charge against the Prime Minister is not one of ignorance, it is wilful negligence. Today we know that, for four years, the Prime Minister’s hand-picked and closest adviser was a criminal and brought disgrace to Downing Street.”

Labour is to ask Commissioner on Public Appointments Sir David ­Normington to investigate the No10 vetting regime after it was tonight claimed Coulson was not checked properly in a bid to save cash.

There was no apology from No10 despite the rebuke.

Getty

Bad advice: Attorney General Dominic Grieve

It is the second time in six months Mr Cameron has been rapped by a judge for endangering justice. He declared he was a “fan” of Nigella Lawson in the middle of the fraud trial against the TV chef’s PAs.

Coulson is facing up to two years in jail when he is sentenced next week along with former News of the World journalists Greg Miskiw, James ­Weatherup, Neville Thurlbeck, Dan Evans and private detective Glenn Mulcaire who have admitted being involved in hacking.

A decision over a possible retrial on Coulson and Goodman’s outstanding charges will be made on Monday.

The hacking trial will cost the taxpayer £1.7million in legal aid.

BBC’s Panorama last night claimed Mulcaire obtained the new ­identities of crooks on protection schemes, including child killer Mary Bell and James Bulger murderer Robert Thompson.

The sister of murdered Milly Dowler, whose phone was hacked, yesterday made an emotional appeal to the PM to push ahead with press regulation.

Gemma Dowler said: “Having held an inquiry, party leaders should keep their ­promises and ­implement Lord ­Leveson’s proposals.”

Laughter and long sentences: Mr Justice Saunders

The Judge

Mr Justice Saunders is renowned in legal circles for his relaxed attitude and off-the-cuff remarks that bring laughter to the court.

He defused the tension of the proceedings when he announced he had spent Monday night glued to TV bulletins about the case.

Sir John, 65, told the court: “I watched all of Newsnight.”

After a pregnant pause, he brought the house down by adding: “It’s something I wouldn’t normally do.”

But behind the jovial exterior, Oxford-educated Sir John is also renowned for being tough when it comes to passing sentence.

He presided over a series of trials involving politicians’ expenses and jailed MPs David Chaytor, Elliot Morley, Jim Devine and Eric Illsley and Conservative peers Lord Taylor of Warwick and Lord Hanningfield.

He was called to the Bar in 1972 and spent the 80s prosecuting for the Department of Health and Social Security.

Sir John became a full-time judge in 2004 and was knighted three years later.