The city of Mesa doesn't want ex-Police Chief Ramon Batista to tell anyone why he resigned — and they're paying him nearly $90,000 not to.

A settlement between Mesa and Batista shows he will be paid six months' salary so long as he refuses to say why he left the department.

The agreement requires Batista to say only that he "has chosen to resign and pursue other interests and opportunities and he thanks the city for the opportunity to serve" if asked by reporters why he resigned. He is not allowed to give comment beyond that, and he is not allowed to speak negatively about the city, its officers, or elected officials.

Batista resigned on November 4 after leading the Mesa Police Department for two years. Batista's attempts to reform the department following the high-profile shooting of Daniel Shaver earned the ire of the police union, which initiated a vote of no-confidence against the chief earlier this year.

Batista also reportedly resigned by text message, according to ABC15.

Per the agreement, Batista is allowed to keep his gun, cellphone, and badge.

Batista resigned suddenly after months of turmoil with the Mesa police union. Comments contained within a leaked survey of Mesa Police Association members showed that a number of Mesa police officers were furious with Batista for attempting to reform the troubled department.

But pressure from the union might not be the only reason Batista was forced out.

A retired Mesa police officer said several female Mesa officers filed complaints alleging Batista and other department leaders had treated them unfairly. Phoenix New Times has requested those complaints.

Another retired Mesa detective told AZFamily (3TV/CBS 5) that she was forced out of the department after 21 years.

Vicki Hixson said she was called "emotional" and treated differently by the department's leadership because she was a woman. She filed complaints against management with the city's human resources department in 2017 and filed an Equal Employment Opportunity Commission complaint as well.

Human resources ultimately found that the commander in question, Lee Rankin, had not engaged in workplace discrimination but noted that some said his management style was "abrasive" and "borderline unprofessional."

When Hixson went to Batista with her concerns, she says he denied her request for an internal investigation into the policies she alleged Rankin had violated.

“There are additional females. Some in higher leadership positions than me, who have HR complaints and EEOC complaints not just against Batista, but also Rankin for the same type of behavior,” Hixson told AZFamily.