Sir Jeremy Heywood, the cabinet secretary, has defended his decision not to advise David Cameron that Jeremy Hunt be formally investigated over allegations he broke the ministerial code.

The prime minister has been criticised by Labour for failing to launch an inquiry into allegations that Jeremy Hunt broke the rules in his dealings with News Corporation while he was adjudicating over the companies bid to take control of BSkyB.

Appearing before the public administration committee on Thursday morning, Sir Jeremy said he believed it was best that Hunt be quizzed by the Leveson inquiry before any potential separate investigation be launched.

"I felt Lord Justice Leveson would be the right and most rigorous and searching investigation that could be done and if we tried to suggest an alternative was set up we would be ciriised strongly for duplicating or undermining the Leveson inquiry," he said.

"That was my advice to the prime minister, it was good faith advice, you could argue it either way."

"If you've set up an inquiry that is going to question someone under oath with a leading QC in public that is a effective way to get to the bottom of this."

He added: "We just took the view it was better to leave it to the Leveson Inquiry. In the light of that if something comes up on this day of evidence that warrants further investigation or bears on his adherence to the ministerial code then we may have to take some further action at the point."

News Corp's Frederic Michel and Hunt's former special adviser Adam Smith were called to appear following the publication of a dossier of emails describing frequent contacts during the company's attempted takeover of BSkyB.

Sir Jeremy also said he first learnt of the nature of the contact between Adam Smith and Jeremy Hunt at the same time that it became public.

"I was completely unaware as was his permanent secretary," he said. Adding that he did not think anyone in Downing Street was aware either.