
260 P.3d 1098 (2011)
TOM MULCAIRE CONTRACTING, LLC, an Arizona limited liability company, Plaintiff/Appellee,
v.
CITY OF COTTONWOOD, a Governmental entity; Diane Joens, Mayor of the City of Cottonwood; Karen Pfeifer, Vice-Mayor of the City of Cottonwood; Duane Kirby, City Council Person; Linda Norman, City Council Person; Terence Pratt, City Council Person, Defendants/Appellants.
No. 1 CA-CV 10-0622.
Court of Appeals of Arizona, Division 1, Department B.
July 26, 2011.
*1099 Dennis P. Bayless, PLLC By Dennis P. Bayless, Cottonwood, Attorneys for Plaintiff/Appellee.
Murphy, Schmitt, Hathaway & Wilson, P.L.L.C. By Milton W. Hathaway, Jr. and Andrew J. Becke, Prescott, Attorneys for Defendants/Appellants.

OPINION
NORRIS, Judge.
¶ 1 Defendants/Appellants City of Cottonwood and certain elected officials (collectively, the "City") appeal from a judgment awarding Tom Mulcaire Contracting, LLC, fees under Arizona Revised Statutes ("A.R.S.") section 12-2030 (2003), a statute that requires a court to award attorneys' fees to a prevailing party in a mandamus action. The issue presented in this appeal is whether a party is entitled to fees under this statute if it does not obtain an order compelling performance of a duty or other such relief. We agree with the City that, in general, a party must obtain such relief to be entitled to a fee award under § 12-2030. Based on equitable principles and the unique circumstances presented here, however, we hold the superior court did not abuse its discretion in awarding fees to Mulcaire under this statute even though Mulcaire did not obtain such relief because the City took steps to moot Mulcaire's claim. Thus, we affirm the judgment.

FACTS AND PROCEDURAL BACKGROUND
¶ 2 In February 2009, pursuant to public notice, the City solicited requests for proposals for construction work. On May 5, 2009, after evaluating the submitted bids based on enumerated selection criteria, the City awarded the contract to Tiffany Construction Company ("Tiffany contract"). Mulcaire protested the award and, on July 1, 2009, sued the City and asked the superior court to enter a writ of mandamus directing the City to rebid the Tiffany contract pursuant to A.R.S. § 34-603 (Supp.2009). Mulcaire also requested a judgment of attorneys' fees and costs.
¶ 3 Approximately two months later, the City terminated the Tiffany contract because, as it explained in a letter to Tiffany, it was "in the City's best interests to begin self-performing" the work. A few weeks later, the City moved to dismiss Mulcaire's complaint or, alternatively, for summary judgment, asserting, as relevant here, the issues raised had become moot because the City had decided to self-perform the work. In response, Mulcaire asserted the City's "voluntary termination of the Tiffany contract does not automatically moot" the relief requested because the City's actions would likely recur. After oral argument, the superior court denied the City's motion.
¶ 4 The superior court held an evidentiary hearing on the merits of the case and allowed the parties to submit written closing briefs, in which they reasserted their respective positions on mootness. Subsequently, the court ruled it could determine whether the City had violated A.R.S. §§ 34-601 to -613 (Supp. 2009) because the evidence demonstrated the City had terminated the Tiffany contract intentionally to moot the case and "prevent the current litigation."[1] The court found the City had awarded the Tiffany contract in violation of A.R.S. § 34-603 and Mulcaire "would have been entitled to the relief requested in the complaint had the City not already cancel[ ]ed" the Tiffany contract. "[F]inding no just reason for delay," the *1100 court entered its ruling as a judgment in favor of Mulcaire ("merits judgment").[2]
¶ 5 After entry of the merits judgment, Mulcaire moved for an award of attorneys' fees under A.R.S. § 12-2030 as the prevailing party in an application for a writ of mandamus. Over the City's objection, in a signed "Judgment of Attorney's Fees," the superior court granted Mulcaire a percentage of its requested fees ("fee judgment"). We have jurisdiction over the City's appeal of the fee judgment pursuant to A.R.S. § 12-2101(B) (2003).

