The remaining case against Andy Coulson ended today after the jury failed to return a verdict, but not before the judge issued a stinging rebuke to the prime minister for nearly causing it to collapse.
Mr Justice Saunders wrote to Downing Street last night complaining that the prime minister's statement about his former director of communications yesterday could have swayed the jury and prejudiced the trial.
"I don't know whether it's been done in ignorance or been done deliberately. I consider that what has happened is unsatisfactory so far as justice and the rule of law are concerned," he said.
The judge had earlier been asked to discharge the jury by Coulson's lawyer, who said Cameron's comments would have prejudiced jurors against his client.
No.10 said the prime minister's comments were about the verdict given in open court, but that has little relevance to contempt of court, which encompasses any comment which could prejudice a jury.
Downing Street insisted that legal advice had been taken before Cameron made the statement, although it could not confirm whether this had been with the attorney general.
Speaking on the BBC, former justice secretary Kenneth Clarke said the prime minister's statement was "unwise".
Mr Justice Saunders formally discharged the jury at around 12.30pm on the ninth day of deliberations on the two remaining charges, which are also faced by News of the World's royal editor Clive Goodman.
"Thank you for trying. We accept you have done as much as you can to reach verdicts, so I am going to discharge you from giving verdicts, so your service is at an end," he said.
Coulson will be sentenced on Friday next week on the phone-hacking charge.
In the Commons, Cameron used the findings of the Leveson inquiry to deflect questions from Ed Miliband on whether he had ignored warnings about Coulson.
"He didn't like the answer because he wanted to prove some cooked-up conspiracy between the Conservatives and News International," Cameron said.
"He cannot manage to do it because the Leveson Inquiry can't find it."
But the prime minister also repeated his apology about having hired Coulson in the first place.
"I take full responsibility for employing Andy Coulson. I did so on the basis of assurances that I received," he said.
"But I always said that if those assurances turned out to be wrong I would apologise fully and frankly to this House of Commons and I do so today from this despatch box. This was the wrong decision."
Miliband asked why Coulson had not received the highest level of security vetting forced on the previous six occupants of the post, but Cameron said it was a civil service decision.
Cameron refused to answer directly whether Gus O'Donnell, then Cabinet secretary, had tried to warn him about Coulson.
While O'Donnell's written testimony to the Leveson Inquiry does not address that point directly, it shows he did not try to raise it himself
"When it came to Andy Coulson, he just didn’t want to know the evidence," Miliband said of the prime minister.
"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.
"We now also know that the prime minister also ignored multiple warnings about him."
News UK, the new name of Murdoch's News International, still faces possible corporate charges, depending on whether the editor or CEO of the company can be considered a "controlling mind".
A Guardian report suggests police want to interview Murdoch over criminal activities in his newspaper empire and have only held off so long due to an agreement with his lawyers that inquiries would wait until the end of criminal proceedings.
Murdoch's son, James, may also be questioned.