David Cameron's judgment over phone hacking was under scrutiny for a second day as Labour suggested he had wilfully ignored repeated high-level warnings about Andy Coulson's appointment to Downing Street in 2010.

Criticism of the prime minister was compounded when a judge rebuked Cameron for potentially prejudicing the final phase of the phone-hacking trial by prematurely branding Coulson a liar before all the verdicts on his former spin doctor – found guilty on Tuesday of conspiracy to hack phones – had been reached.

Labour suggested that Gus O'Donnell, the cabinet secretary in 2010, had been among those concerned at Coulson's appointment – a charge No 10 would only respond to by pointing to evidence given by Lord O'Donnell to the Leveson inquiry that he had not been involved in the appointment of Coulson.

Rupert Murdoch is flying in to London to oversee News UK's response to the end of the hacking trial, which saw his former chief executive Rebekah Brooks cleared but Coulson, his former News of the World editor, found guilty of hacking charges.

It is the first time Murdoch has been to the UK this year and he is expected to take a tour of his headquarters to calm nerves over pending trials of Sun staff.

It is not known whether he had any meetings planned with Brooks, who he declared was his priority at the height of the phone-hacking scandal three years ago. Sources have confirmed there is no interview arranged with Scotland Yard.

At prime minister's questions, Ed Miliband accused Cameron of wilful negligence and said the prime minister would "always be remembered as the first ever occupant of his office who brought a criminal into the heart of Downing Street".

Cameron again apologised for appointing Coulson saying it was the wrong decision and he repeatedly defended himself by saying the Leveson inquiry into press behaviour "looked into all of these questions about the warnings I was given and the response I gave, and he made no criticism of my conduct". Cameron said Miliband "cannot bear the fact that an eight-month inquiry which he hoped would pin the blame on me found that I had behaved correctly throughout".

Labour pointed out that it was unlikely in the extreme that the inquiry would have criticised Cameron's appointment of Coulson because in November 2012, when Cameron gave evidence, Coulson had been charged but not been found guilty in any court of law of a conspiracy to hack phones.

Lord Justice Leveson also pointed out in his report that he could not comment on the value of the assurances that Cameron had received from Coulson about his involvement in phone hacking since that would require him to pass judgment ahead of criminal and civil proceedings. In the report that was wielded by the prime minister at the dispatch box, Leveson wrote "that is a matter for another time".

In a bid to construct a picture of a Conservative leader who had deliberately looked away from a mountain of evidence, Miliband suggested Cameron had ignored the revelation of widespread phone hacking at News International on the front page of the Guardian in July 2009, and rejected a call from Nick Clegg not to appoint Coulson in May 2010. The Labour leader also accused Cameron of taking no notice of a front-page report in the New York Times in September 2010 in which a former editor was quoted as saying "I've been to dozens if not hundreds of meetings with Andy" at which the subject of phone-hacking came up.

Miliband told the Commons: "The truth about this is that the charge against the prime minister is not one of ignorance; it is wilful negligence. At the heart of this scandal are thousands of innocent victims of phone hacking that he did not stand up for."

The eight-month hacking trial finally ended on Wednesday after the jury was discharged when it was unable to reach a verdict on the two outstanding charges against Coulson and the former News of the World royal editor, Clive Goodman, that they caused misconduct in public office by making payments to police protection officers.

Coulson's barrister had argued that Cameron's apology on Tuesday, immediately after Coulson was found guilty on the phone-hacking conspiracy charge, prejudiced the trial and meant the remaining charges should be thrown out. While the prime minister escaped the humiliation of seeing the trial collapse, the judge, Mr Justice Saunders, said: "I consider that what has happened is unsatisfactory so far as justice and the rule of law are concerned."

Cameron took legal advice from the government's senior law officer, attorney general Dominic Grieve, before making his "full and frank" apology. Downing Street privately argued that as soon as the majority of the verdicts were made public on Tuesday it was necessary to make a statement. But the former Lord Chancellor Kenneth Clarke said he had been unwise.

The Crown Prosecution Service has until next Monday to decide whether to go for a retrial on the two counts against Coulson and Goodman. So far the costs have amounted to £32.7m for the taxpayer, with legal bills run up by Rebekah Brooks, who was cleared of hacking and other charges, and the other privately funded defendants – most of whose bills were paid by Rupert Murdoch's News Corporation – estimated at a further £60m.

Coulson will be sentenced on Friday next week, following mitigation hearings scheduled for Monday and Tuesday along with three other News of the World executives who pleaded guilty – Neville Thurlbeck, Greg Miskiw and James Weatherup – and the paper's specialist hackers, Glenn Mulcaire and Dan Evans.

The raw emotion aroused by the phone hacking was also underlined when the sister of the murdered Milly Dowler issued a direct appeal to Cameron to stick by his promises to victims that he would deliver real and permanent change to press regulation in the aftermath of the Leveson inquiry.

Discussions about the future of press self-regulation are at an impasse, with most of the industry insisting on being part of a non Leveson compliant industry regulator, IPSO, and there is little sign yet that the new culture secretary Sajid Javid wishes to broker a deal

Arguably if O'Donnell had serious concerns about the appointment he would have taken the chance to reveal them in his own evidence to the Leveson inquiry. On Wednesday, O'Donnell refused to comment.

News UK, formerly News International, could face action for contempt of court over allegations that the News of the World penetrated Scotland Yard's witness protection programme. Detectives working for the Operation Weeting inquiry into phone hacking are understood to have found evidence that Mulcaire targeted the voicemail messages of officers who were working on the programme.

Miliband also raised again the issue of why Coulson was not given the highest security clearance – something that would have required him to be deep vetted, including a months long investigation into his private life. During the phone-hacking trial, it emerged that Coulson had a lengthy on-off affair with Brooks at the Old Bailey on Tuesday. Cameron insisted that the initial decision not to seek the highest-level clearance for Coulson – in contrast to the six previous press secretaries – was made by the then Downing Street permanent secretary, Sir Jeremy Heywood. It has been previously reported that Sir Jeremy made the decision on the basis of cost saving, but Labour is to ask the commissioner for public appointments, Sir David Normington, to look into the procedure.

Miliband also pressed Cameron to say whether at any time O'Donnell had raised concerns about hiring Coulson. The Labour leader appeared to be acting on the basis of inside information, and Downing Street chose only to point to evidence by O'Donnell to the Leveson inquiry in which the peer simply said he played no role in the appointment of Coulson.