Authorities say they need the legal protection to catch lawbreakers in the act. Critics, including human trafficking experts and other police, say it's unnecessary and could further victimize sex workers, many of whom have been forced into the trade.
Police haven't said how often - or even if - they use the provision. And when they asked legislators to preserve it, they made assurances that internal policies and procedures are in place to prevent officers from taking advantage of it.
But expert Derek Marsh says the exemption is "antiquated at best" and that police can easily do without it.
"It doesn't help your case, and at worst you further traumatize someone. And do you think he or she is going to trust a cop again?" asked Marsh, who trains California police in best practices on human trafficking cases and twice has testified to Congress about the issue.
A Hawaii bill cracking down on prostitution (HB 1926) was originally written to scrap the sex exemption for officers on duty. It was amended to restore that protection after police testimony. The revised proposal passed the state House and will go before a Senate committee Friday.
It's not immediately clear whether similar provisions are in place elsewhere as state law or department policy. But advocates were shocked that Hawaii exempts police from its prostitution laws, suggesting it's an invitation for misconduct.
"Police abuse is part of the life of prostitution," said Melissa Farley, the executive director of the San Francisco-based group Prostitution Research and Education. Farley said that in places without such police protections "women who have escaped prostitution" commonly report being coerced into giving police sexual favors to keep from being arrested.
The Hawaii bill aims to ratchet up penalties on johns and pimps. Selling sex would remain a petty misdemeanor.
During recent testimony, Honolulu police said the sex exemption protects investigations and should remain in place.
"The procedures and conduct of the undercover officers are regulated by department rules, which by nature have to be confidential," Honolulu Police Maj. Jerry Inouye told the House Judiciary Committee. "Because if prostitution suspects, pimps and other people are privy to that information, they're going to know exactly how far the undercover officer can and cannot go."
Democratic state Rep. Karl Rhoads, the committee chairman, said police testimony convinced him to amend the proposal.
"It's a really murky area," said Rhoads, who represents a district that includes Honolulu's Chinatown, a longstanding epicenter of street prostitution. "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.'"
Critics say the police perspective is off base. Lauren Hersh, a former prosecuting attorney who runs the global trafficking program of the women's advocacy group Equality Now, said the risk of re-victimizing a sex worker, who may already have been trafficked, should make sex during an investigation off-limits.
"I can understand you're in a drug den, and you have a gun to your head and someone says 'snort this,'" Hersh said, acknowledging the gray areas associated with undercover police work. But the sex exemption in Hawaii is "so dissimilar from that circumstance on so many levels."
There have been instances of police being accused of victimizing sex workers across the nation. In Philadelphia, a former officer is on trial facing charges of raping two prostitutes after forcing them at gunpoint to take narcotics. A former West Sacramento, Calif., officer is awaiting sentencing after being found guilty of raping prostitutes in his police cruiser while on patrol. And last year in Massachusetts, a former police officer pleaded guilty to extorting sex from prostitutes he threatened with arrest.
Rhoads said he knew no reason to suspect Honolulu police are out of line.
"All allegations of misconduct are investigated and the appropriate disciplinary action taken," said Michelle Yu, Honolulu police spokeswoman, in an email.
It's not clear, however, what the punishment would be. The disclosure laws for police misconduct in Hawaii make it impossible to know if an on-duty officer had faced discipline or accusations of having sex with a prostitute.
Officers who investigate prostitution haven't been accused of sexual wrongdoing in recent memory, Yu said. A parole officer in 2011 was fired after being convicted of sexual assault against a prostitute, she said.
Skeptics, such as Roger Young, a retired special agent who for more than 20 years worked sex crimes for the FBI from Las Vegas and has trained vice squads around the country, remain unconvinced.
Young said Thursday, "I don't know of any state or federal law that allows any law enforcement officer undercover to penetrate or do what this law is allowing."