
265 Cal.App.2d 40 (1968)
71 Cal. Rptr. 64
UNION BANK, Plaintiff and Appellant,
v.
MAX GRADSKY Defendant and Respondent.
Docket No. 31681.
Court of Appeals of California, Second District, Division Five.
August 19, 1968.
*41 Myron W. Curzon and Dennis F. Donovan for Plaintiff and Appellant.
Josef J. Klein for Defendant and Respondent.
HUFSTEDLER, J.
Plaintiff, Union Bank ("Bank"), appeals from a judgment of dismissal, entered after the demurrer of defendant Max Gradsky ("Max") to the complaint was sustained without leave to amend. The trial court dismissed the action on the ground that section 580d of the Code of Civil Procedure shielded a guarantor of a note secured by a first deed of trust from liability for the deficiency remaining after a nonjudicial sale of the security.
[1a] The appeal presents a question of first impression in California. We hold that the creditor cannot recover from the guarantor the unpaid balance upon the note following the creditor's nonjudicial sale of the security.
The creditor's recovery is not directly barred by section 580d of the Code of Civil Procedure. It is barred by applying the principles of estoppel. The estoppel is raised as a matter of law to prevent the creditor from recovering from the guarantor after the creditor has exercised an election of remedies which destroys the guarantor's subrogation rights against the principal debtor. The destruction of the guarantor's subrogation rights follows from the combination of the creditor's election to subject the security to nonjudicial sale and the operation of section 580d, which prevents both the creditor and the guarantor from obtaining any deficiency judgment against the debtor after nonjudicial sale of the security.

