A former Los Angeles County Sheriff’s Department detective pleaded guilty to child molestation involving a teenager whose sexual assault case he was investigating, authorities said Wednesday.

Neil Kimball is seen in a Nov. 16, 2018, booking photo released by the Los Angeles County Sheriff’s Department.

According to KTLA, Neil David Kimball, 46, of Agoura, pled guilty to a lewd act with a child and unlawful sexual intercourse, the Ventura County District Attorney’s Office said.

The former detective was initially charged with forcible rape against a minor 14 years or older while the victim was tied or bound, as well as witness intimidation by threat of force, the DA said.

While working as a detective with the Special Victims Bureau for sex crimes in 2017, he met with a 15-year-old when she reported being a victim of sexual assault, LA Daily News reported.

“While investigating that case, Kimball befriended the victim and sexually assaulted her,” the DA’s office said in a news release.

Kimball was relieved of duty with pay after he was taken into custody in November 2018, authorities said.

The assault allegedly occurred somewhere in Ventura County between Oct. 1, 2017, and Dec. 31, 2017, the DA’s office said last year.

Kimball — who was working at the time as a detective with the Los Angeles County Sheriff’s Department’s Special Victims Bureau — met the teenager in 2017 when she reported being a victim of sexual assault, and he befriended her, according to the Ventura County District Attorney’s Office.

The crimes occurred in Ventura County in late 2017, Koenig said.

Kimball was arrested last November by the Los Angeles County Sheriff’s Department’s Internal Criminal Investigations Bureau following an internal investigation, authorities said.

He has remained behind bars since then.

Sentencing is scheduled for Aug. 8, according to the District Attorney’s Office.