“A lease of real property is both a conveyance of an estate in land (a leasehold) and a contract. It gives rise to two sets of rights and obligations — those arising by virtue of the transfer of an estate in land to the tenant (privity of estate), and those existing by virtue of the parties’ express agreements in the lease (privity of contract).” (Vallely Investments v. BancAmerica Commercial Corp. (2001) 88 Cal.App.4th 816, 822 [106 Cal.Rptr.2d 689] (Vallely).) A leasehold estate for years is a sufficient interest in real property to be security for a deed of trust that confers a power of sale affecting the leasehold after breach of the obligation so secured. (Civ. Code, § 2920.) “`[W]here a trust deed to secure a loan is taken …, the lessee’s interest under such lease is foreclosed by the foreclosure of the deed of trust.’ [Citations.]” (R-Ranch Markets #2, Inc. v. Old Stone Bank (1993) 16 Cal.App.4th 1323, 1327 [21 Cal.Rptr.2d 21].) A mortgagee who takes lawful possession of the premises from the lessee is considered an assignee. (Schonfeld v. City of Vallejo (1975) 50 Cal.App.3d 401, 421 [123 Cal.Rptr. 669], disapproved on other grounds in Morehart v. County of Santa Barbara (1994) 7 Cal.4th 725 [29 Cal.Rptr.2d 804, 872 P.2d 143]; Johnson v. Sherman (1860) 15 Cal. 287, 292-293 [“`[h]e is therefore substituted in the place of the mortgagor, who was lessee, and therefore is assignee and liable as such'”].)
1000*1000 (3) “An assignee’s liability to the landlord turns on the nature of the assignment. If the assignee takes possession of the premises but no more, privity of estate exists and he is bound by all lease covenants which run with the land. Upon a subsequent assignment, privity of estate ends and, with it, all obligation to the landlord. (Kelly v. Tri-Cities Broadcasting, Inc. (1983) 147 Cal.App.3d 666, 678 [195 Cal.Rptr. 303].) If, however, the assignee expressly agrees with the assignor to assume the obligations of the lease, far different consequences attend. The assumption agreement creates a new privity of contract between landlord and assignee, enforceable by the landlord as a third party beneficiary, regardless of whether the landlord was a party to the assumption agreement. As a consequence, the assuming assignee is required to perform all covenants of the lease for the remainder of its term, absent a release by the landlord. (Hartman Ranch Co. v. Associated Oil Co. (1937) 10 Cal.2d 232, 244-245 [73 P.2d 1163]; Rest.2d Property, Landlord and Tenant, § 16.1 (4), com. c, p. 121.)” (Vallely, supra, 88 Cal.App.4th at p. 822.)
In Enterprise Leasing Corp. v. Shugart Corp. (1991) 231 Cal.App.3d 737 [282 Cal.Rptr. 620] (Enterprise), this court found that there must be an express assumption of the contractual obligations of a real property lease to hold an assignee liable for the lease obligations. (Id. at p. 746.)[4] Lease covenants that run with the land bind and inure an assignee only as long as it remains in possession of the premises. “`”As long as he remains in possession the nonassuming lessee is bound to pay the rent, maintain the insurance, make repairs, and pay taxes, if the lease so provides. However, these obligations terminate when the assignee terminates his possession.”‘” (Enterprise, supra, at pp. 745-746, quoting Kelly v. Tri-Cities Broadcasting, Inc., supra, 147 Cal.App.3d at p. 677 (Tri-Cities); accord, Melchor Investment Co. v. Rolm Systems (1992) 3 Cal.App.4th 587, 593 [4 Cal.Rptr.2d 343].)