Summary of the Complaint
Bess Gradsky ("Bess") on May 20, 1964, executed in favor of the Bank a note for $112,500, a first deed of trust securing the note, and a "building loan agreement" providing for the disbursement of the loan funds for construction upon Bess's land.[1] The building loan agreement was signed by Max as the general contractor. At the same time Max executed a written guarantee of Bess's obligations. Among the provisions of Max's guarantee agreement was a clause stating, "I waive ... any right to require the holder of this within *42 instrument to proceed against the maker or against any other person or to apply any security it may hold or to pursue any other remedy." The funds were disbursed as agreed, and the construction work was completed. The time for payment of the principal note was twice extended, with the written consent of Max. When the note was not paid on the maturity date as extended, the Bank caused the security to be sold at a trustee's sale. The Bank bid in the property for $112,500, its fair market value, and applied the proceeds of sale to advances for delinquent taxes, costs of sale, interest and principal on the note. There remained unpaid on the note after application of the net proceeds of sale the sum of $11,565.97, which the Bank sought to recover from Max.
The sole alleged relationship between Max and Bess at the time the guarantee was executed was that of general contractor and owner. Although their last names are the same no facts are pleaded showing that they were related to one another by blood or marriage. Max's guarantee was a "true" guarantee taken by the Bank as additional security for Bess's construction loan. We call Max's guarantee a "true" guarantee to distinguish it from a purported guarantee executed by one who is a principal obligor.[2]
Section 580d of the Code of Civil Procedure provides in pertinent part: "No judgment shall be rendered for any deficiency upon a note secured by a deed of trust or mortgage upon real property hereafter executed in any case in which the real property has been sold by the mortgagee or trustee *43 under power of sale contained in such mortgage or deed of trust."
[2] The effect of section 580d is to permit deficiency judgments only in those cases in which the creditor, by foreclosing judicially, allows the debtor the opportunity of exercising his right of redemption. Upon judicial foreclosure, the creditor can recover from the debtor whose obligation is secured by the foreclosed mortgage or deed of trust any deficiency remaining after the proceeds of sale are applied to the debt, and the debtor has a statutory right of redemption. No right of redemption exists following a nonjudicial sale of the security. Section 580d makes up, at least in part, for the loss of the debtor's right of redemption by depriving the creditor who elects the nonjudicial foreclosure or sale remedy from obtaining a deficiency judgment against the debtor. (Roseleaf Corp. v. Chierighino (1963) 59 Cal.2d 35, 43-44 [27 Cal. Rptr. 873, 378 P.2d 97].)
In enacting section 580d the Legislature obviously had in mind the two-party transaction between the creditor whose loan is secured by a deed of trust or mortgage and the debtor who gave that security for the loan to him. The more difficult question is whether the Legislature also contemplated a tripartite transaction among the debtor, the creditor and a guarantor, in which the creditor has a multiple choice of remedies, and his selection of a particular remedy in turn affects the remedies of the guarantor against the principal debtor. Did the Legislature intend section 580d to shield the debtor only from a deficiency judgment obtained by the originally secured creditor, or did it intend to protect him from all personal liability in each instance in which he has no right of redemption? Did the Legislature intend to extend section 580d protection to anyone other than the original debtor, who has no right of redemption? To answer these questions requires an examination of the remedies of each of the parties against the other and an exploration of the effect of section 580d on those remedies.
[1b] At the time of Bess's default the Bank had three options: (1) It could have brought an action for judicial foreclosure, joining Max and Bess; (2) it could have sued Max upon his guarantee for the full amount of the unpaid balance of the principal obligation without proceeding against either Bess or the security;[3] or (3) it could have realized upon the security by way of a nonjudicial sale.
*44 Had the Bank elected the judicial foreclosure remedy, no section 580d problem would have existed, because the Bank could have obtained a deficiency judgment against Bess, and she would have had a statutory right of redemption.
Had the Bank elected the second course, section 580d would not have insulated Max from liability for the unpaid balance of the debt. Section 580d begins with the words, "No judgment shall be rendered for any deficiency upon a note." An action by the Bank against Max before any resort to the security is neither an action on "a note" nor is it an action to recover a "deficiency." The action is on the guarantee, not on the note, and in absence of either judicial or nonjudicial foreclosure of the security, there exists no "deficiency." Section 580d cannot be stretched to shield Max from liability to the Bank on his guarantee before resort to the security.
Despite the fact that section 580d could not have been used defensively by Max if he had been sued by the Bank before a resort to the security, the section would have had a critical effect upon the rights of the parties because it would have limited Max's rights against Bess. To understand why this is so, we turn to an exploration of the rights Max would have acquired from the Bank had Max paid Bess's debt to the Bank before the Bank resorted to the security.
[3] Max would have thereby acquired all of the rights which the Bank had against Bess upon the application of familiar principles of subrogation: One who is neither an intermeddler nor a volunteer and who pays the obligation of another, for which the other is primarily liable, is equitably subrogated to all of the rights and to the security formerly held by the obligee against the principal obligor. (Civ. Code, *45 §§ 2848, 2849; Sanders v. Magill (1937) 9 Cal.2d 145 [70 P.2d 159]; cf. Offer v. Superior Court (1924) 194 Cal.114, 118 [228 P. 11].) [1c] Therefore, Max would have obtained by subrogation the right to pursue either judicial or nonjudicial sale of the security. If he elected the former, he could have obtained a deficiency judgment against Bess. However, Max could stand no better against Bess than could the Bank with respect to the rights he acquired by subrogation. If he elected the second remedy, section 580d of the Code of Civil Procedure would have barred his obtaining a deficiency judgment against her. (Anheuser-Bush, Inc. v. Starley (1946) 28 Cal.2d 347, 351 [170 P.2d 448, 166 A.L.R. 198]; March v. Barnet (1898) 121 Cal. 419, 423 [53 P. 933, 66 Am.St.Rep. 44].)[4]
Max's payment of Bess's debt, evidenced by a negotiable note, does not extinguish the note nor affect the security for it. (Sanders v. Magill, supra, 9 Cal.2d at p. 150.)[5] Subjecting a subrogated guarantor to the same defenses which the principal debtor could have asserted against the subrogor-creditor does not work any hardship upon the guarantor. The guarantor, like the original creditor, has an election whether to pursue judcial foreclosure, thereby obtaining a deficiency judgment, or a nonjudicial foreclosure, thereby foregoing a deficiency judgment but cutting off the debtor's right of redemption.
If the Bank elects nonjudicial sale of the security, the respective positions of the parties are substantially different from those which exist following exercise of the other options. If Max is required to pay the Bank the unpaid balance of the note, he does not thereby acquire any rights from the Bank by subrogation, because the Bank no longer has any rights against Bess, and no security remains after the sale.[6] Bess has no power of redemption. If Max, the guarantor, can successfully assert an action in assumpsit against Bess for reimbursement, the obvious result is to permit the recovery of a "deficiency" judgment against the debtor following a nonjudicial *46 sale of the security under a different label. It makes no difference to Bess's purse whether the recovery is by the original creditor in a direct action following nonjudicial sale of the security, or whether the recovery is in an action by the guarantor for reimbursement of the same sum.
If section 580d is interpreted to shield Max from liability to the Bank, the ultimate impact of loss falls upon the Bank, which had an election of remedies. If the section does not apply to Max and Max, upon payment of the debt, is able to obtain reimbursement from Bess, the ultimate impact of loss falls on Bess, who never had an election of remedies. If the section does not apply to Max and he is required to pay the deficiency to the Bank and has no right of reimbursement against Bess, the loss falls upon Max, who also had no election of remedies.
The Legislature clearly intended to protect the debtor from personal liability following a nonjudicial sale of the security. No liability, direct or indirect, should be imposed upon the debtor following a nonjudicial sale of the security. To permit a guarantor to recover reimbursement from the debtor would permit circumvention of the legislative purpose in enacting section 580d. Section 580d crosses Bess out, but the question remains: As between the Bank and the guarantor, upon whom does the ultimate loss fall?
Section 580d itself does not supply the answer, but it is an integral part of the answer which must be given. Because of section 580d neither the Bank nor the guarantor can recover a personal judgment from the debtor after a nonjudicial sale of the security. The creditor, and the creditor alone, has the option of preserving its own and the surety's rights by way of subrogation to realize a personal judgment against the debtor. The creditor has a duty to the surety not to impair the surety's remedies against the principal debtor. (Cf. Civ. Code, §§ 2810 and 2819.)[7] Upon the Bank's electing to pursue *47 a remedy which destroys both the security and the possibility of the surety's reimbursement from the principal debtor, the creditor is thereafter estopped from pursuing the guarantor for a deficiency following a nonjudicial sale of the security. The result follows not because section 580d of the Code of Civil Procedure prevents recovery of a deficiency judgment against the guarantor, but because the section prevents a deficiency judgment by the guarantor against the debtor.
The Bank relies in support of its position upon a series of cases holding that other provisions of the antideficiency legislation protect neither guarantors nor endorsers. Each of those cases is factually distinguishable from the case at bench, and none of them specifically considers the problems herein discussed.[8] Moreover, the cases interpreting section 580b of the *48 Code of Civil Procedure are of limited use in deciding a case under section 580d because the legislative purposes were not identical in enacting the two sections, as the Supreme Court explained in the Bargioni and Roseleaf cases.
There remains for consideration the question whether Max waived his defense based upon the Bank's election of remedies upon its nonjudicial foreclosure of the security. Since Max's rights in this respect do not rest on section 580d itself, as we have previously pointed out, he can by express contract or by his subsequent actions either waive or be estopped from raising his defense to the creditor's action to recover any deficiency after a nonjudicial sale. (Cf. Bloom v. Bender, supra, 48 Cal.2d at pp. 800-801; American Guar. Corp. v. Stoody, supra, 230 Cal. App.2d at pp. 394-395; Katz v. Haskell, supra, 196 Cal. App.2d at pp. 151-153.) The language of the guarantee agreement does not specifically waive the guarantor's defense based upon an election of remedies which destroys both the guarantor's subrogation rights and his right to proceed against the principal obligor for reimbursement. In absence of an explicit waiver, we shall not strain the instrument to find that waiver by implication.
The judgment is affirmed.
Kaus, P.J., and Stephens, J., concurred.
A petition for a rehearing was denied September 10, 1968, and appellant's petition for a hearing by the Supreme Court was denied October 17, 1968.
NOTES
[1]  The agreement also contains a provision permitting disbursement of $3,500 to an escrow, identified only by a number. There is nothing in the complaint describing the escrow itself. Neither party contends that the loan was used to pay any part of the purchase money of the land to be improved.
[2]  Union Bank v. Dorn (1967) 254 Cal. App.2d 157 [61 Cal. Rptr. 893] (partner individually guaranteed partnership note secured by a trust deed; Code Civ. Proc., § 580d prevented recovery from the partner-guarantor of a deficiency remaining following a nonjudicial sale of the security; guarantor was also a principal obligor). A similar result has been reached concerning the application of Code of Civil Procedure, section 580b (purchase money mortgages and deeds of trust); Valinda Builders, Inc. v. Bissner (1964) 230 Cal. App.2d 106 [40 Cal. Rptr. 735] (guarantee of faithful performance executed by persons whose alter ego was the purchaser of land could not be enforced against the guarantors; guarantors were personal obligors and their liability was confined to the security for the purchase money note); Riddle v. Lushing (1962) 203 Cal. App.2d 831 [21 Cal. Rptr. 902] (partners' individual guarantees of payment of partnership note secured by deed of trust added nothing to their liability as primary obligors). The same principle has been applied to Code of Civil Procedure, section 580a. Everts v. Matteson (1942) 21 Cal.2d 437 [132 P.2d 476] (grantees of property encumbered by a deed of trust who assumed the indebtedness evidenced by the secured purchase money note were liable as principal obligors, and their guarantee of that note added nothing to their obligations; as principal obligors they were entitled to the benefits from Code Civ. Proc. § 580a, following the creditor's exercise of the power of sale in the deed of trust).
[3]  Code of Civil Procedure, section 726 and Civil Code, sections 2809 and 2845, do not limit the Bank's action against Max. The one-action rule (Code Civ. Proc., § 726) is inapplicable to a suit by a secured creditor against a guarantor, endorser or other surety. (Everts v. Matteson, supra, 21 Cal.2d at pp. 444 to 445; Loeb v. Christie (1936) 6 Cal.2d 416, 418-419 [57 P.2d 1303].) Sections 2809 and 2845, respectively, provide that a surety's obligation must not be more burdensome than that of the principal obligor, and a surety has the right to require the creditor to exhaust his remedies against the debtor and any security before he pursues the surety or guarantor. Max specifically waived the benefits of those sections in his guarantee agreement in the Bank's favor. That waiver effectively foreclosed him from asserting those statutory rights against the Bank. (Bloom v. Bender (1957) 48 Cal.2d 793, 803 [313 P.2d 568]; American Guar. Corp. v. Stoody (1964) 230 Cal. App.2d 390, 395 [41 Cal. Rptr. 69]; cf. Heckes v. Sapp (1964) 229 Cal. App.2d 549, 552-553 [40 Cal. Rptr. 485].) In contrast, the principal obligor cannot waive the provisions of the anti-deficiency legislation (Code Civ. Proc., §§ 580a-580d), because those provisions are not solely for the debtor's benefit but are also for the protection of the public. (Freeland v. Greco (1955) 45 Cal.2d 462, 467 [289 P.2d 463].)
[4]  Max would also be bound by the one-action rule (Code Civ. Proc., § 726) because the Bank's right against Bess would have been limited by that section.
[5]  Statements to the contrary in Berrington v. Williams (1966) 244 Cal. App.2d 130, 134-135 [52 Cal. Rptr. 772], must be disregarded. Berrington relied upon cases antedating Sanders. Moreover, the observations in Berrington concerning extinction of a negotiable note upon payment by one secondarily liable thereon, are contrary to the provisions of former Civil Code section 3202 and to the provisions of Commercial Code sections 3601 and 3603.
[6]  There must be distinguished from this situation the cases involving an action against a guarantor or endorser by the creditor after the security has become valueless because it has been foreclosed by a senior encumbrancer. In the latter setting the loss of the security and the consequent loss of subrogation rights based on the security are not caused by any process of election by the creditor. E.g., see Stephenson v. Lawn (1957) 155 Cal. App.2d 669 [318 P.2d 132]. In that case the vendors of real property received as part of the purchase price a promissory note secured by a second deed of trust. The vendors transferred the note and the security for value by special endorsement to the plaintiffs. The first deed of trust was nonjudicially sold, destroying the security for the purchase money note. The court held that the plaintiffs, endorsees of the note secured by the sold-out second deed of trust, were not foreclosed from recovering personal judgment against the vendors-endorsers. The action was not under these circumstances one to obtain a deficiency judgment.
[7]  Civil Code, section 2810, provides in part: "A surety is liable, notwithstanding any mere personal disability of the principal ...; but he is not liable if for any other reason there is no liability upon the part of the principal at the time of the execution of the contract, or the liability of the principal thereafter ceases, unless the surety has assumed liability with knowledge of the existence of the defense...."

