Ariz. Rev. Stat. § 38-1004
B. If the order of the department head was for a suspension greater than sixteen hours, demotion or dismissal and the court exonerates the officer, the court may award, in whole or in part, the reasonable costs and attorney fees that the law enforcement officer incurred or were incurred on behalf of the law enforcement officer in the court proceedings. The award of attorney fees by the court shall not exceed $15,000. An award of attorney fees does not apply if either of the following applies:
C. If a law enforcement officer of a county, city or town described in section 38-1007 appeals from a decision of a department head in connection with the law enforcement officer's suspension greater than sixteen hours, demotion or dismissal and the county, city or town maintains a merit system or civil service plan for its employees, and the merit system or civil service plan appeals board exonerates the officer, the merit system or civil service plan appeals board may award, in whole or in part, the reasonable costs and attorney fees that the law enforcement officer incurred or were incurred on behalf of the law enforcement officer in connection with the appeal. The amount of the award by the merit system or civil service plan appeals board shall not exceed $10,000. If the department head appeals the decision of the merit system or civil service appeals board, the award of attorney fees shall be stayed pending the conclusion of the appeal. If the officer appeals to court the decision of the merit system or civil service plan appeals board, or of the city or town council or board of supervisors if the city, town or county has no such board, and the court exonerates the officer, the court may award, in whole or in part, the reasonable costs and attorney fees that the law enforcement officer incurred or were incurred on behalf of the law enforcement officer in connection with the appeal. The award of attorney fees by the governing body or court shall not exceed $15,000. An award of attorney fees under this subsection does not apply if either of the following applies: