
    In re Marlene A. PENROD, Debtor. Marlene A. Penrod, Appellant, v. AmeriCredit Financial Services, Inc., Appellee.
    No. 13-16097.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted July 9, 2015.
    Filed Oct. 1, 2015.
    
      Daniel J. Bussel (argued), Kenneth N. Klee,, and Martin R. Barash, Klee, Tuchin, Bogdanoff & Stern LLP, Los Angeles, CA, for Appellant.
    Randall P. Mroczynski (argued), Cook-sey, Toolen, Gage, Duffy & Woog, Costa Mesa, CA, for Appellee.
    Before: RONALD LEE GILMAN, SUSAN P. GRABER, and PAUL J. WATFORD, Circuit Judges.
    
      
       The Honorable Ronald Lee Gilman, Senior Circuit Judge for the U.S. Court of Appeals for the Sixth Circuit, sitting by designation.
    
   OPINION

WATFORD, Circuit Judge:

We are asked to decide whether a debt- or who prevails in a contract dispute on the basis of federal bankruptcy law may recover reasonable attorney’s fees under California Civil Code § 1717.

I

The appellant in this case, Marlene Pen-rod, bought a new Ford Taurus from a car dealership in California. Although the Taurus cost $25,000, Penrod borrowed a total of $32,000 to purchase it. (For simplicity’s sake, we will use round numbers throughout.) The extra $7,000 represented the “negative equity” in Penrod’s .old vehicle — a Ford Explorer worth $6,000 on which she still owed $13,000. Because Penrod wanted to trade in the Explorer at the same time she purchased the Taurus, the dealer gave her a $6,000 credit for the Explorer, paid off the $13,000 loan balance, and agreed to roll the $7,000 in negative equity into Penrod’s new loan for the Taurus. .The loan was subsequently assigned to the appellee, AmeriCredit - Financial Services, Inc.

Less than two years later, Penrod filed a Chapter 13 bankruptcy petition, listing as one of.her liabilities the roughly $26,000 she still owed on the loan for the Taurus. AmeriCredit filed a proof of claim asserting á secured claim for the entire $26,000 loan balance. AmeriCredit’s status as a fully secured creditor hinged on the installment sale contract that Penrod signed when she purchased the Taurus. In that contract, Penrod granted the lender a security interest in the Taurus and agreed that “[t]his secures payment of all you owe on this contract.” Thus, the security interest granted by Penrod secured repayment of not only the amount she paid for the Taurus itself, but also the $7,000 she borrowed to refinance the negative equity in her Explorer.

Penrod proposed a Chapter 13 plan that bifurcated AmeriCredit’s claim into a secured claim for $16,000 (the estimated value of the Taurus at the time) and an unsecured claim for the remaining $10,000. If confirmed, Penrod’s plan would have significantly reduced the amount Ameri-Credit would likely collect on the loan. This is because a Chapter 13 plan, in order to be confirmed by the court, must ensure that secured claims will be paid in full over the life of the plan. 11 U.S.C. § 1325(a)(5)(B)(i). Unsecured claims, by contrast, need be paid only to the extent that the debtor has “disposable income” available to pay them. § 1325(b)(1). If the debtor successfully completes the plan, unsecured claims are discharged whether they have been paid in full or not. § 1328(a).

Faced with the prospect that it would likely be repaid only the $16,000 assigned to its secured claim, AmeriCredit objected to confirmation of Penrod’s proposed plan. AmeriCredit insisted, as it had in its proof of claim, that it held a secured claim for the full $26,000 loan balance. Penrod’s plan, AmeriCredit contended, could not be confirmed unless it obligated her to repay that amount, not just the $16,000 corresponding to the value of the Taurus. In arguing that its claim should be treated as fully secured, AmeriCredit relied on a provision of the Bankruptcy Code known as the “hanging paragraph,” so called because Congress placed it after 11 U.S.C. § 1325(a)(9) without designating it as a separate subsection. See Bankruptcy Abuse Prevention and Consumer Protection Act of 2005, Pub.L. No. 109-8, § 306(b), 119 Stat. 23, 80. The hanging paragraph carves out an exception to the usual rule governing how secured claims are treated in bankruptcy. Ordinarily, a claim secured by property worth less than the amount of the claim is “bifurcated” into two claims: a secured claim equal to the value of the property and an unsecured claim for the balance. 11 U.S.C. § 506(a)(1). The hanging paragraph creates a special rule for auto lenders by prohibiting bifurcation of claims that are secured by a “purchase money security interest” in a motor vehicle recently acquired for the debtor’s personal use. § 1325(a)(*). The hanging paragraph thus allows a creditor to assert a secured claim for the full loan balance even if the vehicle is worth less than that amount, as is often the case-early in the loan’s term.