DISCUSSION
¶ 6 The narrow issue presented in this appeal is whether Mulcaire can obtain fees under A.R.S. § 12-2030 even though it did not obtain an order compelling the City to perform a duty. As we explain below, we hold, based on the unique circumstances of this case and equitable principles, the superior court did not abuse its discretion in awarding fees to Mulcaire under this statute.
¶ 7 Determining whether this statute applies is an issue of law we review de novo. John C. Lincoln Hosp. & Health Corp. v. Maricopa Cnty., 208 Ariz. 532, 545, ¶ 45, 96 P.3d 530, 543 (App.2004). Subsection 12-2030(A) provides an award of fees to the prevailing party in a mandamus action against the state or any political subdivision of the state:
A court shall award fees and other expenses to any party other than this state or any political subdivision of this state which prevails by an adjudication on the merits in a civil action brought by the party against the state, any political subdivision of this state or an intervenor to compel a state officer or any officer of any political subdivision of this state to perform an act imposed by law as a duty on the officer.
Thus, to qualify for attorneys' fees under § 12-2030(A), a party must establish it "(1) prevailed [by an adjudication] on the merits (2) in a civil action (3) [brought by the party] against the State or a political subdivision of the State (4) to compel a State officer or any officer of any political subdivision to perform a duty imposed by law." Bilke v. State, 221 Ariz. 60, 62, ¶ 7, 209 P.3d 1056, 1058 (App. 2009). Here, the second, third, and fourth elements are incontrovertibly satisfiedMulcaire filed a civil action against the City to compel it to rebid the Tiffany contract pursuant to the applicable Arizona Revised Statutes. Accordingly, only the first elementwhether Mulcaire prevailedis at issue.
¶ 8 In our view, the first element prevailing by an adjudication on the merits has two plausible interpretations: (1) as the City argues, a party must obtain an order compelling an officer of a state or political subdivision of the state to perform a duty, or (2) as Mulcaire argues, a party need only "prevail[ ] by an adjudication on the merits" in an action brought to compel an officer to perform that duty even if the court did not order that officer to perform a duty. Accordingly, we must apply principles of statutory construction and "give effect to the legislative intent" by reading the statute as a whole and considering "the context of the statute, the language used, the subject matter, its historical background, its effects and consequences, and its spirit and purpose." Wyatt v. Wehmueller, 167 Ariz. 281, 284, 806 P.2d 870, 873 (1991).
¶ 9 Reading A.R.S. § 12-2030(A) in context supports the first interpretation. "Section 12-2030 is contained within an article pertaining to the extraordinary legal remedy of mandamus." Bilke, 221 Ariz. at 62, ¶ 6, 209 P.3d at 1058. Mandamus relief is "based upon the premises that the petitioner has a clear right to the relief sought, that the respondent had a legal duty to do the thing which the petitioner seeks to compel and that there is an absence of another adequate remedy." Sines v. Holden, 89 Ariz. 207, 209, 360 P.2d 218, 219 (1961); see A.R.S. § 12-2021 (2003). Section 12-2021 refers to the "issuance" *1101 of the writ of mandamus, suggesting that to prevail in an action for mandamus relief, one must obtain a writ.
¶ 10 The legislative committee minutes for A.R.S. § 12-2030, which reflect the statute's background and purpose, likewise support the first interpretation. According to the minutes of the House of Representatives Committee on Judiciary, a representative from the Legislative Council[3] testified that, under the bill, "fees and other expenses would be awarded to anyone who wins a civil judgment that would force a state or county employee to perform an act imposed by law so as to allow for the recovery of costs to persons suing officials who do not perform their designated duties." Minutes of Meeting Before the H. Comm. on Judiciary on Feb. 8, 1982, 35th Leg., 2d Reg. Sess. 2 (Ariz. 1982) (statement of Dennis Kavanaugh, Legis. Council, H. Comm. on Judiciary) (emphasis added). Other individuals testified "there is a problem getting elected officials to obey the law" and "this bill would make county government more responsible." Id. (statements of Gus Childress and Ann Kennedy). Moreover, the minutes of the Senate Committee on Judiciary reflect Representative English, a proponent of the proposed legislation from the House, testified the legislation "provides for recovery of costs incurred when a citizen finds it necessary to sue the state or county to require that a state or county officer perform the duty for which they [sic] were elected or appointed." Minutes of Meeting Before the S. Comm. on Judiciary on Mar. 15, 1982, 35th Leg., 2d Reg. Sess. 2 (Ariz. 1982) (statement of Rep. Bill English). These statements reflect that for a party to prevail under § 12-2030 in the normal course, it must obtain a judgment forcing an officer to perform his or her duty.
¶ 11 This interpretation is also consistent with Arizona's general rule regarding attorneys' fees. Under the American rule, which Arizona has adopted, unless a statute or contract provides otherwise, each party bears its own attorneys' fees regardless of who prevails. Marcus v. Fox, 150 Ariz. 333, 334, 723 P.2d 682, 683 (1986); State v. Boykin, 112 Ariz. 109, 113, 538 P.2d 383, 387 (1975). In derogation of the common-law rule regarding fees, the legislature has established certain fee-shifting statutes "to provide `the traditionally effective remedy' to those who enforce laws that `depend heavily on private enforcement.'" Comment, Equitable Attorney's Fees to Public Interest Litigants in Arizona, 1984 Ariz. St. L.J. 539, 543 (footnotes omitted). Thus, to prevail under such statutes, generally, a party must actually enforce that law through court action. This supports the first interpretationto prevail, a party must obtain an order enforcing the law and compelling an officer to perform his or her duty.
¶12 Accordingly, the context, background, and purpose of the statute support the first view that a party must obtain mandamus-type relief to prevail. Therefore, for a party to prevail in a normal case under § 12-2030(A), it must obtain an order from the court compelling "a state officer or any officer of any political subdivision of this state to perform an act imposed by law as a duty on the officer."
¶ 13 Our construction of A.R.S. § 12-2030 does not mean, however, we must reverse the fee judgment. As part of the merits judgment, the superior court found "the City's decision to terminate [the Tiffany contract] was an intentional attempt to moot the case" and stated it would have awarded Mulcaire relief but for the City's actions to moot Mulcaire's claim. In making these findings, the court relied on Arizona case law that holds, in general, a party "cannot by its own voluntary conduct `moot' a case and deprive a court of jurisdiction." Pointe Resorts, Inc. v. Culbertson, 158 Ariz. 137, 141, 761 P.2d 1041, 1045 (1988); Ball v. City of Chandler Improvement Dist. No. 48, 150 Ariz. 559, 562, 724 P.2d 1228, 1231 (App.1986). Relying on that principle, the superior court exercised its discretion and entered judgment in favor of Mulcaire. The court then awarded Mulcaire attorneys' fees pursuant to § 12-2030, stating it was a party "other than the state *1102 or political subdivision, which prevailed by an adjudication on the merits in a civil action brought by that party against a political subdivision of the state."
¶14 As we explained above, see supra ¶ 9, A.R.S. § 12-2030 is tied to mandamus relief. Bilke, 221 Ariz. at 62, ¶ 6, 209 P.3d at 1058. More than 50 years ago, our supreme court recognized the remedy of mandamus is subject to equitable principles. Sines, 89 Ariz. at 209, 360 P.2d at 220; see also Daystar Invs., L.L.C. v. Maricopa Cnty. Treasurer, 207 Ariz. 569, 574, ¶ 21, 88 P.3d 1181, 1186 (App.2004). Under the equitable principle that equity will not permit a wrong to be without a remedy, the City was not entitled to deprive Mulcaire of the remedy of attorneys' fees by mooting the case.
Equity is reluctant to permit a wrong to be suffered without remedy. It seeks to do justice and is not bound by strict common law rules or the absence of precedents. It looks to the substance rather than the form. It will not sanction an unconscionable result merely because it may have been brought about by means which simulate legality. And once rightfully possessed of a case it will not relinquish it short of doing complete justice.
Sanders v. Folsom, 104 Ariz. 283, 289, 451 P.2d 612, 618 (1969) (quoting Merrick v. Stephens, 337 S.W.2d 713, 719 (Mo.Ct.App. 1960)).
¶ 15 This equitable principle is especially applicable here because by the time the City mooted Mulcaire's claim, Mulcaire had already incurred attorneys' fees challenging the City's compliance with bidding procedures. Furthermore, as the court stated in the merits judgment, Mulcaire would have been successful in obtaining mandamus relief if the City had not taken steps to moot Mulcaire's claim. Allowing the City to avoid A.R.S. § 12-2030 under the circumstances presented here would undercut the legislature's purpose in enacting it. See supra ¶¶ 10-11. Therefore, although generally a party must obtain mandamus-type relief to prevail under § 12-2030, based on the unique circumstances of this case and equitable principles, the superior court did not abuse its discretion in awarding Mulcaire attorneys' fees under the statute because Mulcaire would have obtained mandamus relief but for the City's actions to moot the case. See Loiselle v. Cosas Mgmt. Grp., LLC, 224 Ariz. 207, 210, ¶ 8, 228 P.3d 943, 946 (App.2010) ("Fashioning an equitable remedy is within the trial court's discretion, and it will not be disturbed on appeal absent an abuse thereof."); see also Richardson v. City of Rutland, 164 Vt. 422, 671 A.2d 1245, 1249 (1995) ("Courts have `a wide range of discretion' to mold equitable decrees to the circumstances of the case before them." (quoting United States v. Crescent Amusement Co., 323 U.S. 173, 185, 65 S.Ct. 254, 260, 89 L.Ed. 160 (1944))).[4]

CONCLUSION
¶ 16 For the foregoing reasons, we affirm the superior court's award of attorneys' fees to Mulcaire. We also award Mulcaire its reasonable attorneys' fees and costs on appeal, A.R.S. § 12-2030(B), subject to its compliance with Arizona Rule of Civil Appellate Procedure 21.
CONCURRING: PETER B. SWANN, Presiding Judge, and DANIEL A. BARKER, Judge.
NOTES
[1]  At the hearing, the City Manager testified why the City canceled the Tiffany contract:

Q. Why was [the Tiffany contract] cancel[ ]ed?
A. After the process was contested, [the City's utility director] approached me and said, you know, it's been four or five years since we took over the water company. I've had a chance to get my staff up to speed. He goes, II think we can take this over and we may be able to do it even cheaper.
So it was a matter of timing, but I think it was also a concern over being challenged again. And these processes are very time consuming. And so it just all came together in terms of, we have the staff, we have the competent staff to do it. We needed to buy a little bit of equipment to make it happen. And it just made sense to take it in-house andand rather than doing it on a contract basis.
Q. Part of the reason was to try to avoid having to be here today?
A. That was part of the reason.
[2]  The City did not take the required steps to appeal the merits judgment. Accordingly, the merits judgment is not before us, and therefore we express no opinion regarding Mulcaire's bid protest and the superior court's resolution of it. Tom Mulcaire Contracting, LLC v. City of Cottonwood, 1 CA-CV 10-0622 (Ariz.App. July 26, 2011) (mem. decision); see Ariz. R. Sup. Ct. 111(h); ARCAP 28(g).
[3]  The Legislative Council is a statutory committee of the legislature that provides bill drafting, research, library, and other administrative services to the legislature. A.R.S. §§ 41-1301, -1304 (2011).
[4]  We do not suggest it is always necessary to have a hearing to determine whether a claimant in these circumstances would prevail.
