It is illegal for a correctional officer to engage in sexual acts with people in their custody, but most law enforcement officials don’t face the same restriction. State lawmakers are considering legislation that would close that loophole.

Maryland is among 35 states that lack laws prohibiting police from engaging in sexual acts or having sex with those they arrest, according to recent reporting by Buzzfeed. New York’s legislature recently voted to change its law. Del. Brooke Lierman, a Baltimore Democrat, wants to make the same change in Maryland.

Her bill to do that has passed the House.

She told the Senate Judicial Proceedings Committee on Tuesday that she was moved to push for the change after reading reports about women who were raped while in police custody.

“Police officers had sex with them and claimed it was consensual, and the women said, ‘No, it wasn’t,’” she said. “Although the women can charge them with rape, they have to go through a lengthy trial, and it’s their word against the police officers.”

She said no one in police custody is in a position to give consent to sexual activity.

The Justice Department’s 2016 report on the Baltimore Police Department detailed complaints that officers were coercing sex from people they detained.