The wife of a Texas police officer suspended for having sex in a prostitution sting says it was all part of the job.

Tracy Breiner said her husband was just following orders when he had intercourse with a woman while investigating two spas for reports of prostitution, according to the Beaumont Enterprise.

Officer Keith Breiner maintains that the Beaumont Police Department asked him on April 1 to perform sex acts as part of the undercover investigation. He also says that every time he engaged in sexual activity in the investigation he documented in reports and received no objection from the department, the Beaumont Enterprise reported.

The spas were raided on May 7 and Internal Affairs began investigation into the sting operation about a week later. Breiner and Lt. David Kiker were later suspended without pay indefinitely on July 21 for engaging sexual activity during the investigation, according to the Beaumont Enterprise.

Lt. Curtis Breaux and Sgt. Robert Roberts were both suspended without pay for five days for failing to oversee the investigation properly and failure to notify department heads of the case, the paper reported.

Breiner was in court Tuesday seeking an injunction to prevent the city of Beaumont from suspending him while he disputes his disciplinary action; the city was attempting to stop that injunction, the Beaumont Enterprise reported.

Click here for more from Beaumont Enterprise.