A lengthy and hard-fought battle over the applicability of this provision ensued. The details of that battle, not relevant here, are fleshed out in two earlier opinions, one by the Bankruptcy Appellate Panel (BAP), the other by this court. See In re Penrod, 392 B.R. 835 (9th Cir.BAP 2008), aff'd, 611 F.3d 1158 (9th Cir.2010). All that matters for our purposes is this: The bankruptcy court ruled that the purchase money security interest protected by the hanging paragraph does not include amounts attributable to the negative equity from a trade-in vehicle. After subtracting the $7,000 in negative equity from Penrod’s loan balance, the court ruled that AmeriCredit was left with a secured claim for $19,000 and an unsecured claim for $7,000.' Penrod amended her plan to reflect that ruling, and the bankruptcy court confirmed the amended plan.

AmeriCredit appealed, and the BAP affirmed. 392 B.R. at 852. After our court affirmed the BAP’s ruling, 611 F.3d at 1161-63, AmeriCredit unsuccessfully petitioned for rehearing en banc, over the dissent of four judges, 636 F.3d 1175 (9th Cir.2011) (Bea, J., dissenting from denial of rehearing en banc). The Supreme Court subsequently denied AmeriCredit’s petition for certiorari. — U.S.-, 132 S.Ct. 108, 181 L.Ed.2d 34 (2011).

Penrod then filed a motion in the bankruptcy court seeking to recover from Am-eriCredit all of the attorney’s fees she incurred in opposing AmeriCredit’s objection to confirmation of her Chapter 13 plan — some $245,000, all told. As the basis for this request, Penrod relied on a provision in her contract with AmeriCredit stating that, in the event of a default (which the contract defined to include filing for bankruptcy), ‘Tou will pay our reasonable costs to collect what you owe, including attorney fees, court costs, collection agency fees, and fees paid for other reasonable collection efforts.” (Emphasis added.) Penrod argued that if AmeriCre-dit had prevailed in the litigation, it would have been entitled to recover attorney’s fees from her as part of its effort to “collect what [she] owe[d].” That fact, Penrod asserted, entitled her to collect attorney’s fees from AmeriCredit under California Civil Code § 1717, which provides in relevant part:

In any action on a contract, where the contract specifically provides that attorney’s fees and costs, which are incurred to enforce that contract, shall be awarded either to one of the parties or to the prevailing party, then the party who is determined to be the party prevailing on the contract, whether he or she is the party specified in the contract or not, shall be entitled to reasonable attorney’s fees in addition to other costs.

Cal. Civ.Code § 1717(a).

The bankruptcy court denied Penrod’s motion for attorney’s fees on the ground that Penrod did not prevail “on the contract” because her success in the litigation with AmeriCredit turned on a question of federal bankruptcy law. The court held that a debtor prevails “on the contract” only when she prevails on an issue of state law or non-bankruptcy federal law. The district court affirmed.

II

California Civil Code § 1717 makes reciprocal an otherwise unilateral contractual obligation to pay attorney’s fees. Santisas v. Goodin, 17 Cal.4th 599, 71 Cal.Rptr.2d 830, 951 P.2d 399, 406 (1998). Three conditions must be met before the statute applies. First, the action in which the fees are incurred must be an action “on a contract,” a phrase that is liberally construed. In re Tobacco Cases I, 193 Cal.App.4th 1591, 124 Cal.Rptr.8d 352, 359 (2011). Second, the contract must contain a provision stating that attorney’s fees incurred to enforce the contract shall be awarded either to one of the parties or to the prevailing party. And third, the party seeking fees must be the party who “prevailed] on the contract,”- meaning (with exceptions not relevant here) “the party who recovered a greater relief in the action on the contract.” Cal. Civ.Code § 1717(b)(1). If § 1717’s conditions are met here, Penrod may recover her attorney’s fees from AmeriCredit, provided that AmeriCredit would have been entitled to recover its fees had it prevailed. See Santisas, 71 Cal.Rptr.2d 830, 951 P.2d at 407.

