(a) The supreme court shall determine by rule or order the costs, if any, that may be allowed a prevailing party in a civil action. Unless specifically authorized by statute or by agreement between the parties, attorney fees may not be awarded to a party in a civil action for personal injury, death, or property damage related to or arising out of fault, as defined in AS 09.17.900, unless the civil action is contested without trial, or fully contested as determined by the court.
(b) Except as otherwise provided by statute, a court in this state may not discriminate in the award of attorney fees and costs to or against a party in a civil action or appeal based on the nature of the policy or interest advocated by the party, the number of persons affected by the outcome of the case, whether a governmental entity could be expected to bring or participate in the case, the extent of the party's economic incentive to bring the case, or any combination of these factors.
(c) In a civil action or appeal concerning the establishment, protection, or enforcement of a right under the United States Constitution or the Constitution of the State of Alaska, the court
(1) shall award, subject to (d) and (e) of this section, full reasonable attorney fees and costs to a claimant, who, as plaintiff, counterclaimant, cross claimant, or third-party plaintiff in the action or on appeal, has prevailed in asserting the right;
(2) may not order a claimant to pay the attorney fees of the opposing party devoted to claims concerning constitutional rights if the claimant as plaintiff, counterclaimant, cross claimant, or third-party plaintiff in the action or appeal did not prevail in asserting the right, the action or appeal asserting the right was not frivolous, and the claimant did not have sufficient economic incentive to bring the action or appeal regardless of the constitutional claims involved.
(d) In calculating an award of attorney fees and costs under (c)(1) of this section,
(1) the court shall include in the award only that portion of the services of claimant's attorney fees and associated costs that were devoted to claims concerning rights under the United States Constitution or the Constitution of the State of Alaska upon which the claimant ultimately prevailed; and
(2) the court shall make an award only if the claimant did not have sufficient economic incentive to bring the suit, regardless of the constitutional claims involved.
(e) The court, in its discretion, may abate, in full or in part, an award of attorney fees and costs otherwise payable under (c) and (d) of this section if the court finds, based upon sworn affidavits or testimony, that the full imposition of the award would inflict a substantial and undue hardship upon the party ordered to pay the fees and costs or, if the party is a public entity, upon the taxpaying constituents of the public entity.