
71 Cal.2d 261 (1969)
ART C. KISTLER et al., Plaintiffs and Appellants,
v.
ANTHONY D. VASI et al., Defendants and Respondents.
Supreme Court of California. 
June 18, 1969.
 Hurwitz, Hurwitz & Remer, Robert R. Hurwitz and James B. MacDonald for Plaintiffs and Appellants.
 Jordan, Dodge & Loveridge, Dodge & Loveridge, Paul F. Loveridge, Henry Hill, Vaverka & Price and Donald R. Price for Defendants and Respondents. *262
 TRAYNOR, C. J.
 Plaintiffs appeal from a judgment for defendants in an action to recover the balance due on a promissory note. The note was secured by a second deed of trust on real property, but the security had been exhausted by a sale under the first deed of trust. The trial court granted defendants' motion for summary judgment on the ground that the undisputed facts established that Code of Civil Procedure section 580b barred any recovery. [1] We agree with plaintiffs' contention that section 580b does not bar recovery in this case.
 Plaintiffs are real estate brokers who acted for both parties in the negotiation of an exchange of an apartment building owned by defendants for two unimproved lots owned by the Agajanian Investment Corporation and Santa Anita Investments, Inc. The exchange agreement was executed on June 24, 1965. The parties valued the apartment building at $188,000 and the two lots at $350,000. To compensate for the difference in value, defendants executed a note for $144,500 secured by a first deed of trust on one of the lots in favor of Santa Anita and a second note for $17,500 secured by a second deed of trust on the same lot in favor of plaintiffs. The other lot was unencumbered.
 Each party to the exchange agreed to pay plaintiffs a commission of 5 percent of the value of its property. Defendants paid in cash the commission they owed plaintiffs. In lieu of a cash payment of the commission owed by Agajanian and Santa Anita, plaintiffs accepted defendants' note for $17,500 secured by the second deed of trust. The amount owed by defendants to Agajanian and Santa Anita was correspondingly reduced. In effect, defendants borrowed the amount of the $17,500 commission from plaintiffs and used it as part of the purchase price. The facts thus parallel those in Bargioni v. Hill (1963) 59 Cal.2d 121 [28 Cal.Rptr. 321, 378 P.2d 593].
 In the Bargioni case we held that when the price of property is reduced by the amount of the commission the seller owes to the broker and the buyer executes a note secured by a second deed of trust to the broker for the amount of the commission, the broker is a third-party lender of purchase money. Accordingly, we concluded that section 580b as it then read precluded a deficiency judgment in favor of the broker after the security had been exhausted by a sale under the first deed of trust. (See also Brown v. Jensen (1953) 41 Cal.2d 193, 197-198 [259 P.2d 425].) *263
 After the Bargioni case was decided, the Legislature amended section 580b. It now provides: "No deficiency judgment shall lie in any event after any sale of real property for failure of the purchaser to complete his contract of sale, or under a deed of trust, or mortgage, given to the vendor to secure payment of the balance of the purchase price of real property, or under a deed of trust, or mortgage, on a dwelling for not more than four families given to a lender to secure repayment of a loan which was in fact used to pay all or part of the purchase price of such dwelling occupied, entirely or in part, by the purchaser." (Italicized parts added by 1963 amendment.)
 The amendment limits the protection given vendees against nonvendor purchase money lenders to vendees of defined residential property. Since the property in this case is unimproved commercial property, section 580b no longer precludes third-party lenders of purchase money for such property from obtaining a deficiency judgment.
 Defendants contend, however, that even if plaintiffs are not precluded from recovering a deficiency judgment as lenders, they are also vendors within the meaning of section 580b and are therefore barred from recovering a deficiency judgment regardless of the character of the property involved. Defendants point out that the note and deed of trust plaintiffs accepted was given to discharge Agajanian's and Santa Anita's obligation as vendors and they conclude that therefore it must be deemed to be a note and deed of trust given to the vendors. To hold otherwise, they contend, will open the door to evasion of the protection that section 580b was enacted to provide.
 The answer to this contention is that under the plain language of the 1963 amendment to section 580b plaintiffs are lenders and not vendors. [2] That amendment expressly distinguishes between lenders of purchase money and vendors and contemplates that the parties to a sale of real property, other than the defined residential property, may freely elect to arrange for the financing of the purchase price in ways that may wholly or in part limit the vendee's protection from deficiency judgments. If the parties wish to afford full protection to the vendee, they may provide that all security instruments be given to the vendor, in which case subsequent assignees from the vendor would take subject to section 580b. If the vendor is not willing to accept such extensive risks, however, he may insist that all or part of the purchase price *264 be financed by third parties, whose remedies are not affected by section 580b. Moreover, in such a case it is immaterial whether the third party who assists in the financing makes a payment of part of the price to the vendor in exchange for the vendee's note and deed of trust or, as in this case, discharges an existing obligation of the vendor in exchange for the vendee's note and deed of trust. (Bargioni v. Hill, supra, 59 Cal.2d 121, 123-124.)
 The parties could have chosen another method for the payment of plaintiffs' commission that would have afforded defendants the protection of section 580b. Thus, defendants could have given the note and deed of trust to Agajanian and Santa Anita with the understanding that they would in turn assign them to plaintiffs and guarantee payment. Such a transaction, however, would have been substantially different from the one the parties entered into, for it would have afforded defendants protection against a deficiency judgment at the risk of Agajanian, Santa Anita, and plaintiffs. It is reasonable to assume that had defendants bargained for the protection of section 580b with respect to plaintiffs' note and deed of trust, they would have given some quid pro quo.
 Since the note and deed of trust for plaintiffs' commission was given by defendants, not to a vendor but to a third-party lender of purchase money for commercial property, defendants are precluded by the express terms of the 1963 amendment to section 580b from invoking the protection of that section against a deficiency judgment.
 The judgment is reversed.
 McComb, J., Peters, J., Tobriner, J., Mosk, J., Burke, J., and Sullivan, J., concurred.
