
648 N.W.2d 338 (2002)
2002 SD 74
Donna HENTZ, Plaintiff and Appellant,
v.
The CITY OF SPEARFISH, DEPARTMENT OF PUBLIC WORKS, OFFICE OF PLANNING & ZONING, Defendant and Appellee.
No. 22168.
Supreme Court of South Dakota.
Considered on Briefs on April 22, 2002.
Decided June 26, 2002.
*339 Donald D. Richards, Spearfish, for plaintiff and appellant.
E. James Hood, Suzanne M. Dardis of Hood & Nies, Spearfish, for defendant and appellee.
AMUNDSON, Justice.
[¶ 1.] Donna Hentz (Hentz) petitioned the trial court for a writ of mandamus commanding the City of Spearfish (City) to comply with its zoning ordinances. The court issued the writ of mandamus, but did not order the removal of the addition. Hentz appeals. We affirm.

FACTS
[¶ 2.] The dispute between City and Hentz arises out of an unlawfully issued building permit.[1] Hentz resides next door to Mary Kay Viles and Joe DeSiena (Viles) in City. Viles applied to City for a building permit that would allow her to construct a multi-story addition onto her home. City initially denied the permit because it violated City Ordinance 356, Section 3(D)(2), which requires a 12-foot side setback for homes over one and one-half stories high.[2] Viles subsequently resubmitted her application and a proposal that left a 7-foot setback on the first level of the home and a 12-foot setback for the second story. On June 18, 2001, City issued the permit after officials determined the application met all legal requirements.
[¶ 3.] Viles began building her addition, which was estimated to cost $130,000. After construction was underway, Hentz determined the addition obstructed her view of Lookout Mountain. Hentz and her attorney contacted City officials to complain about the sight obstruction and about a violation of the set back ordinance. City disagreed regarding Hentz's interpretation of the set-back requirements, so Hentz petitioned the trial court for a writ of mandamus.
[¶ 4.] The trial court found City had incorrectly determined that the addition was in compliance with City ordinances; thus, Hentz's writ of mandamus was issued. The court, however, gave City an option of either amending the ordinance section or requiring applicants to apply for variances if a proposed two-story structure fails to meet the required setback. The trial court stated that it refused to order demolition of Viles' addition because much of the construction was complete and Viles had never been party to the suit by Hentz against City.
[¶ 5.] Hentz appeals the following issue:
Whether the trial court abused its discretion by prospectively denying injunctive relief in a decision issuing a writ of mandamus.

STANDARD OF REVIEW
[¶ 6.] The applicable standard of review for this issue is the abuse of discretion standard. Baker v. Atkinson, 2001 SD 49, ¶ 12, 625 N.W.2d 265, 269 (stating circuit court has discretion in granting a *340 writ of mandamus and acknowledging the standard of review is abuse of discretion) (citing Willoughby v. Grim, 1998 SD 68, ¶ 6, 581 N.W.2d 165, 167; Brown v. City of Yankton, 434 N.W.2d 376, 378 (S.D.1989)). "[A]n abuse of discretion refers to a discretion exercised to an end or purpose not justified by, and clearly against reason and evidence." Id. (quoting State v. Almond, 511 N.W.2d 572, 574 (S.D.1994)).

DECISION
[¶ 7.] Hentz argues that the lower court did not have the right to prospectively foreclose the possibility of seeking specific types of relief. She contends that she is "entitled to have the City do that which they are duty bound to do ... require the homeowners to make the house smaller or the lot bigger." In its memorandum decision regarding the issuance of the writ of mandamus, the trial court found City had no authority under its own ordinances to issue the building permit, but granted the relief prospectively, allowing the addition to remain in place.
[¶ 8.] Utilizing a writ of mandamus to obtain relief is a unique remedy, which has been described as follows:
The nature of a writ of mandamus is an extraordinary remedy that will issue only when the duty to act is clear:
Mandamus is a potent, but precise remedy. Its power lies in its expediency; its precision in its narrow application. It commands the fulfillment of an existing legal duty, but creates no duty itself, and acts upon no doubtful or unsettled right. To prevail in seeking a Writ of Mandamus, the petitioner must have a clear legal right to performance of the specific duty sought to be compelled and the respondent must have a definite legal obligation to perform that duty.
Baker, 2001 SD 49 at ¶ 16, 625 N.W.2d at 269 (emphasis in original) (citations omitted). See also H & W Contracting, LLC v. City of Watertown, 2001 SD 107, ¶ 24, 633 N.W.2d 167, 174 (citing Willoughby, 1998 SD 68 at ¶ 7, 581 N.W.2d at 168) (stating petitioners must demonstrate "a clear legal right to performance of the specific duty sought to be compelled" and opposing party "must have a definite legal obligation to perform that duty"). In the case at hand, issuing the writ was not error because City clearly had a legal obligation to comply with its own ordinances. See Baker, 2001 SD 49 at ¶ 16, 625 N.W.2d at 269. In addition, there is precedent establishing that denying injunctions that would require removal or destruction of a building is justified under certain circumstances.
[¶ 9.] In Hamerly v. City of Lennox Bd. of Adjustment, 1998 SD 43, ¶ 14 n7, 578 N.W.2d 566, 569 n7, we acknowledged that "it was improper to order city to remove the building of another pursuant to a writ of certiorari brought by a neighbor. This is especially so where, as here, the property owner is not even a party to the action." Although we agree with Hentz's argument that this case is somewhat distinguishable, the inequity resulting from the destruction of property of a non-party is the same.[3]
[¶ 10.] Additionally, in Harksen v. Peska, 1998 SD 70, ¶ 27, 581 N.W.2d 170, 175, a landowner built a cabin that violated covenants on the land. There, we determined an injunction requiring the purchaser to tear down the cabin was too harsh. We said:

