A police officer was arrested on a charge of misconduct after allegedly having sex with a prostitute while he was on duty, according to police in New Jersey.

Greenwich Township police said that they have arrested 42-year-old William H. Dick III, after being accused of calling the prostitute and trying to convince her to recant her story.

Dick has been charged with misconduct and witness tampering.

Dick was released from custody after posting $35,000 bail.

According to the police investigation, one Friday evening, Dick, who was on duty, had sex with the prostitute in exchange for money.

After they were done, the prostitute called the police to report the incident. When Dick learned of the prostitute's complaint to the police, he called her and tried to convince her to recant her story.

Dick worked for the police for the past 13 years. He was suspended without pay pending the outcome of the case.