Hawaii legislators in both chambers agreed that police should no longer have legal permission to have sex with prostitutes in the course of their duties.

Hawaii was the only US state that permitted officers to engage in such activity with sex workers during investigations.

House and Senate members are still thrashing out the details of House Bill 1926, which they will subsequently send to the governor. But they agree that the crime bill should revoke an unusual exemption that permits police in Hawaii to have sex with prostitutes in the course of their duties.

Originally, the bill cracking down on prostitution would have deleted the exemption, but last month, after lobbying efforts by Hawaii police officers, the exemption was made.

Honolulu police said vice officers needed the legal protection for their undercover work to prevent pimps and prostitutes from knowing the limits of police methods. They also added that the provision is needed to protect the integrity of investigations.

The bill was amended as it passed out of the chamber's Judicial Committee. Rep. Karl Rhoads, the Democratic chairman of the Judicial Committee, clarified that he corrected the bill to allow the exclusion because of the police testimony. However, experts and sex worker advocates say that this permission is no help and, in fact, even makes things worse.

"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?" Derek Marsh, an expert on human trafficking who trains police officers how to handle extraordinary cases, earlier told AP.

Rhoads said now he wants to remove the prostitution exemption for police, and limit police from engaging in sex or sadomasochistic acts with prostitutes.

The House and Senate members are settling on a final version, but once they vote on it, Gov. Neil Abercrombie must sign it into official law.