*341 The last factor to guide a court in issuing an injunction is the balancing of the equities, or what is known as the "relative hardship test." (citing Foley v. City of Yankton, 89 S.D. 160, 165-66, 230 N.W.2d 476, 479 (1975)).
* * *
A critical factor in balancing equities is that the party being enjoined knew that he was violating the covenant. (citing Foley, 89 S.D. at 166, 230 N.W.2d at 479 (stating "[a]n additional factor that the court should consider is the state of mind of the party against whom the mandatory injunction is sought")).
Id. at ¶ 31, 32. We then noted that knowledge is a crucial factor in the relative hardship test and that some courts will not apply this test if one deliberately builds a structure in violation of restrictions. This, in turn, allows injunctions that require destruction of the property. Id. ¶ 32 n10. In Harksen, despite the builder's knowledge that he was in violation of the covenant, we said "[i]t would be inequitable to require the destruction of a $100,000 summer residence when there really is no burden on Harksen." Id. at ¶ 33.
[¶ 11.] Similarly, in this case the hardship of requiring Viles to tear down the addition outweighs the detriment to Hentz. Viles proceeded under the good faith assumption that they were building in compliance with the zoning laws, and received a building permit. They did not have knowledge that they were in violation of the zoning laws. Cf. id. (finding knowledge existed). We agree with the trial court's following statement in its Memorandum Opinion:
City has two choices. It may initiate an amendment to the section.... Alternatively, City can require building permit applicants to apply for a variance, where the entirety of the proposed two-story structure does not meet the necessary 12 foot setback requirement....
* * *
Viles have proceeded in reliance on a building permit issued by the appropriate authority.... [T]he structure was in place as of the time of hearing.... To now obtain a 12-foot setback on the first story would require demolition of the foundation and footings and the pouring of new footings and foundation. The [c]ourt will not require this of property owners who have proceeded in good faith and who have not been joined in this action.
[¶ 12.] "[M]andamus will not lie to undo an act done in violation of a public or official duty[.]" State v. Lehman, 45 S.D. 394, 187 N.W. 720, 721 (1922). See also Crowley v. Spearfish Indep. Sch. Dist., 445 N.W.2d 308, 311 (S.D.1989) (stating "mandamus is inapplicable to undo an act already done in violation of public or official duty"); Beresford Indep. Sch. Dist. v. Fletcher, 66 S.D. 500, 287 N.W. 497, 498 (1939) (stating "mandamus is not the proper remedy to compel the undoing of [a completed act]"). In this case, the City has already issued the building permit to Viles, and she completed the construction of the addition pursuant to the permit issued. Since the construction was completed prior to the court's ruling in this case, mandamus is the inappropriate remedy to undo the project.
[¶ 13.] Finally, Hentz requested that her attorney fees be awarded. This Court has previously stated that "[a]ppellate attorney fees may be granted `in actions where such fees may be allowable[.]'" City of Sioux Falls v. Johnson, 2001 SD 108, ¶ 27, 632 N.W.2d 849, 856 (citing SDCL 15-26A-87.3) (emphasis in original). We have said that the Legislature contemplated the granting of appellate *342 attorney fees only where such fees are permissible at the trial level. Id. See also Block v. Bartelt, 1998 SD 65, ¶ 14, 580 N.W.2d 152, 155 (acknowledging that motion for appellate attorney fees under SDCL 15-26A-87.3 is reliant on the statutory authority to obtain attorneys fees in certain types of cases under SDCL 15-17-38); Matter of Estate of O'Keefe, 1998 SD 92, ¶ 17, 583 N.W.2d 138, 142 (stating attorney fees can only be awarded if provided by contract or if authorized statutorily). Hentz has not demonstrated that specific statutory authority entitles him to appellate attorney fees. Therefore, no appellate attorney fees are allowed in this appeal.
[¶ 14.] Affirmed.
[¶ 15.] GILBERTSON, Chief Justice, and SABERS, KONENKAMP, and ZINTER, Justices, concur.
NOTES
[1]  Our review of this case is limited to "pleadings and papers transmitted from the circuit court" because no transcript was included as part of the record before us. Baltodano v. North Cent. Health Serv., Inc., 508 N.W.2d 892, 894 (S.D.1993).
[2]  City Ordinance 356, Section 3(D)(2), regarding side setbacks states, in pertinent part, that "[f]or dwellings more than one and one-half (1½) stories, there shall be a side setback of not less than twelve (12) feet."
[3]  Hentz argued that this case is inapplicable because "mandamus compels an unperformed ministerial duty[,]" whereas "certiorari reviews a performed judicial or official duty." 14 AmJur2d, Certiorari, § 7 (2000).
