IKUTA, Circuit Judge:
We are asked to determine whether the bankruptcy court erred as a matter of law by holding that attorneys' fees incurred during litigation after the confirmation of a Chapter 11 bankruptcy plan were discharged by that bankruptcy. We have jurisdiction under 28 U.S.C. § 158(d). Picerne's claim for attorneys' fees arose before Castellino filed its bankruptcy petition, and Castellino's post-discharge conduct did not amount to "a whole new course of litigation," Siegel v. Fed. Home Loan Mortg. Corp., 143 F.3d 525, 534 (9th Cir. 1998). Therefore, under the circumstances of this case, Picerne's attorneys' fees claim was discharged in Castellino's bankruptcy.
Castellino Villas LLC (Castellino) hired Picerne Construction Corp. dba Camelback Construction (Picerne), a general contractor, to construct a 120-unit apartment complex on Castellino's property. Picerne and Castellino entered into an agreement for the work that contained an attorneys' fees provision, which stated, in pertinent part:
Castellino defaulted on its obligations and failed to pay Picerne and its subcontractors for their work. In response, Picerne filed a demand for arbitration and a mechanic's lien against the apartment complex. A few months later, Picerne filed a complaint in California Superior Court to foreclose on the mechanic's lien. Picerne later amended the complaint to add Castellino's lender, Bank of the West, as a defendant. In response, Bank of the West asserted that its deed of trust on Castellino's property, which it held as security for Castellino's $14 million debt to the Bank, was superior to Picerne's mechanic's lien.
The court stayed Picerne's action in May 2007 to permit arbitration in accordance with the contract. On May 11, 2009, the arbitrator issued an award in favor of Picerne. The superior court confirmed the arbitration award on July 24, 2009. That same day, Castellino filed a Chapter 11 petition for bankruptcy. The bankruptcy filing automatically stayed Picerne's foreclosure action, see 11 U.S.C. § 362(a), but the bankruptcy court granted Picerne's motion to lift the stay so that the parties could continue to litigate the mechanic's lien action in state court. Castellino disputed the validity, priority, and amount of Picerne's lien.
After a hearing, the bankruptcy court approved the settlement agreement, and confirmed Castellino's plan of reorganization, as modified to conform to the settlement agreement. As a result, Castellino was discharged from bankruptcy.
Pursuant to the plan and settlement agreement, the parties continued litigating the mechanic's lien action in state court. After a nine day trial, the state court held that Picerne's mechanic's lien was valid and had priority over the Bank's lien, and the court entered judgment for Picerne in the amount of some $2.6 million (including prejudgment interest). Picerne moved for an award of attorneys' fees. The state court held that under the bankruptcy court's order, it lacked the authority to adjudicate or award attorneys' fees, so it denied the motion without prejudice. Castellino appealed the decision to the California Court of Appeal.
While the appeal was pending, Picerne moved the bankruptcy court for a ruling that the state court had the authority to award attorneys' fees. Picerne argued that although it initiated litigation before Castellino filed its petition in bankruptcy, it was entitled to an award of attorneys' fees that were incurred after the confirmation of Castellino's plan, citing In re Ybarra, 424 F.3d 1018 (9th Cir. 2005). Picerne also argued that the releases in the settlement agreement and plan of reorganization did not preclude it from seeking post-confirmation attorneys' fees.
The bankruptcy court denied the motion. It reasoned that when Picerne sued Castellino, the contract between the parties gave Picerne a contingent and unliquidated claim for attorneys' fees. Because this claim arose before Castellino filed a petition in bankruptcy, it was discharged by the confirmation of Castellino's plan of reorganization or was released by the parties' settlement agreement. The district court affirmed, and Picerne timely appealed.
We first consider when claims for attorneys' fees are discharged in bankruptcy. The confirmation of a plan of reorganization under Chapter 11 "discharges the debtor from any debt that arose before the date of such confirmation" except as provided in the statute, the plan, or the order confirming the plan. 11 U.S.C. § 1141(d)(1) (emphasis added).
A claim is "contingent" when "the debtor will be called upon to pay [it] only upon the occurrence or happening of an extrinsic event which will trigger the liability of the debtor to the alleged creditor." In re Fostvedt, 823 F.2d 305, 306 (9th Cir. 1987) (internal quotation marks omitted). A claim is "unliquidated" when it is not "subject to ready determination and precision in computation of the amount due." Id. (internal quotation marks omitted). "This broadest possible definition of `claim' is designed to ensure that all legal obligations of the debtor, no matter how remote or contingent, will be able to be dealt with in the bankruptcy case." In re Jensen, 995 F.2d 925, 929 (9th Cir. 1993) (internal quotation marks omitted). "The breadth of the definition of `claim' is critical in effectuating the bankruptcy code's policy of giving the debtor a `fresh start.'" Id.
In determining whether a creditor's claim arose prepetition, we use the "fair contemplation" test. Under this test, "a claim arises when a claimant can fairly or reasonably contemplate the claim's existence even if a cause of action has not yet accrued under nonbankruptcy law." Id. at 839; see also In re Jensen, 995 F.2d at 930-31. For instance, in Jensen we held that when a state environmental regulatory agency was aware that the groundwater at the debtors' site was seriously contaminated before the debtors filed a bankruptcy petition, a contingent claim for cleanup costs was in the "fair contemplation" of the state at the time the debtors filed their Chapter 7 petition. Id. The state's claim for cleanup costs was therefore discharged in bankruptcy, even though the state incurred nearly a million dollars in cleanup costs after the discharge. Id. Accordingly, if a creditor and debtor are engaged in prepetition litigation pursuant to a contract that includes an attorneys' fees provision, and the creditor "can fairly or reasonably contemplate" that it will have a claim for attorneys' fees if an "extrinsic event" occurs (that is, if it prevails in the litigation), then the creditor's claim for attorneys' fees will be discharged in the debtor's bankruptcy even if the creditor incurs attorneys' fees after the debtor was discharged. See In re SNTL Corp., 571 F.3d at 839; In re Fostvedt, 823 F.2d at 306.
Despite the breadth of this rule, attorneys' fees incurred by a creditor pursuant to an agreement will not always be in the "fair contemplation" of the parties. See, e.g., Siegel v. Fed. Home Loan Mortg. Corp., 143 F.3d 525; see also In re Ybarra, 424 F.3d 1018. In Siegel, the debtor defaulted on two real estate loans and then filed a bankruptcy petition. 143 F.3d at 527. The lender's claims were resolved in the bankruptcy, and the debtor received a discharge. Id. But the debtor subsequently brought a lawsuit in state court (later removed to federal court) against the lender, arguing that the lender breached the deed
We addressed a similar situation in Ybarra. In that case, a debtor first brought a suit for employment discrimination against her employer in state court. 424 F.3d at 1020. Some eight months later, the debtor filed a Chapter 11 bankruptcy petition, which was subsequently converted to Chapter 7. Id. The trustee for the debtor's bankruptcy estate negotiated a settlement agreement with the employer, which was approved by the bankruptcy court. Id. The state court then dismissed the lawsuit. Id. Despite the dismissal of the lawsuit, the debtor took affirmative actions "to revive the state suit." Id. at 1020, 1027. The debtor claimed her cause of action against the employer constituted exempt property, litigated this issue in bankruptcy court, and (after prevailing on appeal), rejected the settlement agreement and "successfully persuaded the state court to set aside the dismissal." Id. at 1020. The debtor lost in state court and the employer was awarded attorneys' fees and costs. Id. at 1020-21 Because the bankruptcy court had previously granted the debtor a discharge, the employer moved the bankruptcy court for leave to enforce the state award of fees and costs. Id. at 1021. The debtor claimed the award was discharged in bankruptcy. Id.
We disagreed. Following Siegel, we noted that "the award of post-petition attorney fees was not discharged" where the debtor returned to the fray by engaging in the "initiation of new litigation" post-petition. Id. at 1023-24 (citing Siegel, 143 F.3d at 534). We concluded that "postpetition attorney fee awards are not discharged where postpetition, the debtor voluntarily pursue[d] a whole new course of litigation, commenced litigation, or return[ed] to the fray voluntarily." Id. at 1024 (alterations in original) (internal quotation marks omitted). We therefore rejected the debtor's argument that the state lawsuit "should be considered continuous litigation, rather than the commencement of a new suit post-petition," and we instead concluded that the debtor's "actions to revive the state suit were sufficiently voluntary and affirmative to be considered `returning to the fray.'" Id. at 1027; see also In re Sure-Snap Corp., 983 F.2d 1015, 1018-19 (11th Cir. 1993) (holding that when a debtor's liabilities under an agreement were discharged in bankruptcy, but the debtor challenged the validity of the agreement through a post-discharge appeal "initiated" by the debtor, the debtor can be held liable for attorneys' fees under the agreement).
The analysis in these cases is consistent with our fair contemplation test. When parties engage in prepetition litigation that could lead to an award of attorneys' fees, they may fairly contemplate that the prevailing party will be awarded those fees. Therefore, a creditor's contingent claim to such fees is discharged in bankruptcy, even if some fees are incurred post-petition. But when the prepetition litigation is resolved in bankruptcy so that any claim (including a contingent claim for attorneys' fees) against the debtor would be discharged, we cannot say that the debtor's affirmative action to commence
We now turn to Picerne's claim for attorneys' fees related to the state court litigation. Picerne argues it is entitled to attorneys' fees under an expanded reading of Ybarra and Siegel. According to Picerne, if a debtor continues to litigate a prepetition claim after discharge, and takes any affirmative steps beyond what is necessary to extricate itself from the litigation, the debtor has chosen to "return to the fray," Siegel, 143 F.3d at 533, and any attorneys' fees incurred were not discharged. Here, Picerne contends, Castellino did more than attempt to extricate itself from the state court litigation: it brought a motion for summary judgment, opposed Picerne's motion for summary judgment, took party and non-party discovery, and made a request for attorneys' fees.
We disagree. Because Picerne and Castellino had entered into a contract with an attorneys' fees provision, and Picerne commenced an action under that contract against Castellino in state court before Castellino filed a Chapter 11 bankruptcy petition, Picerne's contingent claim for attorneys' fees arose before both the filing of Castellino's bankruptcy petition and the confirmation of Castellino's plan. Further, the preconfirmation settlement agreement between Picerne and Castellino required the parties to complete the state court litigation. Under these circumstances, Picerne could fairly and reasonably contemplate that it would incur attorneys' fees associated with the state court litigation and would have a claim for attorneys' fees under the agreement if it prevailed.
Contrary to Picerne's argument, Ybarra and Siegel are not implicated here. Unlike the debtors in those cases, Castellino was not relieved of liability under its agreement with Picerne and given a fresh start by its discharge in bankruptcy. Rather, the parties agreed that Picerne's action against Castellino would continue after discharge. Indeed, in order to obtain Picerne's agreement to withdraw its objections to the plan of reorganization, Castellino and Picerne agreed to litigate Picerne's mechanic's lien claim to conclusion, and the terms of the plan of reorganization were conditioned on the results of the litigation. Nor did Castellino "pursue a whole new course of litigation," Siegel, 143 F.3d at 534, after receiving a discharge. Rather, it merely continued to litigate the single legal action that Picerne had commenced before Castellino filed a petition in bankruptcy. Nothing in the agreement or in the definition of "claim" suggests that Castellino's efforts to defend itself in the ongoing litigation were outside the fair
We conclude that under the circumstances of this case, Picerne could "fairly or reasonably contemplate" that it would have a claim for attorneys' fees if it prevailed in the state litigation before Castellino filed its petition for bankruptcy. Therefore, the district court correctly determined that the claim was discharged when the bankruptcy court confirmed Castellino's plan.