A retired Salt Lake City police officer is suing the department, saying she was forced out for bringing to light unethical behavior by a Salt Lake County prosecutor.

Hilary Gordon, who worked at the department for two decades, asserts in a federal lawsuit filed Friday that she was retaliated against and wrongly disciplined for recording conversations with a homicide prosecutor who she felt was acting unethically. She later gave the recordings to Salt Lake County District Attorney Sim Gill, who demoted the prosecutor, the lawsuit claims.

The prosecutor in question is not identified in Gordon’s lawsuit, though it does refer to him as male. Gill on Friday refused to share any other details and would not confirm whether the prosecutor was disciplined, saying he did not want to comment on internal affairs or litigation that did not involve his office.

The lawsuit names the city, police department, Mayor Jackie Biskupski, Police Chief Mike Brown and five police supervisors as defendants. In the court filing, Gordon’s attorney, Adam Crayk, says she began recording meetings with the prosecutor and other police officials after witnessing behavior from the prosecutor that was “bizarre, unprofessional, rude and demeaning.” The prosecutor criticized the homicide investigation they were working on, according to the lawsuit, and made disparaging comments about Gill and others in the prosecutor’s office, including Gordon’s wife, who is also an attorney there.

During one meeting, the prosecutor urged investigators to get permission for a wiretap to assist in their homicide investigation.

“Ms. Gordon and others on the squad explained that Gill denied authorization of obtaining a wiretap at an earlier time because they were seeking to gain information by other means,” the lawsuit reads.

But the prosecutor was insistent, according to the lawsuit, and suggested they still seek to wiretap the suspects without anyone else in his office knowing about it. He especially did not want Gill to hear about their efforts, he allegedly told the police investigators, because his boss could not be trusted and would “leak” information to a friend who is a defense attorney.

Gordon felt the prosecutor was pressing them to violate the wiretapping rules, and “she did not want to be involved in an investigation which may have been illegal, but was unequivocally unethical,” the lawsuit reads.

Francisco Kjolseth | The Salt Lake Tribune Salt Lake police detective Hilary Gordon, seen here in a 2015 file photo, reveals a handmade dress as the department seeks the publicÕs assistance in identifying a white female, whose decomposing body was found on September 3, 1986, floating in a canal east of a sewage treatment plant at 1850 North Redwood Road. The State Medical ExaminerÕs Office determined the death to be suspicious.

She says she brought her concerns to her supervisor and advised him she planned to record future meetings.

In later meetings, discussion of possibly wiretapping the suspects without Gill’s knowledge continued, and the prosecutor floated the possibility of seeking assistance from the Utah attorney general’s office or federal prosecutors to get authorization.

Gordon complained about the prosecutor’s behavior to the other detectives and her bosses, according to the lawsuit. But, she says, once it became clear the officers were planning to go along with the wiretap, she decided to take her recordings to the district attorney’s office.

The prosecutor was demoted and disciplined as a result, according to the lawsuit.

But Gordon says she, too, was punished.

Administrators put the detective on administrative leave for nine months beginning in January 2017. A “scathing” disciplinary letter from Brown, the police chief, found that Gordon caused “embarrassment to the police department and damaged its reputation” because she recorded meetings that involved other agencies besides the Salt Lake City Police Department, according to the lawsuit.

Brown found that Gordon violated two of the department’s codes for public criticism of other agencies and conduct unbecoming a police employee. She was allowed to return to work last September but was put on duty as a patrol officer instead of her previous job as a homicide detective.

“[She] was depressed by how her effort to do the right thing had turned out,” the lawsuit reads, “that she felt she had no choice but to retire.”

The lawsuit alleges that Gordon was unfairly treated during the disciplinary process because she is a woman, and noted that investigators asked her probing questions about her relationship with her wife that would not normally be asked of male officers.

The lawsuit also notes that several male officers received more lenient disciplinary actions.

A male officer was on administrative leave for a short time, according to the lawsuit, despite his ex-wife obtaining a protective order against him — an order that typically would prevent him from carrying a firearm, which would make him unable to perform regular police duties.

Another male officer lied about a case, but that officer was never disciplined and was allowed to work “light duty” as the internal affairs investigation played out, according to the lawsuit.

Gordon also made mention of an incident last summer when Salt Lake City officer Jeff Payne arrested a nurse at the University of Utah after she refused to allow the officer to draw blood from an unconscious patient without a warrant. Gordon’s lawsuit asserts Brown knew of the incident and Payne’s initial discipline was simply to be removed from the department’s blood draw program.

It wasn’t until the nurse, Alex Wubbels, released body camera footage of the arrest that Brown took harsher action amid public outcry. The incident was reinvestigated and the chief fired Payne. Brown also investigated and demoted Payne’s supervisor, James Tracy. He went from being a lieutenant to the rank of officer.

Both men are currently appealing the disciplinary action.

Salt Lake City police officials declined to comment on Gordon’s lawsuit, saying they had not yet reviewed the claims.

Gordon retired from the department in November, according to the lawsuit, after several years of “being treated unfairly and disrespectfully” by Salt Lake City police.

She said she was passed over for promotions because of her gender, and her sexual orientation was often joked about among male officers in the homicide squad.

Gordon is seeking an undisclosed amount in damages, including back pay and punitive damages.