Anna Chambers, who has accused two NYPD detectives of raping her while they were on duty.

Congressional lawmakers introduced a bill Thursday to prohibit federal law enforcement officers from having sex with people in custody, aiming to close a legal loophole that has let them avoid sexual assault convictions by claiming sex with detainees was consensual. The proposed legislation would direct additional federal funding to local law enforcement agencies in states that close this loophole.

“Law enforcement members wield incredible power in their ability to detain individuals,” Rep. Jackie Speier, one of the bill’s sponsors, said in a statement. “Our bill ensures that police will act accordingly in their official duties, as befitting their role as officers of the law, and that any such abuse of this power will not be tolerated.”

In a press release about the proposal, Speier, a Democrat from California, and the bill's cosponsor, Barbara Comstock, a Republican from Virginia, noted that they were “spurred to introduce the bill” following a February BuzzFeed News story about Anna Chambers, an 18-year-old woman who reported she was raped by two New York City detectives while detained in their police van. The men, who were fired, claimed the sex was consensual and pleaded not guilty to sexual assault charges. A trial date has not been set.