
627 P.2d 528 (1981)
Ronald BRADSHAW, Plaintiff and Respondent,
v.
Walter W. KERSHAW and Helen G. Kershaw, his wife; Willard B. Rogers, Edward B. Rogers and Rockefeller Land & Livestock Company, a Utah corporation, Defendants and Appellant.
No. 16719.
Supreme Court of Utah.
March 12, 1981.
*529 Walter R. Ellett, Murray, Don B. Allen, Salt Lake City, for defendants and appellant.
Robert S. Campbell, Jr., Philip C. Pugsley, Salt Lake City, for plaintiff and respondent.
OAKS, Justice:
This is an appeal from an order finding appellant, Walter W. Kershaw, guilty of contempt for failure to deliver a well permit under an earlier decree, and assessing $190,500 damages. The issues are the applicability of the defense of impossibility of performance and the measure of damages, including attorney's fees.
In August, 1970, appellant as vendor entered into an option contract to sell one Christensen a 480-acre parcel of land in Millard County "together with a 6 C.F.S. well permit purchased from Milo and Boyd Watts, of Kanosh, Utah." The contract also included another 80-acre parcel in the same area. The option was timely exercised by Christensen on December 1, 1970. However, appellant, hearing that Christensen's F.H.A. financing had not been approved, conveyed the land to Rockefeller Land & Livestock Co. (hereafter referred to as "Rockefeller") on December 17, 1970, and the well permit to W.D. and A.B. Rogers (agents and officers of Rockefeller) on December 21, 1970. On January 7, 1971, Christensen conveyed his interest in the option contract to respondent, Ronald Bradshaw.
*530 The conveyances summarized above resulted in competing claims to the real property by Rockefeller and respondent, and competing claims to the well permit by the Rogerses and respondent. Following trial on these adverse claims, the district court granted respondent specific performance of the option contract, ordering appellant on August 28, 1973, to execute a general warranty deed encompassing the two parcels of real property and the well permit for 6 C.F.S. (cubic feet per second). Appellant took an appeal to this Court, but the district court's order was affirmed. Bradshaw v. Kershaw, Utah, 529 P.2d 803 (1974).
When appellant did not convey as ordered, respondent initiated this contempt proceeding in the district court. On May 21, 1976, appellant was found in contempt of court for his substantial failure to comply with the order and judgment of August 28, 1973, which had been affirmed by this Court. Although appellant then conveyed the real property, he did not convey the well permit. On June 7, 1976, appellant filed papers urging for the first time that it was impossible for him to perform as to the well permit. After a number of continuances and then a hearing, the district court issued an order dated September 18, 1979, finding appellant in continued contempt, primarily for failure to convey the well permit, and assessing damages pursuant to U.C.A., 1953, 78-32-11, in the amount of $190,500. We affirm in all respects.
Appellant's principal argument on the issue of liability is the defense of impossibility of performance  that he could not convey the well permit to respondent because he had conveyed it to the Rogerses in 1970. It is evident from the cases cited on either side of this issue that the applicability of the impossibility defense in a contempt proceeding is a matter of considerable uncertainty. For the most part, this uncertainty stems from failure to identify clearly the time at which the performance became impossible; occasionally it stems from failure to distinguish between the applicability of the defense to different remedies for contempt. Both variables are at work, and both have contributed to confusion.
Corrective action for a contempt of court based on disobedience of a judgment, order or process of the court can involve at least three orders: (1) the order whose disobedience constitutes the contempt (hereafter "initial order"); (2) the adjudication of contempt (hereafter "adjudication"); and (3) the order imposing sanctions for the contempt (hereafter "sanctions"). Two of these orders may be combined in a single order at a single time, but all three can be entered at different times.
Our statutes provide three different sanctions for contempt: (1) punishment of the contemnor by a fine and/or imprisonment for a designated period under U.C.A., 1953, 78-32-10; (2) indemnification of a damaged party by ordering the contemnor to pay him money for actual loss or injury under 78-32-11, as in this case; and (3) coercion of the contemnor by imprisoning him until he shall perform, under 78-32-12.
Impossibility of performance would generally be a defense to the initial order. For example, the specific performance respondent-purchaser sought in the present case should not have been decreed if the vendor had shown that the subject property was then beyond his power to convey.[1] The impossibility defense has been applied or approved as to other types of initial orders also.[2]
If some time has elapsed between the initial order and the adjudication of contempt, the impossibility defense is on a different footing. If the contemptuous act is supposed to have occurred after the initial order but before the adjudication, impossibility as of the time of the alleged contemptuous act could be a defense to a *531 later adjudication for contempt.[3] Where the question is punishment or indemnification, impossibility as of the time of adjudication or thereafter is irrelevant since the objective of those sanctions is simply to assign consequences for a prior act. "Conceivably a person might, while he had the ability to comply therewith, deliberately fail to obey the court's order, and then after his contempt was complete lose the ability to perform, but he would still be guilty of past contempt."[4] Consequently, impossibility of performance as of the time of adjudication for contempt is not a defense to an adjudication for contempt.[5] In any event, impossibility of performance should never be a defense to the sanctions of punishment or indemnification if the ground of impossibility is directly traceable to the contemnor's own deliberate acts.[6]
In contrast, when the proposed sanction is coercive imprisonment, the defense of impossibility of performance as of the time the sanction is to be imposed would always be available, without regard to how or by whom the condition of impossibility occurred. It is obviously "repugnant to reason and futile"[7] to try to coerce an act that the contemnor has no present ability to perform. Our statute recognizes this by specifically preserving the impossibility defense as to coercive imprisonment in language ("an act ... yet in the power of the person to perform," 78-32-12) that is absent from the statutes dealing with punishment (78-32-10) and indemnification (78-32-11). Consequently, the defense of impossibility is uniformly held available to this type of sanction. In fact, the sanction cannot be imposed without an affirmative finding of present ability to comply.[8]
Against this background, the proper disposition of appellant's defense of impossibility of performance is evident. Unless appellant is now free to assert the impossibility defense as of the time of the initial order for specific performance, his defense is unavailing. The object of this proceeding under 78-32-11 is to indemnify for "actual loss or injury," including "costs and expenses," caused by an earlier contempt, not to coerce a present performance under 78-32-12. Only as to that latter sanction would the impossibility defense be available at this stage.
As to impossibility as of the time of the initial order, appellant cannot raise that defense at this stage because it is now res judicata. When a second claim, demand or cause of action is essentially the same as a prior claim, demand or cause of action which has gone to final judgment, res judicata means that neither of the parties can "again litigate that claim, demand or cause of action or any issue, point or part thereof which he could have but failed to litigate in the former action." Wheadon v. Pearson, 14 Utah 2d 45, 46, 376 P.2d 946, 947 (1962). The cited authority applied that principle against a plaintiff who lost on one theory and then brought an action on another one. The principle is equally applicable to a defense[9] which might have been but was not asserted in connection with an earlier proceeding (which terminated in a final judgment) in what is essentially a single and continuing controversy over the appropriate relief to give for a single wrong or a closely related group of wrongs. This principle applies to the successive proceedings involved in a contempt case. In Re Mary *532 Jane Stevens Co. v. Foley, 67 Utah 578, 588-89, 248 P. 815 (1926). In Maggio v. Zeitz, 333 U.S. 56, 69, 68 S.Ct. 401, 408, 92 L.Ed. 476 (1948), a civil contempt proceeding, the court refused to re-hear a defense pertinent to whether the initial order should have issued, declaring:
It would be a disservice to the law if we were to depart from the long-standing rule that a contempt proceeding does not open to reconsideration the legal or factual basis of the order alleged to have been disobeyed and thus become a retrial of the original controversy. The procedure to enforce a court's order commanding or forbidding an act should not be so inconclusive as to foster experimentation with disobedience.
In this case, the district court ordered appellant to specifically perform the contract for sale, and that final decree was affirmed on appeal. Appellant is now barred by res judicata from urging impossibility as a defense to an award of damages incurred as a result of contempt of that order.
U.C.A., 1953, 78-32-11, which gives the court authority to award damages in contempt cases, reads as follows:
If an actual loss or injury to a party in an action or special proceeding, prejudicial to his rights therein, is caused by the contempt, the court, in addition to the fine or imprisonment imposed for the contempt or in place thereof, may order the person proceeded against to pay the party aggrieved a sum of money sufficient to indemnify him and to satisfy his costs and expenses; which order and the acceptance of money under it is a bar to an action by the aggrieved party for such loss and injury. [Emphasis added.]
The rule of damages in a contempt case is the same as if the party were being proceeded against directly on the underlying obligation. Foreman v. Foreman, 111 Utah 72, 82, 176 P.2d 144 (1946); In Re Hoover, 44 Utah 476, 141 P. 101 (1914). Under those authorities, the trial court was correct in assessing damages under the benefit-of-the-bargain rule, which applies to breaches of contract for the sale of real estate. Smith v. Warr, Utah, 564 P.2d 771, 772 (1977);[10]Beckstrom v. Beckstrom, Utah, 578 P.2d 520 (1978); Gardner v. Christensen, Utah, 622 P.2d 782 (1980).
The trial court based its computation of the difference between the fair market value of the property bargained for and the fair market value of the property actually received on the opinion of an expert witness who testified that as of 1976 the subject property would have been worth $700 per acre irrigated and $175 per acre unirrigated. It further based its award on testimony indicating that a 6 C.F.S. well could irrigate 420 acres. Respondent's benefit-of-the-bargain damages were computed at the difference between the value of 420 acres of irrigated land and 420 acres of unirrigated land, less $30,000 for the cost of drilling and installation of the well. Damages were therefore awarded in the amount of $190,500.
Appellant argues that any benefit-of-the-bargain damages should be measured by the difference in fair market values as of the time of the original conveyance obligation in 1970, rather than as of the adjudication of contempt in 1976. The time the trial court chose to measure the damages was not in error. Appellant's suggested time would be at odds with the terms of a statute that provides indemnification from "actual loss or injury ... caused by the contempt," plus "costs and expenses," U.C.A., 1953, 78-32-11, since it would provide no incentive to comply with court orders, and would in fact allow a recalcitrant performer to lessen his damage obligation by delaying his performance in a rising market.
*533 Appellant points to evidence in the record that the subject well permit was issued for the benefit of land other than that which was conveyed to respondent, and that the permit actually issued recited that it would irrigate 120 acres. Appellant therefore argues that the well permit did not guarantee that respondent would be able to use the permit on his land, or that he would locate 6 C.F.S. of water even if he were able to drill there, or that he could irrigate more than 120 acres even if he were able to drill on his land and locate the specified quantity of water. Therefore, appellant concludes, the damages should in no event exceed the ceiling imposed by using 120 rather than 420 irrigated acres in the computation.
We think appellant's contentions are answered by uncontradicted evidence in support of the trial court's computation. Witnesses experienced in such matters testified that the contracted well permit could have been transferred and utilized on respondent's land, U.C.A., 1953, 73-3-6, and that a 6 C.F.S. well could have been obtained by drilling deep enough on the subject property. Finally, the 120-acre designation on the Certificate of Appropriation the Rogerses obtained under the permit did limit the use of the right to stock watering and to the irrigation requirements of 120 acres. But that simply expressed the limitation imposed on the well permit as utilized by parties to whom appellant transferred it in violation of respondent's prior rights. Having a contractual right to a 6 C.F.S. well permit, respondent should not be limited in his damage recovery by a restrictive condition directly traceable to appellant's improper transfer and to the actions of parties, the Rogerses, who took the permit with notice of respondent's prior claim to it.
Appellant also challenges the propriety of the trial court's award of attorney's fees for work after the 1973 judgment, including the appeal to this Court and the contempt and other proceedings to enforce appellant's contractual obligations and the orders of the court. We find no error in this award. The court's award of attorney's fees in this contempt case was justified under the original contract provision obligating appellant to pay the expenses of title clearance, including counsel fees, or under the "costs and expenses" provision of 78-32-11. B & R Supply Co. v. Bringhurst, 28 Utah 2d 442, 503 P.2d 1216 (1972); Davidson v. Munsey, 29 Utah 181, 80 P. 743 (1905).
The order is affirmed. Costs to respondent.
MAUGHAN, C.J., and HALL, STEWART and HOWE, JJ., concur.
NOTES
[1]  Foreman v. Foreman, 111 Utah 72, 83, 176 P.2d 144 (1946); 71 Am.Jur.2d, Specific Performance, § 69; 81 C.J.S. Specific Performance § 18.
[2]  Thomas v. Thomas, Utah, 569 P.2d 1119 (1977); Neilson v. Dennett, 22 Utah 2d 166, 450 P.2d 93 (1969); State v. Bartholomew, 85 Utah 94, 38 P.2d 753 (1934).
[3]  Jeppson v. Jeppson, Utah, 597 P.2d 1345 (1979); Maggio v. Zeitz, 333 U.S. 56, 74-77, 68 S.Ct. 401, 410-12, 92 L.Ed. 476 (1948).
[4]  In Re Clift's Estate, 108 Utah 336, 340, 159 P.2d 872, 874 (1945).
[5]  Id.; In Re Mary Jane Stevens Co. v. Foley, 67 Utah 578, 588, 248 P. 815 (1926).
[6]  Brown v. Cook, 123 Utah 505, 510, 260 P.2d 544 (1953); In Re Mary Jane Stevens Co. v. Foley, 67 Utah 578, 588-89, 248 P. 815 (1926).
[7]  Watson v. Watson, 72 Utah 218, 221, 269 P. 775, 776 (1928).
[8]  Id.; Hillyard v. District Court of Cache County, 68 Utah 220, 249 P. 806 (1926).
[9]  Collateral estoppel, a companion principle of res judicata, was applied to bar re-litigation of a defense in a closely related subsequent proceeding in Richards v. Hodson, 26 Utah 2d 113, 485 P.2d 1044 (1971).
[10]  In Smith v. Warr, the court distinguished prior cases upholding awards based on an out-of-pocket loss computation by observing that in those cases the buyer had only sought out-of-pocket losses. In Castagno v. Church, Utah, 552 P.2d 1282 (1976), on which appellant relies, the court affirmed a damage award computed by "abatement of purchase price," but there was no indication that the buyer sought damages other than what was awarded, or that he argued the damage issue on appeal.
