A special aide to British Prime Minister David Cameron, who advised the U.K. government on the installation of online porn filters, has himself been arrested on suspicion of offences relating to child pornography.

British newspapers report that Patrick Rock resigned from his job just before he was arrested last month.

Rock, the 62-year-old deputy head of Number 10’s policy unit since 2011, was also the subject of a complaint about “alleged inappropriate behavior” during his time at 10 Downing Street, a spokesman for the prime minister has revealed.

On Tuesday, Cameron defended his decision to delay an announcement about Rock’s arrest and the other allegation of inappropriate behavior.

“Obviously when I heard these allegations I was profoundly shocked and I remain profoundly shocked today,” Cameron said.

“I don’t think it would be right to pre-emptively brief out a criminal investigation and that’s why we did not do that,” Cameron said. “But as soon as questions were asked, as questions would inevitably be asked, we have given very full and straightforward answers, which is absolutely the right way to answer this. I’ve been clear right along—and I was told about this issue pretty much as soon as it was discovered—and I have been very clear we must handle this in an absolutely correct way and I am satisfied that is what No. 10 Downing Street has done. I have to be careful about what I say about this issue because a criminal investigation is under way. He did play an important role at Downing Street and he’s resigned that position.”

Rock had been involved in the formulation of policy, enshrined in November, in which Google and Microsoft agreed to introduce changes that would prevent searches for child abuse imagery delivering results that could lead to such material.

One “well-placed source” told the Daily Mail that Rock had also been the subject of a sexual harassment complaint from a civil servant working in Downing Street, which is understood to have been passed to Ed Llewellyn, Cameron’s chief of staff.

Rock, who was born Patrick Robert John Rock de Besombes to a family of European aristocrats, failed three times to become a Conservative MP. He has been an advisor to the Conservative party for 30 years and has been close to Cameron since the 1990s when both were special advisers to Michael Howard, a past British Home Secretary. Rock reportedly coined the phrase, “Cows moo, dogs bark, Labour puts up taxes.”

When Labour leader John Smith died in 1994, Rock and Cameron were said to have adjourned to a pub where they, as it turned out, correctly forecast Tony Blair would assume the leadership of the Labour party, leaving the Conservatives “fucked.”

A spokesman declined to answer reporters’ questions about whether Rock’s online porn charge was linked to the inappropriate behavior allegation, what the exact timing of Rock’s resignation was, and how Cameron discovered the allegations.

Questions are also being asked about why Rock resigned on February 12, before police arrested him the next day at his West London home.

On Monday, Downing Street said it was first made aware of “a potential offence relating to child abuse imagery” on February 12. It was immediately referred to the National Crime Agency (Ceop)…Subsequently, we arranged for officers to come into No 10 and have access to all IT systems and offices they considered relevant.”