An Ohio morgue attendant admitted to having sex with at least 100 corpses while on the job, federal officials said in court Friday.

Kenneth Douglas, a 60-year-old Hamilton, Ohio resident, said he had sex with the corpses between 1976 and 1992 while working the night shift, WCPO reported.

In his deposition as part of a lawsuit against Hamilton County, Douglas admitted to being drunk and on drugs while committing the crimes.

“I would just get on top of them and pull my pants down,” Hamilton said in a deposition to the 6th US Circuit Court of Appeals, according to WPTV.

"If I hadn't had anything to drink when I went to work, it wouldn't happen," Douglas added. "I would do crack and go in and drink and go in."

Douglas was convicted of gross corpse abuse in 2008 after admitting to having sex with the corpse of a 19-year-old woman who had been murdered and nearly decapitated in 1991.

In 2012, Douglas admitted to having sex with two more corpses. In the case of another murder victim, Douglas said he had sex with her corpse the day she was killed.

Now, Douglas has admitted to having sex with up to 100 corpses, many times while the bodies were being stored for autopsies.

His crimes were first revealed when DNA connected him to semen found in one of his victims in 2008. The woman's killer, David Steffan, admitted killing the woman but denied raping her, according to the NY Daily News.

The county is now being sued by the families of three of the victims, who said the morgue director failed "recklessly and wantonly" to supervise Douglas.

The families' case is supported by the wife of Douglas, who said she had tried to alert the morgue to her husband's actions, but was told to stop calling.

More from WCPO:

Douglas' wife testified in a deposition that he reeked of sex when she picked him up from work. She said she called the coroner's office and reported him, but the morgue supervisor told her to stop calling. "He said, 'Whatever happens on county time and on county property is county business,'" said Douglas' wife.