Lawmakers in Hawaii have agreed to end a strange legal loophole that allowed police officers to have sex with prostitutes. The Associated Press reports that members of the state’s House and Senate are still negotiating the final details of House Bill 1926 but they agree that the strange exemption should end.

Rep. Karl Rhoads, the Democratic chairman of the House Judicial Committee, had originally amended the bill to leave the exemption in place. He did so in the face of a strong lobbying effort by police officials in the state.

Officials argued that the ability to have sex with prostitutes helped undercover officers in the course of their investigations. They also pointed out that the conduct of officers was closely regulated by department policies.  

"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 lawmakers, according to Fox News. "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.”

"All allegations of misconduct are investigated and the appropriate disciplinary action taken," Honolulu police spokeswoman, Michelle Yu, wrote in an email.

"It's a really murky area," Rhoads said at the time he proposed the amendment. ”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.’”

He changed his mind Thursday and asked that the bill be returned to its original language. The bill will now bar police from engaging in sex or sadomasochistic acts with prostitutes.

Honolulu police have also dropped their opposition to the bill.

Members from the House and Senate will reconcile their respective versions of the bill before a vote is cast. It must then be signed by Gov. Neil Abercrombie before it becomes law.

Sources: Associated Press, Fox News