Civil Code, section 2819, provides: "A surety is exonerated ... if by any act of the creditor, without the consent of the surety ... the remedies or rights of the creditor against the principal, in respect thereto, [are] in any way impaired or suspended."
[8]  Heckes v. Sapp, supra, 229 Cal. App.2d 549, held that section 580b of the Code of Civil Procedure did not bar an action against the guarantors of a purchase money note secured by a junior deed of trust after the holders of the senior deed of trust nonjudicially foreclosed the security. The court discussed the purposes of section 580b as delineated by the cases of Bargioni v. Hill, 59 Cal.2d 121 [28 Cal. Rptr. 321, 378 P.2d 593], and Roseleaf Corp. v. Chierighino, supra, 59 Cal.2d 35, and concluded that those purposes would not be served by relieving a guarantor of personal liability. The court also relied upon Professor Hetland's article, Deficiency Judgment Limitations in California  A New Judicial Approach, 51 Cal.L.Rev. 1, 25-26, stating, "The argument for guarantor deficiency protection does not lie in the possibility that the guarantor could enforce the obligation against the principal and thus obviate the antideficiency legislation; such a possibility does not exist. The courts consistently strike down schemes aimed at avoiding the deficiency legislation by illusory changes in form. A flimsy avoidance device based upon an intermediate surety would have no chance of success." Professor Hetland cites no authority for his broad statement. He does not purport to deal with the situation in which the enforcement of a guarantee is not simply an "illusory" change in form.

