OPINION
MEYERS, Bankruptcy Judge:I
Newbery Electric, Inc. (“Debtor”) appeals from the order of the bankruptcy court which held that MCI Constructors, Inc. (“MCI”) is entitled to recoup pre-petition damages from post-petition rents claimed by the Debtor. We AFFIRM.
*1000II
PACTS
On April 30, 1985, MCI entered into a contract to construct a wastewater treatment plant (“Project”) for the city of Pueblo, Arizona. On November 1, 1985, MCI retained with the Debtor to perform electrical work on the Project. On June 2, 1987, the Debtor abandoned work on the Project, leaving its tools and equipment on the site. On June 9, 1987, the Debtor filed a petition under Chapter 11 of the Bankruptcy Code (“Code”).
Meanwhile, MCI retained another subcontractor to complete the electrical work on the Project. In so doing, MCI and the replacement subcontractor used and retained the Debtor’s tools and equipment. On November 3, 1987, the Debtor requested MCI to return its tools and equipment. MCI refused, claiming that it was mitigating its damages caused by the Debtor's breach of contract.1 In response, the Debt- or billed MCI in the amount of $322,079.00 for the rental of the tools and equipment.
When MCI failed to pay the rental charges claimed, the Debtor commenced an adversary proceeding in the bankruptcy court. In its defense, MCI claimed that it incurred $323,989.91 in pre-petition damages as a result of the Debtor’s breach of contract. MCI filed a motion for partial summary judgment, arguing that it could recoup its claim for damages against any rents it may owe to the Debtor. The Debt- or filed a cross-motion claiming that re-coupment would be improper. After a hearing, the bankruptcy court issued an order that entitled MCI to recoup its damages against the Debtor’s claim for rents after obtaining relief from the automatic stay. The Debtor appeals.
Ill
STANDARD OP REVIEW
The bankruptcy court’s findings of fact are reviewed under the clearly erroneous standard and its conclusions of law de novo. In re Holm, 931 F.2d 620, 622 (9th Cir.1991); In re Rohnert Park Auto Parts, Inc., 113 B.R. 610, 613 (9th Cir. BAP 1990).
The bankruptcy court’s grant of summary judgment is reviewed de novo. In re Eastport Associates, 935 F.2d 1071, 1079 (9th Cir.1991); In re Southland + Keystone, 132 B.R. 632, 637 (9th Cir. BAP 1991). The reviewing court will affirm a grant of summary judgment only if it appears from the record, after viewing all evidence and factual inferences in the light most favorable to the nonmoving party, that there are no genuine issues of material fact and that the moving party is entitled to prevail as a matter of law. In re Southland + Keystone, supra, 132 B.R. at 637; In re Pioneer Technology, Inc., 107 B.R. 698, 700 (9th Cir. BAP 1988).
IV
DISCUSSION
Under the doctrine of recoupment, a creditor may assert a countervailing claim against a debtor’s claim if both claims arise out of the same transaction. In re California Canners and Growers, 62 B.R. 18, 19 (9th Cir. BAP 1986); In re Papercraft Corp., 127 B.R. 346, 350 (Bkrtcy.W.D.Pa.1991). The creditor’s claim is essentially a defense to the debtor’s claim against the creditor rather than a mutual obligation. In re California Canners, supra, 62 B.R. at 19; University Medical Center v. Sullivan, 122 B.R. 919, 925 (E.D.Pa.1990), aff'd 973 F.2d 1065 (3d Cir.1992).
The essential element of recoupment is that the debts must arise out of the same transaction. In re Papercraft Corp., supra, 127 B.R. at 350. In the instant appeal, MCI’s claim for prepetition damages arose out the contract for electrical work and the Debtor’s breach of that contract. The Debtor’s claim for post-petition rents arose out of MCI’s use and retention of the Debtor’s tools and equipment in its effort to mitigate the damages from the *1001breach. Thus, the two claims arise out of the same transaction.
The dissent argues that the two claims do not arise out of the same transaction because MCI’s use of the tools and equipment was not contemplated by the parties at the time the agreement was made. The dissent reasons that MCI’s damages claim and the Debtor’s claim for rents are not integral to each other and are easily sever-able.
We must consider, however, that once MCI learned of the Debtor’s breach, it had a duty to mitigate its damages to the extent reasonably possible under the circumstances. La Casa Nino, Inc. v. Plaza Esteban, 762 P.2d 669, 673 (Colo.1988); Schneiker v. Gordon, 732 P.2d 603, 611 (Colo.1987); Tull v. Gundersons, Inc., 709 P.2d 940, 946 (Colo.1985).2 MCI was required to take such steps as a reasonably prudent person would take in like circumstances.3 Brenaman v. Willis, 136 Colo. 53, 314 P.2d 691, 693 (1957); Bert Bidwell Inv. v. LaSalle & Schiffer, 797 P.2d 811, 812 (Colo.App.1990). After taking the steps necessary to mitigate its damages, MCI would have been entitled to compensation for its expenditures. Tull, supra, 709 P.2d at 946.
Because MCI had a duty to mitigate damages, both claims arise out of the same transaction. MCI hired another contractor and allowed the new contractor to use the Debtor’s tools and equipment in order to mitigate damages to the extent reasonably possible. The Debtor’s claim for rents would not have arisen had it not been for MCI’s use of the equipment. MCI would not have used the Debtor’s tools and equipment had it not been for the Debtor’s breach of contract. Contrary to the dissent’s view, the two claims are integral to each other and cannot be severed.
Generally, debts that arose before a bankruptcy petition was filed may not be satisfied through post-petition transactions. In re B & L Oil Co., 782 F.2d 155, 158 (10th Cir.1986). This principle is seen in bankruptcy restrictions on setoffs. Id. However, the recoupment doctrine has traditionally operated as an exception to the rule. Id. at 159. The purpose of asserting a claim in recoupment is to determine the just liability on the plaintiff’s claim and since both claims arise out of the same transaction, recoupment should be allowed regardless of whether one claim arose pre-petition and the other post-petition. In re Clowards, Inc., 42 B.R. 627, 628 (Bkrtcy D.Idaho 1984). Indeed, to allow a debtor to cut off a creditor’s defense simply because the defense arose pre-petition and the claim arose post-petition would be inequitable. University Medical Center, supra, 122 B.R. at 925. Accordingly, MCI may recoup its pre-petition damages against the Debtor’s claim for post-petition rents.4
AFFIRMED.
. MCI claims that, under the provisions of the subcontract, it was entitled to use and retain the Debtor’s tools and equipment upon a default by the Debtor. Our review of the contract reveals no such provision. MCI does not dispute the Debtor's claim for rents.
. Paragraph 29 of the contract states: “This Subcontract Agreement is executed pursuant to and governed by the laws of the State of Colorado.”
. The Debtor has raised no argument that MCI acted unreasonably in mitigating its damages.
.This result is not inconsistent with the decision in In re California Canners since in that case the Panel denied recoupment on the ground that the two claims did not arise from the same transaction. 62 B.R. at 20.