OPINION
This is an appeal from an award of costs and attorney’s fees granted to appel- *313 lee at the conclusion of this action in the superior court.
Appellants, Owen Jones & Sons, Inc. and Empire Western Ltd., a joint venture, entered into a subcontract agreement with C. R. Lewis Company, Inc., appellee, on July 3, 1963. Under the contract appellee agreed to furnish labor and materials necessary to complete plumbing and other systems specified in the plans for the “Four Seasons Apartment” to be built in Anchorage, Alaska. The total contract price was $178,449.19. The contract also provided for progress payments, not to exceed 90% of the contract price.
The partially completed “Four Seasons Apartment” was destroyed in the March 27, 1964, earthquake. After the quake the appellants brought an action against appel-lee to recover $119,663.12 that Jones-Western had disbursed to C. R. Lewis Co. as progress payments. This claim was made under a clause of the contract calling for indemnification of the contractor by the subcontractor for all damages caused “by reason of the elements, from any other person or any other craft”. The subcontractor counter-claimed for $46,620.92 for services rendered and materials furnished before the collapse.
At trial without a jury the superior court accepted Jones-Western’s contention that the earthquake was within the indemnity clause of the contract, but the court held that this finding did not resolve the case. It was the decision of the trial court that there could be no indemnification under the contract to supply plumbing to the “Four Seasons Apartment” because the building, the subject matter of the contract, had been destroyed, thus discharging any obligation on the subcontractor’s part to furnish further performance.
After finding that the building’s destruction discharged the obligation of the parties under the original contract, Judge Lewis held that C. R. Lewis Company was entitled to recover the cost of its performance from appellants on a quantum meruit basis.
The trial court decided that the subcontractor’s services and materials supplied should be reasonably valued at approximately $142,300. From this figure a computation was made which took into account the amount of progress payments ($119,663.12) and the value of materials belonging to appellants which were salvaged by appellee ($30,000), representing a total value received by appellee of $149,663.12. From this total was subtracted the amount due to the appellee under the quantum meruit theory employed by the court, which left an excess of $7,363.12, the amount of judgment for appellants. Pursuant to this judgment the trial judge ordered that appellee be awarded costs and $10,000 attorney’s fee.
The resolution of this controversy requires our decision on two issues. First, was it error to hold that appellee was the prevailing party in this action; and second, did the trial court abuse its discretion in the amount of the award given ?
Under AS 09.60.010 1 and Rule 54(d), 2 Rules of Civil Procedure, it is clear that the prevailing party is entitled to costs.
It is the contention of the appellants that only they could be considered the prevailing parties in light of their affirmative recovery of $7,363.12 at the conclusion of the trial.
With this contention we cannot agree; it is not an immutable rule that the *314 party who obtains an affirmative recovery must be considered the prevailing party. 3 The decision of the trial court that appel-lee was the prevailing party did not involve an erroneous construction of either AS 09.60.010 or Rule 54(d). We are of the opinion that the determination of which party prevails in cases of this sort is, like the award of attorney’s fees, within the discretion of the trial judge. 4
This case is clearly distinguishable from Buza v. Columbia Lumber Company,
The instant case differs because the recovery of appellants was based only on an accounting for materials salvaged by the appellee. 5 It was clear that the main issue had been resolved against appellants when the court found that appellee had no obligation to refund its progress payments under the contract, the obligation having been discharged by destruction of the subject matter.
Because we are of the opinion that the trial court was correct in deciding that the appellee was the prevailing party, we must also decide whether the amount of the award was proper.
Under Rule 82(a) (2), Rules of Civil Procedure, the court is empowered to “award a fee commensurate with the amount and value of legal services rendered” when “the money judgment is not an accurate criteria [sic] for determining the fee to be allowed.”
It is clear from the record in this case that the court considered the efforts of ap-pellee’s counsel in defeating the appellants’ claim for $119,663.12 and the value of that effort in determining the amount of the attorney’s fee awarded. The trial judge also considered the potential liability that threatened appellee. 6 Finally, it is clear that the amount of attorney’s fee was within the sound discretion of the trial court and such an award will not be disturbed unless the court has exceeded that discretion. 7 We find no reason to disturb the award in this case.
Affirmed.
Notes
. “Costs allowed prevailing party. Except as otherwise provided by statute, the supreme court shall determine by rule or order what costs, if any, including attorney fees, shall be allowed the prevailing party in any case.”
. “Costs. Except when express provision therefor is made either in a statute of the state or in these rules, costs shall be allowed as of course to the prevailing party unless the court otherwise directs. The procedure for the taxing of costs by the elerk and review of his action by the court shall be governed by Kule 79.”
. Haugland v. Canton,
. The following Alaska cases hold that the award of attorney’s fees is within the discretion of the trial judge. McDonough v. Lee,
. This recovery based on the accounting can be classified as an incidental recovery which will not be a sufficient recovery to bar a liarty who has defended a large claim from being considered a prevailing party. Haugland v. Canton,
. Ferrell v. Baxter,
. See cases cited note 4, supra.
