WASHINGTON (NEXSTAR) — Lawmakers on Capitol Hill want to close a loophole that allows law enforcement officers avoid criminal charges if they claim sex with someone they arrested was consensual.

Sens. Joni Ernst, R-Iowa, and Cory Booker, D-New Jersey, are working together on the bill. They say current rules give officers too much power and leave victims voiceless.

“We need to protect those that are in our custody,” Ernst said.

If the bill becomes law, sex involving any federal law enforcement member and an arrestee would be a crime punishable by up to 15 years in prison.

More than 30 states have laws on the books that allow sex between officers and people they have arrested. Ernst and Booker’s bill would offer those states more federal money if they make it a crime.

“When they realize it can affect their funding, I think it’ll get their attention,” Patrick O’Carroll, the executive director of the Federal Law Enforcement Officers Association, said.

He said he’s on board with changing the law and that states should fall in line.

“When you make an arrest, you take away their freedom and that person’s safety is your responsibility and for you take advantage of that is abhorrent,” he said.

He said agents are trained to understand that and the line is rarely crossed.

But how often it actually happens is unclear. The federal Bureau of Justice Statistics doesn’t collect data on sexual misconduct by officers. The bill would also change that.

The bill has bipartisan support in the Senate, but no votes have been scheduled.