AmeriCredit does not contest that the contract contains a unilateral attorney’s fees provision for purposes of the second condition. Nor does it contest that if the litigation over the applicability of the hanging paragraph was an action “on a contract,” then Penrod recovered the greater relief for purposes of the third condition. The only issue in dispute is whether the first condition has been established — that is, whether the hanging-paragraph litigation constitutes an action “on a contract” under § 1717. We conclude that it does.

Under California law, an action is “on a contract” when a party seeks to enforce, or avoid enforcement of, the provisions of the contract. City of Emeryville v. Robinson, 621 F.3d 1251, 1267 (9th Cir. 2010); Douglas E. Barnhart, Inc. v. CMC Fabricators, Inc., 211 Cal.App.4th 230, 149 Cal.Rptr.3d 440, 449 (2012); Turner v. Schultz, 175 Cal.App.4th 974, 96 Cal.Rptr.3d 659, 663 (2009). AmeriCredit sought to enforce the provisions of its contract with Penrod when it objected to confirmation of her proposed Chapter 13 plan. The plan treated AmeriCredit’s claim as only partially secured, but AmeriCredit insisted that it was entitled to have its claim treated as fully secured. The only possible source of that asserted right was the contract — in particular, the provision in which Penrod granted a security interest in her Taurus to secure “payment of all you owe on this contract.” (Had the contract not granted AmeriCredit a security interest in the car, AmeriCredit could not have asserted a secured claim for any amount. See 11 U.S.C. § 506(a).) The security interest conveyed by the contract covered not just the funds Penrod borrowed to pay for the Taurus, but also the funds she borrowed to refinance the negative equity in the Explorer. The sole issue in the hanging-paragraph litigation was whether this provision of the contract should be enforced according to its terms, or whether its enforceability was limited by bankruptcy law to exclude the negative-equity portion of the loan. See In re Penrod, 611 F.3d at 1159-61 & n. 2. By prevailing in that litigation, Penrod obtained a ruling that precluded AmeriCredit from fully enforcing the terms of the contract. For that reason, § 1717’s first condition was satisfied as well.

Ill

The bankruptcy court and the district court saw things differently. As we explain next, both courts erred by relying on an overly narrow reading of § 1717.

A

The bankruptcy court denied Penrod’s fee request based on a mistaken view of the law, which constitutes an abuse of discretion. See Northbay Wellness Group, Inc. v. Beyries, 789 F.3d 956, 959 (9th Cir.2015). The court correctly recognized that a party prevails in an action “on a contract” if the party defeats enforcement of one of the contract’s terms. But the court erroneously held that § 1717 applies only if the party defeats enforcement under non-bankruptcy law. Because Penrod prevailed under bankruptcy law, the court concluded, she could not invoke the statute’s protection.

The bankruptcy court’s reasoning might have been valid before the Supreme Court decided Travelers Casualty & Surety Co. v. Pacific Gas & Electric Co., 549 U.S. 443, 127 S.Ct. 1199, 167 L.Ed.2d 178 (2007). Before Travelers, our court had held that attorney’s fees incurred in bankruptcy proceedings could not be awarded under contractual provisions or state fee-shifting statutes “where the litigated issues involve not basic contract enforcement questions, but issues peculiar to federal bankruptcy law.” In re Fobian, 951 F.2d 1149, 1153 (9th Cir.1991). We thought back then that such a limitation was implicitly imposed by the Bankruptcy Code itself. The Supreme Court squarely rejected that view in Travelers. The Court noted that the validity of creditors’ claims in bankruptcy is ordinarily a question of state law, and “we generally presume that claims enforceable under applicable state law will be allowed in bankruptcy unless they are expressly disallowed.” 549 U.S. at 452, 127 S.Ct. 1199. The Court held that nothing in the Bankruptcy Code expressly disallows claims for attorney’s fees simply because the fees are incurred litigating questions of federal bankruptcy law. Id. at 452-53, 127 S.Ct. 1199.

