An on-duty Orange County sheriff's investigator found dead with a gunshot wound to the head was about to be arrested on charges of molesting a boy more than 10 years ago, a district attorney spokeswoman said Thursday.

The body of Gerald Stenger, 41, was found about 2 p.m. Wednesday in the driver's seat of his unmarked patrol car in an Aliso Viejo parking structure.

Stenger had been charged Wednesday morning with one count of lewd acts on a child under 14 and one count of continuous sexual abuse with a sentencing enhancement for substantial sexual conduct, said Farrah Emami, spokeswoman for county prosecutors.

There were concerns that Stenger was a suicide risk and his case file was sealed to prevent him from knowing about his pending arrest, Emami said.

He was to have been taken into custody Wednesday afternoon on a no-bail warrant at the Orange County sheriff's offices in Santa Ana.

Stenger was a 21-year veteran who was promoted to the rank of investigator last year, said Jim Amormino, a spokesman for the Sheriff's Department. Stenger had no disciplinary record, he said.

Prosecutors allege that Stenger molested a 12-year-old boy between 1995 and 1997 after meeting him through the Big Brothers Big Sisters program in Orange County.

Emami said prosecutors were continuing to investigate the death. She declined to say whether Stenger knew he was under investigation for molestation or how he may have found out about his pending arrest.

Stenger, of Aliso Viejo, would have faced a maximum of 18 years in prison if convicted on all charges.