But expert Derek Marsh says the exemption is "antiquated at best" and that police can easily do their jobs 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 was originally written to do away with the sex exemption for officers on duty, but it was amended to restore that protection after police testimony. The revised proposal has passed the state House and will go before a Senate committee Friday.
It's not immediately clear whether there are similar provisions in place elsewhere either at the state law or department policy level. But advocates were shocked that Hawaii provides an exemption to prostitution laws for police, 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 or harassed.
The Hawaii bill aims to ratchet up penalties on johns and pimps while leaving the punishment for selling sex as a petty misdemeanor.
During recent testimony, Honolulu police said the sex exemption protects investigations and should remain in place. They say police aren't abusing their authority by taking advantage of sex workers, and strict internal controls prohibit misconduct.
"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, chairman of the House Judiciary Committee, said Inouye's 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, chairman of the House Judiciary Committee, said he knew of no reason to believe 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.