After Travelers, then, the question is whether § 1717 categorically precludes an award of attorney’s fees when a party successfully limits enforcement of a contract solely on the basis of federal bankruptcy law. We see nothing in California law suggesting that to be the case. Certainly nothing in the text of § 1717 imposes such a limitation, and we have found no California authority holding that § 1717 precludes a fee award under these circumstances. The California cases we have found suggest that no such categorical limitation exists. In Circle Star Center Associates v. Liberate Technologies, 147 Cal.App.4th 1203, 55 Cal.Rptr.3d 232 (2002), a lessor sought to recover the attorney’s fees it incurred in obtaining the dismissal of the lessee’s bad-faith bankruptcy filing, pursuant to a contractual provision entitling the prevailing party to recover attorney’s fees in any action arising out of the lease. Id. at 235-38. The court held that the recovery of those fees — all of which were incurred litigating issues of federal bankruptcy law — were recoverable under the contract. Id. at 238. And in Chinese Yellow Pages Co. v. Chinese Overseas Marketing Service Corp., 88 Cal.Rptr.3d 250 (Ct.App.2009), the court held that a judgment creditor could recover the fees it incurred in bankruptcy court litigating issues under federal bankruptcy law related to the enforceability of the judgment it had obtained. Id. at 261-66. That case involved a different fee-shifting statute— California Code of Civil Procedure § 685.040 — but it suggests that California law does not categorically exempt from recovery under state fee-shifting statutes attorney’s fees incurred in litigating issues under bankruptcy law.

B

In affirming the bankruptcy court’s ruling, the district court held that the litigation between Penrod and AmeriCredit did not constitute an action “on a contract” because the dispute involved purely legal questions and was resolved on purely legal grounds. That holding, too, reflects a mistaken view of the law. Nothing-in the text of § 1717 limits its application to actions in which the court is required to resolve disputed factual issues relating to the contract. A party who obtains (or defeats) enforcement of a contract on purely legal grounds, as by prevailing on a motion to dismiss with prejudice or by showing that a defendant’s contract-based defenses are barred by federal statute or federal common law, still prevails in an action “on a contract.” Cano v. Glover, 143 Cal.App.4th 326, 48 Cal.Rptr.3d 871, 873-75 (2006); RTC Mortgage Trust 1994-S2 v. Shlens, 62 Cal.App.4th 304, 72 Cal.Rptr.2d 581, 596-97 (1998).

IV

As we have explained, the-hanging-paragraph litigation was an “action on a contract” in which Penrod prevailed:- The only remaining question is whether Ameri-Credit would have been entitled to recover attorney’s fees had it prevailed, a necessary prerequisite for Penrod to recover her own fees. See Santisas, 71 Cal.Rptr.2d 830, 951 P.2d at 407. We think the answer to that question is clear. The contract included — no doubt for AmeriCre-dit’s benefit — an attorney’s fees provision quite broad in scope. The provision was not limited, for example, to actions to determine whether the terms of the contract had been breached. It instead stated that, in the event of default, Penrod would be obligated to pay the reasonable attorney’s fees AmeriCredit incurred in attempting “to collect what you owe.” That provision encompasses AmeriCredit’s efforts in the hanging-paragraph litigation to establish that it held a fully secured rather than a partially secured claim. AmeriCredit wanted to prevail on that issue to ensure that it would collect 100% of what it was owed on the loan. AmeriCredit had no reason to litigate that issue other than as part of an attempt to collect from Penrod what she owed. Whether AmeriCredit actually would have sought attorney’s fees had it prevailed (something it denies) is immaterial. What matters is whether it could have sought fees under the contract, and here it could indeed have done so.

As the “party prevailing on the contract,” Penrod is entitled to recover reasonable attorney’s fees under § 1717. Accordingly, we reverse the district court’s judgment and remand for either the district court or the bankruptcy court to determine a reasonable fee award.

REVERSED and REMANDED. 
      
      . The hanging paragraph provides: “For purposes of paragraph (5), section 506 shall not apply to a claim described in that paragraph if the creditor has a purchase money security interest securing the debt that is the subject of the claim, the debt was incurred within the 910-day period preceding the date of the filing of the petition, and the collateral for that debt consists of a motor vehicle (as defined in section 30102 of title 49) acquired for the personal use of the debtor, or if collateral for that debt consists of any other thing of value, if the debt was incurred during the 1-year period preceding that filing.”
     