“Hawaii Five-O” may not be the only thing that popularized policing in the sunny state.

Cops in Hawaii want to keep a rare state law on the books that allows them to legally have sex with hookers.

Undercover cops in Honolulu claim they need “legal protection” to catch criminals for sex crimes, such as human trafficking — but the whole thing rubs critics the wrong way.

Having sex with prostitutes is unnecessary and can victimize sex workers who have been forced into the trade, advocates said.

Some law enforcement officials agree, noting there’s simply no need to go all the way with hookers.

“I can understand you’re in a drug den, and you have a gun to your head and someone says ‘snort this’ [but] this is so dissimilar from that circumstance on so many levels,” said Derek Marsh, a law enforcement official in Hawaii.

Honolulu police officers are urging the state to keep the exemption in state law. The bill that sparked the debate goes before a Senate committee on Friday.

Authorities claim internal policies and procedures are in place to prevent cops from frequently having sex with prostitutes.