A prison cook admitted to having sex with an inmate at a woman's Hudson Valley jail.

On Tuesday, Garth Trail of Yonkers, the former head cook at the Taconic Correctional Facility in Bedford Hills, employed by NYS Department of Corrections and Community Supervision, pleaded guilty to criminal sexual act, a class E felony.

In May, New York State Police arrested Trail for engaging in a sexual act with an inmate victim on Sept. 27, 2017, in the kitchen area of the facility.

Following the arrest, which was the result of a joint investigation between the Westchester County District Attorney’s Office, DOCCS and the New York State Police, Trail was arraigned in the Town of Bedford and released on his own recognizance.

The Taconic Correctional Facility is a medium security correctional facility in Bedford Hills that houses women only.

Trail and two other prison employees were arrested in May. Trail is the third person to plead guilty, officials say.

Trail is out on bail. He's scheduled to be sentenced in February.