Rock was told by his sister that US police were interested in the contents of his laptop. He told the prime minister’s private secretary on 12 February 2014 and resigned the same day.
He was arrested in his west London home in the early hours of 13 February – a “few hours” after Downing Street reported it to police.
Number 10 only confirmed details of his arrest almost three weeks later after being approached by the Daily Mail.
It also emerged at that time that he had been previously accused of “inappropriate behaviour” by a colleague and this incident was investigated by his line manager, Ed Llewellyn, Cameron’s chief of staff, who is also an old friend of Rock’s.
Rock was originally accused of six counts of making indecent images of children and one charge of possessing 56 indecent images of children.
The charges he faced on Tuesday relate to 31 July to 31 August 2013 when Rock was living and working in the US.
Although the girls were not naked, the prosecution argued they were in “deliberately sexual” poses that drew attention to their genital and breast areas.
Prosecutor Tom Forster told the court: “They are scantily clad and/or their legs are often apart and/or they are showing their bottoms to the camera.”
Rock’s defence lawyer, Sasha Wass QC, compared the images with Britney Spears’ video for her 1998 song Hit Me Baby One More Time, which she made when she was 16 and featured her gyrating while dressed in a schoolgirl’s uniform.
She also used the example of Lewis Carroll being “captivated” by young Alice Liddell, the inspiration for his Alice in Wonderland.
Wass said Carroll took pictures of Liddell when she was 10 years old, which could be found in books on sale in shops. She suggested that criminalising Rock would suggest that the same should have happened to Carroll.
In pre-sentencing mitigation she argued that Rock had always accepted that he was “morally wrong” and had undergone a course of treatment with the Lucy Faithfull Foundation child protection charity. Wass said her client had lived an “unblemished life since August 2013 if not before”.
Rock, of Fulham, south-west London, did not give evidence during the trial, which began on Tuesday morning and lasted less than three hours. It featured no witnesses, only submissions from opposing counsel.