I concur in the majority’s conclusion that plaintiff bank, as a secured creditor, violated the provisions *1007of section 726 of the Code of Civil Procedure1 when, without first exhausting its security, it unilaterally undertook to collect part of its secured debt through the exercise of a setoff against a nonsecured personal bank account of the debtor. I cannot agree with the majority, however, that the appropriate sanction for the bank’s misconduct in the present case is simply the loss of the bank’s security interest in the secured property, leaving the bank free to collect the remainder of the debt by proceeding immediately against all of the nonsecured assets of the debtor. In my view, that remedy provides little meaningful protection to the debtor and is fundamentally inconsistent with the principle that bars a secured creditor from reaching the nonsecured assets of the debtor unless it has first exhausted the security. In this setting, I believe that the Court of Appeal properly concluded that the appropriate remedy, consistent with prior section 726 precedents, is to bar the bank, which collected part of its secured debt in a manner not authorized by section 726, from taking any additional action to collect the balance of the secured debt. Accordingly, I would affirm the Court of Appeal judgment in favor of the debtor.
I
Although I concur in the majority’s conclusion that the bank’s exercise of a setoff against the debtor’s nonsecured bank account violated section 726, in my view the majority’s analysis of this initial point is somewhat confusing, and fails to sufficiently acknowledge the dangers that such a setoff poses to the statutorily guaranteed rights of debtors.
The majority start off on the wrong track by beginning its analysis with a discussion of whether the bank’s setoff was an “action” within the meaning of section 22. (See maj. opn., ante, pp. 998-999.) The issue before us is not whether the bank’s setoff was or was not an “action” for purposes of section 22, but rather whether the bank, by exercising such a setoff to collect a secured debt, violated the provisions of section 726 and related statutes which prescribe and limit the conduct a secured creditor may pursue to collect such a debt. Numerous decisions make it clear that conduct by a secured creditor may violate section 726 and the related statutes even if the conduct does not constitute a judicial action within the meaning of section 22. (See, e.g., Woodward v. Brown (1897) 119 Cal. 283, 291-295 [51 P. 542] [secured creditor violated § 726 by voluntarily releasing lien on secured property before bringing action to enforce debt]; In re Kristal (9th Cir. 1985) 758 F.2d 454, 455-456 [secured creditor violated § 726 by its post-judgment conduct of proceeding first against debtor’s nonsecured property]; Pacific Valley Bank v. Schwenke (1987) 189 Cal.App.3d 134, 140-146 [234 *1008Cal.Rptr. 298] [secured creditor violated principle of § 726 when it released security without consent of a co-obligor on the debt].) By commencing its analysis with a largely irrelevant question, the majority opinion unnecessarily invites confusion.
I believe the majority’s analysis would be on sounder ground if it started from the general principles that govern the conduct of a secured creditor in collecting a secured debt. In Walker v. Community Bank (1974) 10 Cal.3d 729, 733 [111 Cal.Rptr. 897, 518 P.2d 329], Justice Sullivan, writing for a unanimous court, briefly explained the most fundamental restriction that California law places on a secured creditor: “In California, as in most states, a creditor’s right to enforce a debt secured by a mortgage or deed of trust on real property is restricted by statute. Under California law ‘the creditor must rely upon his security before enforcing the debt. (Code Civ. Proc., §§ 580a, 725a, 726.) If the security is insufficient, his right to a judgment against the debtor for the deficiency may be limited or barred by sections 580a, 580b, 580d or 726 of the Code of Civil Procedure.’ [Citation.]” (Italics added.)
As this passage from Walker v. Community Bank, supra, 10 Cal.3d 729, suggests, section 726 is only one of a number of statutes that, operating together, establish and enforce the rule that requires a secured creditor, who claims that a secured debt is due, to proceed first against the security before seeking to reach other, nonsecured assets of the debtor. The “security first” principle is an indispensable element of all of the numerous statutory provisions that afford a secured debtor protection in a wide range of circumstances: e.g., the provision that limits the amount of a deficiency judgment a secured creditor may obtain after a judicial foreclosure (§ 726, subd. (b)), the provision that bars a deficiency judgment in purchase money transactions (§ 580b), and the provision that precludes a creditor who has elected to foreclose by private sale from proceeding against any personal assets of the debtor (§ 580d). If a secured creditor, without violating section 726, could reach nonsecured assets of the debtor before proceeding against the security, the creditor could circumvent the carefully fashioned protections of all of these statutory provisions. (See Bernhardt, Cal. Mortgage and Deed of Trust Practice (Cont.Ed.Bar 1990) § 4.4., pp. 188-189.)2
Once it is understood that section 726 and the related statutes embody a security-first principle, it requires no novel insight to recognize that a *1009secured creditor can violate the statutory scheme through the exercise of extrajudicial conduct against a debtor’s nonsecured property, as well as by instituting a judicial “action” against such assets. Indeed, as the majority opinion points out, nearly a century ago, in McKean v. German-Am. Savings Bank (1897) 118 Cal. 334 [50 P. 656] (hereafter McKean), this court clearly and unambiguously held that the provisions of section 726 preclude a bank that holds a secured debt from collecting all or part of that debt by reducing, or setting off, a separate nonsecured bank account of the debtor without first exhausting the security.
Because of the pertinence of the McKean decision, it is worth quoting the relevant analysis of that decision at some length. The McKean opinion explained: “[T]he decisions of this court . . . mean that the mortgagee, whether a banking corporation or a private individual, must first look to the mortgaged premises as constituting the primary fund out of which the debt secured by the mortgage must be paid . . . . [H] The reason of the rule that gives to banks the right to appropriate a deposit to the payment of the depositer’s matured indebtedness does not apply where the bank has security for that indebtedness . . . . [flj . . . [W]hen the legislature declared that there should be but one action to enforce a debt secured by mortgage, it did not mean that payment could be enforced against the consent of the mortgagor by giving a bank the right to enforce payment under a general banker’s lien upon some other property, and that, too, without any legal proceedings whatever. The lien given on the mortgaged premises . . . was intended to be in lieu and exclusive of all implied liens .... [A] bank should [not] be given a right to forcibly, and against the consent of the depositer, appropriate his money, when, if it came into court to do so, the action would not lie ... . fl[] The difficulty with [the bank’s] argument is that it ignores the force and effect of section 726 of the Code of Civil Procedure.” (118 Cal. at pp. 339-341, italics added, citations omitted.)
The McKean court’s holding in this regard is no aberration and has been repeatedly and uniformly followed in' subsequent decisions in the more than 90 years since the McKean decision. In Gnarini v. Swiss American Bank (1912) 162 Cal. 181 [121 P. 726], for example, the issue before the court was whether the defendant bank had acted improperly in closing a firm’s account and applying the balance of the account to the amount due on a separate note. In posing the issue, the Gnarini court stated: “ ‘The plaintiff contends that the indebtedness represented by the note was secured by [a] mortgage, and that therefore the bank had no right to charge this note to the deposit account. It seems to be conceded—as indeed it must be—that if the mortgage . . . still subsists, and is security for the indebtedness represented by the second note, the bank had no right to apply the deposit to its payment. This was squarely decided in the case of McKean . . . , where it *1010was held that if a bank has mortgage security for a debt it must exhaust that security before it can apply in reduction or cancellation of the debt any money on deposit with it belonging to the debtor.’” (162 Cal. at p. 184, italics added.) A number of other more recent cases have similarly cited and applied the McKean holding. (See, e.g., Bank of America v. Daily (1984) 152 Cal.App.3d 767, 771 [199 Cal.Rptr. 557]; Woodruff v. California Republic Bank (1977) 75 Cal.App.3d 108, 110-111 [141 Cal.Rptr. 915]; Nelson v. Bank of America (1946) 76 Cal.App.2d 501, 507-509 [173 P.2d 322].)
In view of this long and unbroken line of decisions interpreting section 726 to preclude a bank that holds a secured debt from applying sums from a nonsecured account to reduce that debt, it is clear that the bank’s conduct in this case was impermissible under section 726.
While the majority properly recognize that the bank’s exercise of a setoff violated section 726, the majority leave unstated the significant danger that such a setoff poses both for the rights of debtors and for the rights of competing creditors. By exercising such a setoff, a bank not only deprives the debtor of the immediate possession of funds to which the debtor is then entitled, but the bank may obtain funds of the debtor to which the bank would never be entitled or to which other creditors have an equal or greater claim. If, for example, the market value of the security equals or exceeds the debt or if any of the statutory provisions prohibiting a deficiency judgment are applicable, the bank would have no right to reach any assets of the debtor other than the security (§§ 726, subd. (b), 580b, 580d), but the bank could evade these limitations with impunity if it could collect the secured debt by setoff from the debtor’s nonsecured bank account. Similarly, by seizing nonsecured assets of the debtor that it has no right immediately to obtain, a bank may effectively gain an unjustifiable priority over competing creditors of the debtor who may have an equal or greater right than the bank to the proceeds of the debtor’s nonsecured bank account.
In view of the unwarranted advantages a bank may obtain if it improperly exercises such a setoff, it is important that there be adequate remedies both to compensate those who are injured by such conduct and to deter the bank from attempting to obtain such unjustified benefits in the first place. As noted at the outset, it is on the question of the appropriate remedies for the bank’s misconduct that I part company with the majority.
II
Before reaching the specific aspect of the remedy issue on which I disagree with the majority—the question whether a secured creditor that has improperly exercised a setoff retains the right to pursue the balance of the *1011debt—it is important to clarify a separate aspect of the remedy issue on which the majority may be misunderstood.
As discussed above, it is clear under the majority opinion that a bank that holds a secured debt has no right to collect that debt by setting off a nonsecured bank account of the debtor. If a bank improperly exercises such a setoff, it has unlawfully converted the debtor’s funds. In such a case, the debtor always retains the option of bringing a tort action against the bank for (1) the return of the setoff funds, (2) interest, and (3) any consequential damages that the debtor has suffered as a result of being improperly deprived of the use of its funds. Although in the present case the debtor may not have suffered significant consequential damages, in other instances a debtor may suffer substantial damages as a result of being deprived of the proceeds of a personal bank account. There should be no question but that in a such case the debtor retains the right to pursue a tort action against the bank.
I emphasize this point simply to avoid any possible misunderstanding with regard to the majority’s discussion of the debtor’s tort remedy. In this case the bank has conceded that a debtor whose funds have been improperly set off in violation of section 726 has the right to sue for the return of the funds with interest and for any consequential damages caused by the setoff, but contends that this should be the debtor’s only remedy. In rejecting the bank’s contention, the majority simply conclude that the remedy for the bank’s violation of section 726 cannot properly be limited to such an independent tort action. (See maj. opn., ante, p. 1002.) The majority, however, do not purport to hold, and should not be interpreted as holding, that a debtor does not retain the right to pursue such an action if he or she so chooses.
Ill
The question before us is whether the bank’s violation of section 726 has any consequences beyond subjecting the bank to potential tort liability for conversion. The majority recognize that because it will often not be feasible for a debtor to pursue a tort action, limiting the remedy for an improper setoff to such an action would not provide a sufficient practical incentive for a bank to comply with section 726. (See maj. opn., ante, p. 1002.) The majority opinion goes on to hold, however, that on the facts of this case the additional consequences resulting from the bank’s violation of section 726 should be confined to the bank’s loss of its security interest, and should not *1012include the bank’s loss of the ability to proceed against the debtor for the balance of the debt. (See maj. opn., ante, pp. 1002-1005.)3
I cannot agree that the appropriate alternative sanction for the bank’s misconduct in this case is simply the loss of the bank’s security interest, leaving the bank free to collect the remainder of its debt from all of the nonsecured assets of the debtor. In my view, restricting the remedy in this fashion is fundamentally inconsistent with the basic rationale of the security-first principle embodied in section 726.
As we have seen, in Walker v. Community Bank, supra, 10 Cal.3d 729, 733, this court set forth the basic principle that “a creditor’s right to enforce a debt secured by a . . . deed of trust on real property is restricted by statute. Under California law ‘the creditor must rely upon his security before enforcing the debt . . . . ’ [Citation.]” In Pacific Valley Bank v. Schwenke, supra, 189 Cal.App.3d 134, 140, Justice Brauer pointed out that the corollary to the rule requiring a secured creditor to exhaust the security before proceeding against the debtor personally is that “the debtor, by signing a note secured by a deed of trust, does not make an absolute promise to pay the entire obligation, but rather makes only a conditional promise to pay any deficiency that remains if a judicial sale of the encumbered property does not satisfy the debt. [Citation.]” (Italics added.) (See also Biddell v. Brizzolara (1883) 64 Cal. 354, 362 [30 P. 609].) In light of the conditional nature of the debtor’s obligation to pay a secured debt from nonsecured assets, California cases have long made clear that a secured creditor enjoys no unilateral right to release or waive its security interest and thereby assume the status of an unsecured creditor with the right to proceed immediately against the debtor’s nonsecured assets. (See, e.g., Barbieri v. Ramelli (1890) 84 Cal. 154, 156-157 [23 P. 1086].) Absent the consent of the debtor, a secured creditor cannot escape the statutory limitations on its right to pursue nonsecured assets of the debtor.
Given these well-established principles, the majority’s conclusion, that when a bank violates section 726 by exercising an improper setoff it loses only its security interest in the property but retains the right to proceed against the debtor’s nonsecured assets, is clearly anomalous. Under the majority’s approach, if a debtor chooses to invoke the loss-of-security *1013sanction after an improper setoff, he can do so only by giving up the basic protection of the security-first rule and permitting the creditor to reach his nonsecured assets without exhausting the security. Thus, the sanction which the majority impose on the creditor is, at best, only a mixed blessing for the debtor, and may often do little to deter banks from exercising improper setoffs.
In fact, the majority go out of their way to qualify even their limited holding regarding the loss of the bank’s security interest in a manner that substantially increases the risk that banks will exercise improper setoffs in the future. Although the majority hold that the debtor has the right to treat the bank as having waived its security interest when, as here, a bank not only improperly sets off a debtor’s funds but retains those funds after the matter is brought to its attention, the majority, while purporting not to decide the issue, go on to suggest that if a bank that has improperly offset funds promptly returns the funds when the propriety of the setoff is challenged, it might be “excessive” to impose on the bank the limited sanction of the loss of its security, even when that sanction—rather than the return of the offset funds—is the sanction that the debtor seeks to invoke. (See, ante, p. 1001 & fn. 8.)
In light of this significant qualification of the majority’s holding, a bank could rationally conclude that it faces little risk in improperly exercising a setoff against a debtor’s nonsecured bank account. If the debtor is not aware of his rights and fails to object to the bank’s conduct, the bank would be able to retain the improperly setoff funds with impunity. If the debtor is aware of his rights and brings the matter to the bank’s attention, the bank can promptly return the funds to the debtor’s account and potentially avoid any sanction. Thus, the qualification in the majority opinion largely eliminates any incentive a bank might have to ensure that its employees do not exercise a setoff in violation of the security-first rule.
These untoward consequences would be avoided if the majority, instead of attempting to fashion a truncated sanction for the bank’s violation of section 726, were simply to apply the sanctions traditionally applied against a secured creditor who violates the provisions of section 726. As Professor Hetland has observed: “The classic sanction against the creditor who fails to exhaust all his security for the same debt in a single action is harsh, yet it follows inescapably from the availability of but one action to the creditor— he waives the balance of the security and he waives any claim to the unpaid balance of the debt.” (Hetland, Cal. Real Estate Secured Transactions (Cont.Ed.Bar 1970) Antideficiency Legislation, § 6.18, p. 258, italics added.) As we have seen, because a secured debtor’s obligation to contribute his nonsecured assets to the payment of a secured debt is “only a conditional *1014promise to pay any deficiency that remains if a judicial sale of the encumbered property does not satisfy the debt” (Pacific Valley Bank v. Schwenke, supra, 189 Cal.App.3d 134, 140), once a secured creditor, because of its misconduct, has lost the right to proceed against the security, the condition under which the creditor can reach nonsecured assets of the debtor cannot be satisfied and thus it follows that the debtor cannot be held liable for any remaining balance of the debt. (See Woodward v. Brown, supra, 119 Cal. 283, 291-295; Bank of America v. Daily, supra, 152 Cal.App.3d 767, 772-773.)
Contrary to the majority’s suggestion, nothing in this court’s decision in Walker v. Community Bank, supra, 10 Cal.3d 729, is inconsistent with this conclusion. In Walker, the debt in question was secured by both real and personal property of the debtor. When the debtor defaulted, the creditor brought a judicial foreclosure action against the secured personal property and in the same action also obtained a deficiency judgment; neither the debtor nor the creditor mentioned the real property security in that action. Thereafter, the debtor sold the real property to a third party, Walker. The creditor then commenced foreclosure proceedings against the real property, but the new owner of the property filed an action to enjoin those proceedings and to quiet title, contending that the creditor, by failing to exhaust the real property security before obtaining a deficiency judgment against the debtor, had waived its right to foreclose on the realty. In Walker, supra, 10 Cal.3d 729, we sustained the new owner’s contention, holding that “where . . . there is a single debt secured by both real and personal property and the creditor elects to judicially foreclose only on the personal property, he thereby loses his security interest in the real property as against all parties even though the debtor does not raise the one form of action rule (§ 726) as affirmative defense in the judicial foreclosure proceedings.” (10 Cal.3d at P-741.)
In contending that Walker v. Community Bank, supra, 10 Cal.3d 729, suggests that the bank in this case should lose only its security interest and not its ability to collect the balance of its debt, the majority apparently rely on the fact that while Walker prohibited the creditor from judicially foreclosing on the property, the decision at the same time expressly noted that “[t]he Bank may, of course, levy execution upon any of [the debtor’s] property in order to satisfy the deficiency judgment.” (10 Cal.3d at p. 741, fn. 6.) The majority suggest that because the Walker court did not find that the creditor’s violation of section 726 prohibited it from enforcing the initial deficiency judgment, the section 726 “sanction” endorsed by Walker calls only for the creditor’s loss of its security interest and not for the creditor’s loss of the right to pursue any remaining debt.
*1015The majority overlook the fact, however, that in Walker v. Community Bank, supra, 10 Cal.3d 729, the deficiency judgment had been entered against the debtor in violation of the security-first rule only because the debtor had declined to raise section 726 as an affirmative defense in the creditor’s initial action. In that situation, the debtor, by declining to raise the section 726 issue, voluntarily waived any right to object to the entry of a personal judgment or the enforcement of the judgment against any of its nonsecured assets.
In the present case, by contrast, the bank, by unilaterally setting off the debtor’s nonsecured bank account, collected a portion of its secured debt from nonsecured assets without giving the debtor any opportunity to forestall the taking of such assets by the interposition of a section 726 defense. Just as the bank would clearly be barred from bringing a second action to collect the remainder of the debt if it had obtained the proceeds of the debtor’s bank account through an initial judicial action against the debtor, the bank should similarly be barred from seeking an additional recovery from the debtor when, without exhausting the security, it improperly seized nonsecured property without the debtor’s consent through its unilateral extrajudicial conduct.4
It is true that, on the facts of this case, the traditional sanction for a section 726 violation—the loss of the security interest and the loss of the right to pursue the balance of the debt—operates harshly, resulting in the bank’s loss of a $1 million guaranty as a consequence of its improper setoff of approximately $3,000 in the debtor’s nonsecured bank account. From the relatively small number of cases that have arisen in this setting since the McKean decision, supra, 118 Cal. 334, in 1897, however, it is reasonable to conclude that as a general rule banks are well aware that when a debt is *1016secured by real property they are required to exhaust the security before resorting to any nonsecured property of the debtor, including a personal bank account, and that, under the threat of a potentially harsh sanction, they have successfully established procedures to comply with this rule. In my view, the majority seriously err in permitting the “hard” facts of this case to lead it to depart from the usual sanction imposed in past section 726 cases.
I would affirm the judgment of the Court of Appeal.
Mosk, J., and Kennard, J., concurred.
Respondent’s petition for a rehearing was denied February 14, 1991. Mosk, J., Broussard, J., and Kennard, J., were of the opinion that the petition should be granted.
All section references are to the Code of Civil Procedure unless otherwise noted.
Furthermore, as one of the recent academic commentaries has observed, the security-first principle “protects not only the debtor but also the unsecured creditors who have access only to the debtor’s unencumbered assets; to this extent the collateral first rule serves a function akin to the statutes requiring the ‘marshalling of assets’ ([Civ. Code,] § 3433) and the ‘marshalling of liens’ ([Civ. Code,] § 2899), which were enacted in the same year as the one action rule.” (Munoz & Rabin, The Sequel to Bank of America v Daily: Security Pac. Nat’l Bank v Wozab (Cont.Ed.Bar 1989) 12 Real Prop. L. Rptr. 204, 206.)
The majority opinion recognizes that if, after improperly exercising a setoff in violation of section 726, a bank refuses a debtor’s demand for the return of the setoff funds, the bank would be precluded both from foreclosing the security interest and from proceeding on the underlying debt. (See maj. opn., ante, p. 1006.) The opinion concludes, however, that a similar complete sanction is not warranted when, as here, the debtor does not request the return of the offset funds but maintains that the improper setoff itself operated to waive the bank’s security interest and its right to collect the balance of the underlying debt.
The majority clearly err in suggesting that the debtor in this case “voluntarily relinquished the protection of the security-first rule” (see maj. opn., ante, p. 1005) or engaged in “gamesmanship” (see maj. opn., ante, p. 1005) when, after the bank improperly exercised a setoff against the debtor’s nonsecured funds, the debtor accepted reconveyance of the security but continued to assert that the bank had lost its right to pursue the remainder of the secured debt.
It was the bank, of course, that violated section 726 by unilaterally seizing the debtor’s nonsecured funds through an extrajudicial setoff that gave the debtor no opportunity to prevent the seizure of the assets by raising a section 726 defense. When the debtor, after discovering the setoff, took the legal position that the bank’s misconduct had resulted in the bank’s loss of both its security interest and the balance of the underlying debt, the debtor was relying on the holding and reasoning of the only judicial authority in point—Bank of America v. Daily, supra, 152 Cal.App.3d 767, 772-774. It was in light of the Daily decision that the bank voluntarily agreed to reconvey the secured property to the debtor, and then filed this action to attempt to limit the scope of the Daily decision. The majority clearly engage in a less than evenhanded analysis in characterizing the debtor’s conduct as “gamesmanship” or a voluntary relinquishment of the security-first rule.