A corrections officer at a medium-security prison in Minnesota pleaded guilty on Tuesday to exposing his genitals to an inmate on several occasions while on duty, Pioneer Press reported.

"He is very ashamed of his behavior and has suffered from a lot of anxiety and depression issues and is getting help," his attorney, Paul Baertschi, said.

Timothy James Korsmoe, 47, was accused of occasionally entering the inmate's cell when the man’s cellmate was gone and exposing himself. He was charged in December with indecent exposure while confining or restricting a person's freedom, misconduct of a public officer and indecent exposure.

Korsmoe admitted to the allegations against him, including one incident where he masturbated and ejaculated in a bowl in front of the inmate.

The inmate reported Korsmoe to authorities. Korsmoe agreed to provide a DNA sample, which matched the DNA of the semen found in the bowl.

He was placed on paid leave and later fired by the Minnesota Department of Corrections.

-- --

[Hands of a prisoner via Shutterstock]