Engelman v. Gordon (1966) 242 Cal. App.2d 510, 518-519 [51 Cal. Rptr. 627]. The vendors sold two lots to T Corp., for which the corporation executed two promissory notes secured by junior deeds of trust on the property sold. The senior encumbrancers nonjudicially foreclosed the security. The vendors thereafter sued the president and sole stockholder of T Corp. upon his personal guarantee, executed contemporaneously with the sale contract to the corporation. The court held that the defendant was in reality an endorser rather than a guarantor and decided that as an endorser he was not protected by Code of Civil Procedure, section 580b.
Lange v. Aver (1966) 241 Cal. App.2d 793 [50 Cal. Rptr. 847]. The vendors sold realty to E and D, and the latter gave the vendors a promissory note secured by two junior deeds of trust on the purchased property. The vendors thereafter endorsed the note and assigned the security to the plaintiff. The senior encumbrancer caused the property to be sold at a trustee's sale. When the note transferred to the plaintiff fell into default, the plaintiff presented the note to the makers and, upon their refusal to pay, sued the vendors-endorsers. The court held that the vendors' liability was not barred by the provisions of Code of Civil Procedure, sections 580a, 580b or 580d. The court very properly pointed out that the antideficiency legislation was not designed to protect the vendor from recovery upon a subsequent endorsement of a purchase money note.
Katz v. Haskell (1961) 196 Cal. App.2d 144 [16 Cal. Rptr. 453]. The seller of real property who, as part of the purchase price, received a note secured by a third deed of trust, assigned the note with recourse to the plaintiff and guaranteed the payments of the note as they matured. Upon default the plaintiff brought a judicial foreclosure action against the ultimate purchaser of the property and against the seller, who had assigned and endorsed the note to him. The court pointed out that the transaction between the "guarantor" and his assignee was not a credit transaction but a cash transaction, and there was no relationship of vendor and vendee between them.
