A former prison sergeant in Minnesota was sentenced to be an inmate in 120 days in jail and seven years of probation after he was discovered exchanging a McDonald's meal for sex from a female prisoner he was transporting.

Dakota County District Judge Tim Wermager on Wednesday had passed sentence to Randy Beehler, 54.

Beehler had pleaded guilty in March to fourth-degree criminal conduct with a detainee, according to a Law and Crime report.

Judge Wermager had also ordered Beehler to participate in a sex offender treatment program aside from jail time and probation.

Beehler would also be registered as a predatory sex offender.

READ MORE: El Chapo's Wife Emma Coronel Aispuro to Plead Guilty to Helping Him Run Notorious Sinaloa Cartel

McDonald's In Exchange For Sexual Favors

Beehler had reportedly stopped at an abandoned business after getting food in Cannon Falls at a McDonald's.

He then uncuffed the victim and brought her up to the front seat, and they drove through Dakota County. He reportedly unzipped his pants and had the victim perform oral sex on him.

The victim reported the incident the same day, according to a CBS Local report.

Beehler initially denied all allegations when an investigator questioned him. He also denied any inappropriate contact.

However, he eventually admitted to getting the food with the victim and had the victim performed sexual acts on him.

The victim told authorities that they stopped at a park to clean up and threw away napkins in a trash can.

The complaint states that the officers went to the park and located the napkins in the trash can like the victim said, according to KSTP report.

The officers then collected the said napkins for scientific testing.

Beehler denied the victim's statement that he also "digitally penetrated" her.

Dakota County Attorney Kathy Keena said that she is pleased that Beehler is being held accountable for his actions.

Keena added that Beehler was entrusted with the victim's care and protection while transporting her. She noted that the suspect had violated his position of authority by engaging in sexual acts with a woman who was in a very vulnerable situation.

Abuse in Women's Prison

In New Jersey, Gov. Phil Murphy had plans to close the state's only women's prison, which is Edna Mahan Correctional Facility, for reported violent attacks on female inmates for several years.

State Attorney General Gurbir S. Grewal had charged former DOC officers Luis Garcia, Amir Bethea, and Anthony Valvano for alleged abuse.

Their charges include aggravated assault, official misconduct, and tampering with public records and information, according to an Amsterdam News report.

Murphy said that he ordered an independent investigation to determine what happened after learning about the violent attacks that allegedly took place on January 11.

The governor added that the individuals in state custody deserve to be treated with dignity and respect. He noted that the officers involved in the incident abused their power.

U.S. Attorney Craig Carpenito said that sexual abuse cannot be tolerated in any setting, including prisons and jails.

READ NEXT: Killer Dad Chris Watts Spends 36th Birthday Alone in Prison: 'He's an Outcast,' Says Source

WATCH: Beyond Punishment: Abuse and neglect in nation's biggest women's prison - from Miami Herald