OPINION
We examine the application of the doctrine of recoupment in a breach of contract action brought by the debtor in a bankruptcy proceeding.
I
In early 1987, Newbery Electric, Inc. was a large electrical subcontractor with numerous projects pending.
On or about June 2, 1987, Newbery abandoned all of the projects which Fireman’s Fund had bonded and defaulted on the bonds. On June 4, 1987, Newbery, its primary lender Citibank (Arizona),
In accordance with its bond obligations, Fireman’s Fund hired a subcontractor, Electric Service and Supply Company (“ES-SCO”), and completed Newbery’s subcontract.
Within a week after the June 4, 1987 Agreement was signed, Newbery filed Chapter 11 reorganization petitions in bankruptcy court in Arizona. While the bankruptcy proceeding was pending, Newbery filed a multimillion dollar lender liability claim against Citibank. In resolution of that suit, New-bery and Citibank entered a settlement agreement in February 1989 (the “Settlement Agreement”). Under the Settlement Agreement, Newbery released Citibank from its lender liability claim, and Citibank in turn advanced $1.25 million to Newbery. The loan was nonrecourse, to be repaid only from certain “Pooled Assets” which were to be distributed to Newbery and Citibank in accordance with an agreed sharing formula. The Pooled Assets included, inter alia, the claim to the equipment rentals owed by Fireman’s Fund to Citibank under the June 4, 1987 Agreement. Under paragraph 8(c) of the Settlement Agreement, Citibank specifically assigned its rights to the equipment rental claim against Fireman’s Fund to New-bery “as a Pooled Asset.” Citibank also released its security interest in Newbery’s equipment, and Newbery granted Citibank a new security interest in the Pooled Assets (to collateralize Newbery’s new nonrecourse debt to Citibank). Citibank subsequently perfected its interest by filing in Arizona. Finally, in May 1989 Citibank executed a separate assignment document (the “Assignment”), expressly assigning to Newbery all of Citibank’s right, title and interest to the equipment rentals.
In 1989, after Fireman’s Fund failed to pay the promised equipment rent, Newbery filed the present action.
In March 1993 the district court certified an interlocutory appeal of its orders under 28 U.S.C. § 1292(b). The parties and court apparently sought to obtain an appellate ruling which would control numerous other similar eases which are presently pending between the same parties. This court dismissed the interlocutory appeal as premature. Newbery Corp. v. Fireman’s Fund Ins., No. 93-80155 (9th Cir. May 17, 1993). The district court then decided to try the instant case to a jury as a test case for Fireman’s Fund’s recoupment and setoff defenses.
Following the jury trial, Fireman’s Fund filed a motion for attorneys’ fees and expenses, arguing that it was the “successful party” and was thus entitled to such fees under Arizona law. The court denied the motion, and Fireman Fund timely appealed. The two appeals were consolidated and are presently before us.
II
We first consider Newbery’s and Citibank’s argument that the district court erred in granting summary judgment on Fireman’s Fund’s recoupment defense. Of course, we review a grant of summary judgment de novo. Fosson v. Palace (Waterland), Ltd.,
A
Both Newbery and Citibank first argue that the district court should not have applied the recoupment doctrine in this ease because recoupment allegedly conflicts with the bankruptcy principle of ratable distribution of assets among creditors. In support, they cite Quittner v. Los Angeles Steel Casting Co.,
“The right of setoff (also called ‘offset’) allows entities that owe each other money to apply their mutual debts against each other, thereby avoiding ‘the absurdity of making A pay B when B owes A.’ ” Citizens Bank of Maryland v. Strumpf, - U.S. -, -,
Setoff in bankruptcy cases is governed by 11 U.S.C. § 553.
[T]he mutuality requirement in bankruptcy should be strictly construed because set-offs run contrary to fundamental bankruptcy policies such as the equal treatment of creditors and the preservation of a reorganizing debtor’s assets: As Congress recognized, setoffs work against both the goal of orderly reorganization and the fairness principle because they preserve serendipitous advantages accruing to creditors who happen to hold mutual obligations, thus disfavoring other equally-deserving creditors and interrupting the debtor’s cash flow.
Federal National Mortgage Assoc. v. County of Orange (In re County of Orange),
The right of setoff is permissive, not mandatory; its application “rests in the discretion of [the] court, which exercises such discretion under the general principles of [equity].” In re Cascade Roads,
In contrast to setoff, recoupment “is the setting up of a demand arising from the same transaction as the plaintiffs claim or cause of action, strictly for the purpose of abatement or reduction of such claim.” Collier ¶ 553.03, at 553-15 (emphasis in original). Under recoupment, a defendant is able to meet a plaintiffs claim “with a countervailing claim that arose ‘out of the same transaction.’ ” Ashland Petroleum Co. v. Appel (In re B & L Oil Co.),
Recoupment, like setoff, has been applied in bankruptcy proceedings. See, e.g., In re B & L Oil Co.,
*1400 [I]n any suit or action between the estate and another, the defendant should be entitled to show that because of matters arising out of the transaction sued on, he or she is not liable in full for the plaintiffs claim. There is no element of preference here or of an independent claim to be set off, but merely an arrival at a just and proper liability on the main issue, and this would seem permissible without any reference to ... section 553(a).
Collier ¶ 553.03, at 553-17 (citing Quittner, 202 F.2d at 816 n. 3). The Tenth Circuit has offered a similar rationale for treating setoff and recoupment differently in bankruptcy cases:
In bankruptcy, both recoupment and setoff are sometimes invoked as exceptions to the rule that all unsecured creditors of a bankrupt stand on equal footing for satisfaction. Recoupment or setoff sometimes allows particular creditors preference over others. Setoff is allowed in only very narrow circumstances in bankruptcy. But a creditor properly invoking the recoupment doctrine can receive preferred treatment even though setoff would not be permitted. A stated justification for this is that when the creditor’s claim' arises from the same transaction as the debtor’s claim, it is essentially a defense to the debtor’s claim against the creditor rather than a mutual obligation, and application of the limitations on setoff in bankruptcy would be inequitable.
In re B & L Oil Co., 782 F.2d at 157 (internal quotation marks and citations omitted) (cited in Collier ¶ 553.03, at 553-15—553-16 n. 5); see also Lee v. Schweiker,
It is true, as Newbery points out, that the rationales offered in the above authorities conflict with our holding in Quittner. In Quittner, we refused to allow a defendant to recoup prepayments made by that defendant to the plaintiff-debtor, finding that application of recoupment in the bankruptcy context “would interfere with the ratable distribution of assets among the general creditors.” Quittner,
[i]t is well settled, moreover, that a bankruptcy defendant can meet a plaintiff-debt- or’s claim with a counterclaim arising out of the same transaction, at least to the extent that the defendant merely seeks recoupment. Recoupment permits a determination of the just and proper liability on the main issue, and involves no element of preference.
Id. at 265 n. 2,
Accordingly, we reject both New-bery’s and Citibank’s argument and hold that recoupment does not violate the bankruptcy principle of ratable distribution of assets among a bankrupt debtor’s creditors.
B
Newbery and Citibank next argue that the district court erred because recoupment is
As noted above, recoupment is an equitable doctrine which is based on the premise that “the defendant should be entitled to show that because of matters arising out of the transaction sued on, he or she is not liable in full for the plaintiffs claim.” Collier ¶ 553.03, at 553-17 (citation omitted). There are, of course, any number of reasons why a defendant may not in fact be liable in full for a plaintiffs claim. In the cases cited by the appellants, the defendant had made certain payments to the debtor, and recoupment was allowed because it would be inequitable not to allow the defendant to recoup those payments against the debtor’s subsequent claim. A similar rationale exists in the present case. Newbery is contractually obligated to indemnify Fireman’s Fund for all losses incurred by Fireman’s Fund as a result of Newbery’s default on Fireman’s Fund performance and payment bonds. Fireman’s Fund’s obligation to pay rent for the use of Newbery’s equipment stemmed directly from Newbery’s default on those bonds. Accordingly, Newbery is seeking recovery from Fireman’s Fund for payment of equipment rent even though Fireman’s Fund’s obligation to pay that rent stemmed directly from Newbery’s default on Fireman’s Fund’s bonds, and even though Newbery is obligated to indemnify Fireman’s Fund for consequential losses attributable to Newbery’s default on those bonds. Application of the recoupment doctrine in such circumstances is entirely equitable, and it is consistent with the rationales for that doctrine. Accordingly, we reject the argument that recoupment is only available in cases involving overpayments.
C
Newbery and Citibank next assert that Fireman’s Fund is not entitled to assert the recoupment defense because between 1987 and 1989 Fireman’s Fund allegedly failed to pay rents to Citibank in a deliberate attempt to create a fund against which Newbery’s indemnity obligation could later be recouped. Newbery and Citibank cite Matter of American Sunlake Ltd. Partnership,
We reject this argument for two reasons. First, the district court concluded that the appellants had failed to provide any specific evidence to justify a finding of bad faith. On appeal, the appellants have failed to offer a persuasive explanation of why the court’s conclusion is erroneous. Second, Fireman’s Fund notes that it could not have withheld the rent prior to 1989 as part of a scheme to assert a recoupment or setoff defense later, because its obligation to pay rent up until May 1989 was to Citibank, not Newbery, and it could not have anticipated Citibank’s later assignment of its right to the rental claim back to Newbery. As such, eases such as Paris v. Transamerica Insurance Group (In re Buckley & Assoc. Ins., Inc.),
D
Newbery and Citibank next argue that the district court erred in concluding that New-bery’s claim to the equipment rentals and Fireman’s Fund’s claim for indemnification stemmed from the “same transaction.” We are not persuaded.
The district court’s decision is supported by Arizona contract law. As the Arizona Supreme Court has explained,
Matters contained in other writings which are referred to are to be regarded as part of the contract and properly to be considered in the interpretation of the contract. ... [I]t has long been settled, without a dissenting voice, that parties may incorporate into agreements by mere reference, other writings or agreements or records, and thereby make the latter an essential part of the contract.
Climate Control, Inc. v. Hill,
Newbery and Citibank argue that the actual General Indemnity Agreement between Newbery and Fireman’s Fund was not incorporated into the June 4, 1987 Agreement, and that the only thing which was incorporated was a “specimen of an indemnity agreement — not the actual indemnity agreements signed by Newbery.” This argument is unpersuasive in light of other more concrete references in the June 4, 1987 Agreement to the General Indemnity Agreement. For example, as the district court noted, paragraph E of the recitals to the June 4, 1987 Agreement states that “New-bery is in default ... and desires pursuant to the terms of the General Indemnity Agreements to assist [Fireman’s Fund] in performing its obligations under its bonds and to minimize losses on said bonded projects.” In addition, paragraph 4 of the main text states that “[e]xcept as otherwise explicitly set forth herein, nothing contained in this Agreement shall be construed as a waiver by [Fireman’s] Fund of any rights it has or may have in the future under its General Indemnity Agreement.” We agree with the district court that the parties clearly incorporated the specific Newbery/Fireman’s Fund indemnity agreement, rather than merely a generic “specimen,” into the June 4,1987 Agreement.
Newbery also relies on University Medical Center v. Sullivan (In re University Medical Center),
In addition, we note that in University Medical Center the Third Circuit applied a more narrow definition of the phrase “same transaction” than was applied by the district court in the present case. The court explained its reasons for doing so as follows:
We find that the open-ended standard, endorsed in the context of discerning compulsory counterclaims, is inadequate for determining whether two claims arise from the same transaction for the purposes of equitable recoupment in bankruptcy. Indeed, in [Lee v. Schweiker,739 F.2d 870 , 875 (3rd Cir.1984) ] we stressed that both setoff and recoupment play very different roles in bankruptcy than in their original roles as rules of pleading. Lee,739 F.2d at 875 . For the purposes of recoupment, a mere logical relationship is not enough: The fact that the same two parties are involved, and that a similar subject matter gave rise to both claims ... does not mean that the two arose from the “same transaction.” Rather, both debts must arise out of a single integrated transaction so that it would not be inequitable for the debtor to enjoy the benefits of that transaction without meeting its obligations. Use of this stricter standard for delineating the bounds of a transaction in the context of recoupment is in accord with the principle that this doctrine, as a non-statutory, equitable exception to the automatic stay, should be narrowly construed.
Id. at 1081 (internal quotation marks and citation omitted).
In our view, the district court in the present case did not err by applying Moore’s “logical relationship” test. However, we agree with the Third Circuit’s observation that courts should apply the recoupment doctrine in bankruptcy cases only when “it would ... be inequitable for the debtor to enjoy the benefits of that transaction without meeting its obligations.” University Medical Center,
Accordingly, we affirm the district court’s finding that the countervailing claims at issue in this case arose from the same transaction.
E
Finally, Newbery and Citibank assert that even if all the requirements for recoupment are otherwise met, application of the doctrine in this case would impermissibly impair Citibank’s perfected security interest in the Pooled As sets. We disagree.
Newbery and Citibank claim that “[r]e-coupment cannot be uséd when there is an intervening prior or superior right in the fund that a creditor seeks not to pay.” In support of this proposition, they cite Native Am. Fin. Inc. v. Tecumseh Constr. Co. (In re Tecumseh Constr. Co.),
As noted above, the purpose of the recoupment doctrine is merely to arrive at a just determination of the proper amount of a plaintiffs claim. Accordingly, when a third party has a security interest in that very claim, application of the recoupment doctrine does not impair the security interest, but merely serves to determine the value of the claim in which the third party holds its interest. In this case, Citibank’s security interest in the Pooled Assets is in reality merely a right to a portion of the unspecified proceeds of Newbery’s claim against Fireman’s Fund. Because recoupment is designed merely to arrive at a proper calculation of the value of that claim, Citibank has little grounds to
F
For the foregoing reasons, we hold that the district court did not err in granting summary judgment to Fireman’s Fund on its recoupment defense. In light of our ruling on this issue, we need not, and do not, consider whether the court erred in granting partial summary judgment on the alternative defense of setoff.
Ill
Newbery next argues that the district court erred in granting summary judgment to Fireman’s Fund on Newbery’s claim for account stated. Newbery’s argument is without merit.
Under Arizona law, an account stated occurs when persons with an open and running business account mutually agree to settle and strike a balance. Ralston v. Morgan,
Newbery argues that an implied agreement to settle arose between Newbery and Fireman’s Fund because Fireman’s Fund allegedly failed to object to monthly rental equipment invoices sent by Newbery. The district court correctly rejected this argument. First, the parties never agreed to a sum certain amount due for rental of New-bery’s equipment; to the contrary, the evidence indicates that the parties never resolved their dispute on this issue. Among other things, Fireman’s Fund points to the deposition of Eric M. Rumple, a Citibank Vice President, who testified that during settlement discussions with Citibank in the latter part of 1988 and early part of 1989, Fireman’s Fund acknowledged an obligation to pay rent, but questioned the amount of liability. Second, Newbery concedes that Fireman’s Fund generally objected to the invoices. Newbery’s argument that Fireman’s Fund should have objected more strenuously misses the mark, because the existence of a dispute precludes the finding of an account stated under Arizona law. Third, as Fireman’s Fund correctly notes, Arizona law requires that an account stated be based on final accountings, as opposed to monthly or interim invoices. Holt,
The district court did not err.
IV
Newbery also appeals the district court’s order granting summary judgment against Newbery in its suit against ESSCO (Fireman’s Fund’s completion contractor) for quantum meruit.
Quantum meruit “describes the extent of liability on a contract implied by law.” Black’s Law Dictionary 1119 (West 5th ed. 1979). It “rests upon the equitable theory that a contract to pay for services rendered is implied by law for reasons of justice.” Hedging Concepts, Inc. v. First Alliance Mortgage Co.,
On appeal, Newbery argues primarily that ESSCO, not Fireman’s Fund, is liable for the rent, and that Fireman’s Fund is acting as a surety for ESSCO. Newbery’s argument simply lacks foundation in the record. Under the relevant contract provisions, it is Fireman’s Fund, not ESSCO, which is liable for the rent payments.
Newbery also argues that in John A Artukovich & Sons, Inc. v. Reliance Truck Co.,
Accordingly, we affirm the district court’s grant of summary judgment against New-bery on its quantum meruit claim.
V
In the consolidated appeal, Fireman’s Fund appeals the district court’s denial of its motion for attorneys’ fees. Fireman’s Fund sought an award of attorneys’ fees and nontaxable expenses as the “successful party” under Arizona Revised Statutes § 12-341.01(A) (“In any contested action arising out of a contract, express or implied, the court may award the successful party reasonable attorneys’ fees.”). Judge Conti held that Fireman’s Fund was “the successful party,” but declined to award fees. We conclude that Judge Conti did not abuse his discretion in denying the fees.
The Arizona Supreme Court has outlined six factors which courts should use in
First, Judge Conti found that New-bery’s rent claim was meritorious, as indicated by the jury award in Newbery’s favor. He also concluded that on “the confusing facts of this ease,” Newbery’s belief that it would be entitled to a rent award which would exceed Fireman’s Funds offset defense was “not unreasonable.” Second, on the basis of the joint efforts by the parties and the court to obtain an interlocutory ruling from this court on the relevant orders, he noted that both parties had tried to avoid having a trial. While Fireman’s Fund vigorously argues that Newbery pressed for a trial knowing full well that it would be unable to succeed in light of Fireman’s Fund’s setoff defense, Fireman’s Fund fails to refute Judge Conti’s finding that Newbery was justified in seeking a trial because Fireman’s Fund refused to stipulate to a rent award sufficiently high so as to give Newbery an opportunity to “raise an additional issue on appeal-whether Fireman’s Fund may aggregate its offsets.”
Third, Judge Conti noted that because Newbery is a bankrupt company, imposing “[a]nother $200,000 claim against it would certainly be an extreme hardship.”
It is clear that Judge Conti applied the proper factors, and that his conclusions are supported by the record. Accordingly, he did not abuse his discretion in denying the fee award.
VI
For the foregoing reasons, we affirm the district court’s judgment.
AFFIRMED.
Notes
. Newbery Electric, Inc., its parent Newbery Corp., and various other related companies are collectively referred to as "Newbery.”
. The bank was then known as United Bank of Arizona.
.Fireman’s Fund alleges that its bond losses stemming from this project exceeded $52,000, and that its losses for all of the bonded projects combined exceeded $25 million.
. As discussed below, it was this assignment to Newbery of Citibank’s rights to the equipment rental claim which gave rise to Fireman's Fund’s argument that, on the basis of Newbery's promise in the General Indemnity Agreement to indemnify Fireman’s Fund from losses on its bonds, Fireman's Fund could assert a recoupment or setoff defense against Newbery's claim for rent.
. Newbery’s Amended Complaint originally sought recovery for breach of contract, breach of ■the duty of good faith and fair dealing, conversion, and trespass to chattel. Pursuant to various pretrial motions filed by Fireman's Fund, all of Newbery’s actions save its action for breach of contract were dismissed.
. After the motions were briefed. Citibank was permitted to intervene to assert its perfected security interest in the Pooled Assets, including the right to the equipment rental.
. Newbery and Citibank sought permission to reform the contract so that it could not be interpreted in a manner which would allow Fireman’s Fund to assert the recoupment and setoff defenses. They argue that any such interpretation is inconsistent with their original intent in drafting the contract.
. "Except as otherwise provided ... this title does not affect any right of a creditor to offset a mutual debt owing by such creditor to the debtor that arose before the commencement of the case ... against a claim of such creditor against the debtor that arose before the commencement of the case....” 11 U.S.C. § 553(a).
. Because the contracts in this case were executed in Arizona, the "applicable nonbankruptcy law" in this case is Arizona law. Arizona's definition of recoupment and setoff appears to parallel Collier's:
Although related concepts, set offs and counterclaims are distinguishable from recoupment. A set off or counterclaim is a demand*1399 which the defendant has against the plaintiff arising out of a transaction extrinsic to the plaintiff’s cause of action, whereas a recoupment is a reduction by the defendant of part of the plaintiff’s claim because of a right in the defendant arising out of the same transaction.
Morris v. Achen Constr. Co., Inc.,
. A “claim” includes a "right to payment,” and a “debt” is a "liability on a claim." 11 U.S.C. § 101. "In the setoff context ... 'claim' and 'debt' are ... correlative terms." Collier ¶ 553.04[1], at 553-19 n. 1 (citation omitted).
. For similar reasons, we reject the appellants’ related arguments that the mutuality requirements applicable in setoff cases should also apply in recoupment, and that Fireman’s Fund's re-coupment defense should fail because Fireman's Fund allegedly violated the automatic stay. As noted above, the requirements of section 553 simply do not apply in recoupment cases. See Quittner,
. In any event, Tecumseh would not be controlling as to Arizona law.
. The district court, applying Arizona choice-of-law rules, applied California substantive law on this issue. The parties have not challenged this decision.
. In light of the fact that Newbery does not challenge the district court's decision to apply California law on this issue, it is somewhat unclear why Newbery relies on this Arizona case.
. Because an award of attorneys’ fees under A.R.S. § 12-341.01 is discretionary with the court, see Apollo Group, Inc. v. Avnet, Inc.,
. Judge Conti noted that this same conclusion would not apply to Citibank.
