Cahill's plea deal calls for him to serve 14 years overall in state prison. He also will have to register as a sex offender and will be subject to lifetime parole supervision when he's sentenced Sept. 12.

Cahill was arrested in April 2012 as part of 'Operation Watchdog,' a multiagency investigation led by the state police and law enforcement officials. While investigating Cahill's sharing of child porn online, authorities discovered sexually explicit images in his computer that he had taken of a 16-year-old girl.

At the time of the criminal conduct, Cahill lived in Folsom.

On multiple occasions, Cahill touched and groped the victim while she slept, and pulled aside her shorts or pulled up her shirt to take photos of her exposed private areas. He also put her hand on his genitals while she slept.

Authorities also say that starting when the victim was 13 years old, Cahill spied on her and took photos of her through her bedroom window while she was alone.

'Cahill malevolently used his access to the home of an innocent teenage girl to sexually assault her while she was asleep and utterly vulnerable to his depraved conduct,' Hoffman said. 'We have ensured that this child predator will face a lengthy term behind bars, where he can't harm other victims.'