In In re Penrod, — F.3d —- (2015), the Court of Appeals for the Ninth Circuit found that the debtor who prevailed in the “hanging-paragraph” litigation was entitled to attorneys’ fees under Civil Code § 1717.

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. . . . 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 (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. . .

In what could portend to interesting litigation in the future, the 9th Circuit took an extemely broad view of the attorneys’ fee clause in the standard form RISC.

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.” . . .As we have explained, the hanging-paragraph litigation was an “action on a contract” in which Penrod prevailed. The only remaining question is whether AmeriCredit would have been entitled to recover attorney’s fees had it prevailed, a necessary prerequisite for Penrod to recover her own fees. See Santisas, 951 P.2d at 407. We think the answer to that question is clear. The contract included—no doubt for AmeriCredit’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.