
    804 P.2d 839
    Alan LEVIN and Janice Levin, husband and wife, dba Levin & Sons, Plaintiffs/Appellees, v. Ted HINDHAUGH and Lynn Hind-haugh, husband and wife, Defendants/Appellants.
    No. 2 CA-CV 90-0141.
    Court of Appeals of Arizona, Division 2, Department B.
    Dec. 27, 1990.
    Peulner & Cornelio, P.C. by Carmine Cornelio, Tucson, for plaintiffs/appellees.
    John D. Kaufmann, Tucson, for defendants/ appellants.
   OPINION

HOWARD, Judge.

Appellants claim the trial court erred in not applying the principles of res judicata to appellees’ claim for damages. We agree and reverse with directions.

Ted Hindhaugh worked for the Levins, who were in the construction business. Hindhaugh wanted to build his own home and because he could use Levin’s subcontractors, thus making the construction cost less than it would be otherwise, Levin agreed to help him build the house.

The home was built during Hindhaugh’s employment with Levin. Hindhaugh ran the job, selected the subcontractors, negotiated the pricing and bids, selected the materials and scheduled the work. Levin paid the subcontractors’ bills after they had been approved by Hindhaugh.

After the construction of the home was completed, Levin submitted a bill to Hind-haugh for the construction which Hind-haugh signed and paid. Hindhaugh later filed a suit against Levin in the Pima County Superior Court claiming that the bill was $34,831.83 more than their agreed-upon compensation. The Levins did not answer the lawsuit and a default judgment was entered on August 10, 1988.

Levin later contacted an attorney but no motion to set aside the judgment under Rule 60, Ariz.R.Civ.Proc., 16 A.R.S., was ever filed. On December 28, 1988, this action was filed. The complaint alleged, inter alia, that Hindhaugh was negligent in the performance of his duties as an employee of Levin in the construction of the house and as a result the costs were increased in the amount of $34,831.83. The Levins allege that the Hindhaughs were indebted to them under an indemnification theory. The Hindhaughs answered the complaint and alleged the prior judgment as a bar to the new complaint. They subsequently moved to dismiss the Levins’ complaint alleging that the claim against them was a compulsory counterclaim which they failed to assert in the prior action and that the principle of res judicata therefore applied. The Levins contended that they were seeking indemnity and since the claim of indemnity did not arise until the original judgment was taken against them it could not have been the subject of a compulsory counterclaim. The trial court agreed with the Lev-ins and denied the motion.

The case went to trial before the court, sitting without a jury. At trial the Levins testified that they paid the Hindhaughs $20,000 on the judgment which the Hind-haughs had against them. The trial court subsequently entered judgment of indemnity against the Hindhaughs and in favor of the Levins in the sum of $20,000 plus $4,000 attorney’s fees. The Hindhaughs moved to vacate the judgment based upon their previously asserted theory of res judi-cata, which the trial court denied.

In Arizona a compulsory counterclaim must be asserted against the plaintiff in order to avoid the application of the principle of res judicata. Rule 13(a), Ariz. R.Civ.Proc., 16 A.R.S.; Biaett v. Phoenix Title & Trust Co., 70 Ariz. 164, 217 P.2d 923 (1950). A counterclaim is compulsory if it arises out of the transaction or occurrence that is the subject matter of the opposing party’s claim and does not require for its adjudication the presence of third persons over whom the court cannot acquire jurisdiction. A cause of action for indemnity does not accrue until the indem-nitee has suffered actual loss through a judgment or payment thereon. E.L. White, Inc. v. City of Huntington Beach, 21 Cal.3d 497, 146 Cal.Rptr. 614, 579 P.2d 505 (1978); Tropic Builders, Ltd. v. United States, 52 Haw. 298, 475 P.2d 362 (1970) . In order to be the subject of a compulsory counterclaim a claim must be mature. O’Brien v. Scottsdale Discount Corp., 14 Ariz.App. 224, 482 P.2d 473 (1971) .

The crucial issue here is whether or not Levin had a right of indemnity against his employee Hindhaugh. The Levins rely on the cases of General Insurance Co. of America v. P.S. Lord Mechanical Contractors, 258 Or. 332, 482 P.2d 709 (1971) and All West Breeders v. DeShazer, 260 Or. 560, 491 P.2d 626 (1971), for the principle that when an employer has to pay a judgment that has been entered against him as a result of an employee’s conduct he has a right of indemnity against the employee. They also rely on the case A.I.D. Insurance Services v. Riley, 25 Ariz.App. 132, 541 P.2d 595 (1975), where the court stated that a right of indemnity exists whenever the relationship between the parties is such that either in law or equity one party should indemnify the other. None of these cases is applicable. They are based on the principle enunciated by the Restatement of Restitution, § 76 (1937) which states:

A person who, in whole or in part, has discharged a duty which is owed by him but which as between himself and another should have been discharged by the other, is entitled to indemnity from the other, unless the payor is barred by the wrongful nature of his conduct.

Comment b states that “[t]he rule stated in this Section applies where two or more persons are subject to a duty to a third person____” (Emphasis added.) All the cases relied upon by the Levins involved a third person. No third person was involved here and the claim which was the subject of the Levins’ suit against the Hindhaughs was a compulsory counterclaim which should have been asserted in the suit by the Hindhaughs against the Levins.

The complaint also asked that the original judgment be set aside under Rule 60(c), Ariz.R.Civ.Proc., 16 A.R.S. The trial court did not rule on this claim for relief, and there is no evidence in the record which would support granting it.

The Hindhaughs have requested and are entitled to their attorney’s fees, which will be awarded upon compliance with 17B A.R.S. Civil Appellate Proc.Rules, Rule 21(c).

The judgment of the lower court is reversed and the trial court is directed to enter judgment in favor of the Hindhaughs and grant them such other relief as the court in its discretion deems them entitled to.

FERNANDEZ, C.J., and ROLL, P.J., concur.  