Hawaii lawmakers are debating a fiercely-criticized law that currently permits undercover police to have sex with prostitutes during investigations.

A new bill that clamps down on prostitution originally eliminated the sex exemption for officers on duty. But after law enforcement officials testified in favor of the exemption, the bill was amended to restore it, the Associated Press reports. The revised bill passed the state House and is set to go before a state Senate committee on Friday.

Police say the provision helps them catch sex workers in the act, but human trafficking experts who are critical of the law point out that the provision is unnecessary and only hurts sex workers—who are often forced into their positions—even more. Some say that women who have left their careers as prostitutes behind report being forced to give sexual favors to policemen who threaten them with arrest.

Critics say it seems impossible for every officer using this exemption to judge every prostitute’s situation—whether she has been forced into that lifestyle, her real age and more—before having intercourse with her. And advocates say the risk police will take advantage of prostitutes outweighs any benefits.

Even without such exemptions in place, police in other states have been accused of abusing sex workers. A former officer is facing charges in Philadelphia for allegedly raping two prostitutes and forcing them to do drugs at gunpoint. A cop in West Sacramento, Calif., was recently found guilty of raping prostitutes. And last year a Massachusetts officer pleaded guilty to threatening prostitutes with arrest unless they had sex with him.

Law enforcement officials say the exemption doesn’t lead to inappropriate behavior.

“All allegations of misconduct are investigated and the appropriate disciplinary action taken,” Michelle Yu, Honolulu police spokeswoman, told the AP.

Laws governing disclosure of police misconduct in Hawaii block the public from seeing whether an officer has ever faced disciplinary action for having sex with a prostitute.

During testimony, law enforcement officials would not reveal how often they use the exemption, claiming that doing so would alert pimps and prostitutes to how far policeman are and are not allowed to go, and compromise future investigations.

“As it is, we are already subject to ‘cop checking’ where prostitution subjects do certain acts or attempt to do certain acts to determine whether the person is an undercover officer,” Major Jerry Inouye of the Honolulu Police Department told local Hawaiian news station KITV.

Democratic state Rep. Karl Rhoads, the committee chairman who amended the proposal to restore the exemption, said that civilians cannot understand the measures necessary in undercover police work. “It’s a really murky area,” Rhoads said, according to the AP. “I was reluctant to interfere in something that they face all the time. If they think it’s necessary to not have it in the statute, this is one area where I did defer to them and say, ‘I hope you’re not having sex with prostitutes.'”

Hawaii’s law appears to be unique. Roger Young, who worked sex crimes for the FBI in Las Vegas for over 20 years, told the AP he didn’t know of “any state or federal law that allows any law enforcement officer undercover to penetrate or do what this law is allowing.”

[AP]

Write to Eliana Dockterman at eliana.dockterman@time.com.