A jury said that a police officer who was accused of raping a drunk gay man held in protective custody was not guilty of rape.

The officer was instead found guilty of indecent assault and battery.

Former Salem Police officer Brian Butler, 57, who admitted to having sex with the victim, said that the sex that occurred on Halloween two years ago was consensual.

The victim, a 28-year-old gay man from Ohio, was in Salem, Massachusetts, for Halloween. He got drunk and flooded his hotel room by leaving the shower on, and was taken into protective custody in the middle of the night when someone called the police. He was not arrested.

Since his clothing was soaked, he had taken off his clothes at the hotel before he was taken in. He was naked in his cell except for a blanket, and the next morning Butler let him out so he could call his sister. Surveillance video showed Butler touching the victim underneath the blanket.

Butler “grabbed my [penis] and started massaging it and whispered in my ear ‘Is this OK?’ I said ‘yes’ because I was terrified,” the victim, who has not been named in the media, testified. “I thought if I didn’t do what he said, I wasn’t going to get out.”

He said that he was afraid of being arrested “on some trumped up charges, or kept in jail for no reason.”

Surveillance video then showed them going to a closet, where the victim said he was sexually assaulted.

Butler’s attorney Kevin Mitchell insisted that what happened was consensual.

“Maybe it should be a crime,” Mitchell told jurors. “Maybe you should write to your legislator. Call it the ‘Butler Bill.’ You’re not being asked to like him. What he did was wrong, but it’s not a rape.”

Prosecutor Kate MacDougall argued that the victim didn’t really consent because Butler “chose to walk into a series of concrete rooms where, for that moment, he was king. He chose the guy who wasn’t under arrest, who didn’t have to be at court. He chose the guy he would have full custody of until he decided not to.”

While the defense said that the victim was sober enough to consent, MacDougall said that if the victim was sober, then he should have been released since he was only being held in protective custody because he was drunk.

The defense tried to present evidence that the victim was gay and question witnesses about the victim’s sexual history, which the judge blocked under Massachusetts’s rape shield law.

Butler faces up to five years in prison for indecent assault and battery, which is the “intentional and unjustified touching of a private area.”

The jury deliberated for three hours before returning with a verdict. During that time, they asked the judge for a definition of consent.

At the time of the sexual assault, Butler was married to Salem’s Chief of Police, Mary Butler. They have since filed for divorce.