A former Arkansas police officer, who was fired after he exposed an undercover officer’s sex acts with a prostitute, has filed a lawsuit to get his job back.

A lawsuit filed in Sebastian County Circuit Court on Monday, which was obtained by KFSM, explains that former Fort Smith Police Department Sgt. Don Paul Bales received a photo of an affidavit in April of 2014 which indicated that an undercover officer with the Street Crimes Unit had engaged in misconduct.

According to the affidavit, the undercover officer — who was identified only as “J.B.” — had met a suspected prostitute through the Backpage.com website. He arranged to meet the woman at Season’s Inn motel in Fort Smith, and the two agreed on a rate of $150 an hour for her services.

The affidavit stated that the officer took off his clothes, and he allowed the woman to perform sex acts on him. The undercover officer then arrested the woman on suspicion of misdemeanor prostitution. The affidavit explained that the officer felt that it was necessary to take off his clothes and engage in sex acts “because he believed that such action was necessary to gather the proof needed to convict the person for violating the prostitution statute.”

Bales reported the conduct of the officer to his superiors, and turned over the photo of the affidavit to his lawyer. Following an investigation, Fort Smith Police Department Chief Kevin Lindsey determined that Bales had violated department policy by allowing his lawyer to see the name of the undercover officer on the affidavit.

However, Bales asserted that his communication with his lawyer was covered by attorney-client privilege. Although a copy of the affidavit was eventually published on the attorney’s blog, the identity of the undercover officer was redacted.

In all, the department said that Bales was fired for violating eight rules, including not being truthful, giving false testimony, revealing confidential information, releasing a confidential report and not respecting his superiors.

The department also found that the undercover officer acted in accordance with department policy when he took off his clothes and allowed the woman to perform sex acts on him before he arrested her. In fact, the department accused Bales of revealing police tactics, arguing that most people did not know that officers were allowed to get naked.

Bales’ firing has twice been upheld on appeal by the Fort Smith Civil Service Commission.

(h/t: Reason)