
64 Cal.App.2d 175 (1944)
BANK OF AMERICA NATIONAL TRUST AND SAVINGS ASSOCIATION (a National Banking Association), Respondent,
v.
HIRSCH MERCANTILE COMPANY (a Corporation), Appellant.
Civ. No. 3318. 
California Court of Appeals. Fourth Dist.  
Apr. 28, 1944.
 Dearing & Jertberg and Lawrence L. Larrabee for Appellant.
 W. H. Stammer and Galen McKnight for Respondent.
 GRIFFIN, J.
 This is an action for declaratory relief in which respondent seeks a judgment defining and declaring the rights and duties of the appellant and respondent under a promissory note, trust deed, lease, subordination agreement, and trustee's deed affecting the title and right to possession of a certain parcel of real property in Fresno and the right *176 to receive payments under the subordination agreement. Appellant filed its answer setting up additional documents affecting the rights of the parties, an assignment of rents made to respondent, a modification of the lease, a letter addressed by respondent to appellant, and appellant's reply thereto. It likewise prayed for a judgment declaring and determining the rights and interests of each of the parties under the documents above described. Since the answer of appellant admitted all of the material facts of the complaint but set up additional facts which must be here deemed to be true, and since mere legal conclusions and claims of the parties are not a part of the factual picture, we will outline the facts as they appear through the admitted facts in the complaint and the facts alleged in the answer.
 On May 1, 1932, Ka Ra Investment Company, hereinafter referred to as Ka Ra, was the owner of certain real property in Fresno, with a store building situated thereon. On that day Ka Ra executed to respondent its promissory note for $187,750, and to secure that note it executed a trust deed to the real property to Corporation of America, as trustee, and to respondent, as beneficiary, which trust deed was recorded June 7, 1932. In addition to the usual provisions it also provided that upon default of the trustor the beneficiary could record a notice of default in accordance with section 2924 of the Civil Code, and that the trustee could sell the property in the manner required by law. On May 20, 1934, the entire amount evidenced by the promissory note and secured by the trust deed became due, and thereafter Ka Ra was in default. On June 27, 1935, Ka Ra executed and delivered to appellant a lease of the real property for the period from September 1, 1935, to August 31, 1955. It provided that the lessee should pay as rental a percentage of the gross receipts derived from the lessee's business, and provided no fixed or minimum rental. On July 23, 1935, Ka Ra executed an assignment of all rentals to become due under the lease to respondent. On July 26, 1935, appellant and respondent entered into the following subordination agreement the interpretation of which is the main source of contention in this case. It provides generally as follows:
 "SUBORDINATION AGREEMENT"
 "Whereas, Hirsch Mercantile Company ... as Lessee, is about to execute a certain lease in which the Ka Ra Investment *177 Company is designated as Lessor, dated the 27th day of June, 1935, and covering the" property here involved, "a copy of which lease is hereunto annexed and made a part hereof; and"
 "Whereas, Bank of America National Trust and Savings Association is the owner and holder of a note secured by a deed of trust constituting a first lien on the aforementioned premises; and"
 "Whereas, Hirsch Mercantile Company desires the said Bank of America National Trust and Savings Association to subordinate its deed of trust to the aforesaid lease; and"
 "Whereas, Bank of America National Trust and Savings Association is willing to subordinate its said lien in the manner and subject to the terms and conditions hereinafter set forth;"
 "Now, Therefore, in consideration of the execution by Hirsch Mercantile Company, as Lessee, of the aforesaid lease, and in consideration of the faithful performance by said Hirsch Mercantile Company of all the terms and conditions of said lease therein provided to be kept and performed by the said Hirsch Mercantile Company, including the prompt payment of all rent in said lease provided to be paid by said Hirsch Mercantile Company, Bank of America National Trust and Savings Association hereby subordinates the aforesaid deed of trust to the aforesaid lease, subject, however, to the following terms and conditions, to wit:"
 "First: This subordination shall only be effective for a period of ten (10) years, and shall terminate in the manner herein provided, but in any event at the end of ten (10) years from the date hereof."
 "Second: During the first five (5) year period of this subordination agreement, it shall only be terminated by failure on the part of Hirsch Mercantile Company to keep and perform all the terms and conditions of the aforementioned lease between the Ka Ra Investment Company and Hirsch Mercantile Company, including the prompt payment of all rent due or to become due under the terms of said lease. Hirsch Mercantile Company shall have the right and the privilege to terminate this subordination agreement at the *178 end of the first five (5) year period hereinabove referred to provided that it shall give written notice of such election to terminate at least thirty (30) days prior to the expiration of said first five (5) year period and if it so elects to terminate this agreement and serves such written notice of such election as hereinabove provided for, it shall have six (6) months from and after the termination of said first five (5) year period in which to vacate said premises, provided, however, that the rental during said six-month period shall be computed in accordance with the terms of said lease. In event no such election of termination is served upon Bank of America National Trust and Savings Association, Hirsch Mercantile Company agrees that it shall pay or cause to be paid to said Bank of America National Trust and Savings Association a sum of not less than Thirty-One Thousand Two Hundred Fifty Dollars $31,250.00), during each and every year of said last five (5) years of said ten-year period, in twelve (12) equal installments annually, payable monthly, although the rental under the terms of said lease be less than Thirty-One Thousand Two Hundred Fifty Dollars $31,250.00) per annum each or any year or years of said second five-year period."
 "It is agreed between the parties hereto that the present existing deed of trust may be renewed from time to time as agreeable to Trustor and Beneficiary therein named at any time prior to the outlaw date of note secured by said Deed of Trust to be renewed, by a new deed of trust comparable in terms with the present or then subsisting deed of trust and such deed of trust thus renewed shall be superior and prior in right and estate to the lease hereinabove referred to but subject, however, to all the terms and conditions of this agreement."
 "Third: In the event that any of the above mentioned conditions of default occur, Bank of America National Trust and Savings Association may, at its option declare this subordination agreement terminated, and within a period of ninety (90) days from said declaration the said Bank of America National Trust and Savings Association may proceed to foreclose its deed of trust in the same manner and to the same extent as if this subordination agreement had never been executed, and in such event all rights of Hirsch Mercantile Company by virtue of this subordination agreement shall cease and terminate. *179"
 "Fourth: It is agreed that rent under the aforesaid lease may commence on October 1, 1935, or as soon thereafter as the premises are fit for occupancy."
 "Fifth: It is agreed that at any time during the existence of this subordination agreement the owner of the property described in the aforesaid lease may make payment in full of the obligation secured by the aforesaid deed of trust, whether the same be due or not, and without the payment of any premium. Upon such payment in full, all responsibility of the parties hereto with regard to this subordination agreement shall cease and terminate."
 The lease became effective on August 22, 1935, and was recorded on the same day. The assignment of rents by Ka Ra to respondent was recorded on August 30, 1935. On October 1, 1935, appellant entered into possession of the real property under the lease, and the rental under the lease commenced on that date. Appellant has been ever since, and now is, in possession of the property under the provisions of the lease. On September 22, 1937, with the consent of respondent, appellant and Ka Ra entered into a modification of the lease which increased the rent for the period from October 1, 1937, to July 25, 1940, and fixed a minimum rent for that period of $29,000 per year. It also fixed the portions of the building which appellant was required to use in its business. Appellant has performed all of the terms and conditions of the lease as modified. It gave no notice of termination of the subrogation agreement or of the lease within five years of the date of the execution of the subordination agreement. It commenced the payment to respondent of the $31,250 per year provided for in the subordination agreement on July 27, 1940, and has continued to pay that sum ever since under protest. Ka Ra continued in default under the promissory note and trust deed. On June 15, 1941, there was due on the promissory note and trust deed the full principal, together with interest, taxes and advances, amounting in all to $236,246.50. On June 14, 1941, respondent mailed a letter to appellant reciting the fact that respondent, on June 16, 1941, intended to record a notice of default under the provisions of the trust deed and sell the real property unless all sums secured thereby were paid. Appellant did not answer that letter until after the real property was sold and conveyed by the trustee to respondent. On June 16, *180 1941, respondent recorded a notice of default and election to sell the real property to satisfy the obligations of Ka Ra under the promissory note and trust deed. The Corporation of America, as trustee, sold the property and respondent bought it at the trustee's sale for $150,000. The trustee's deed was recorded on October 18, 1941. On November 14, 1941, appellant wrote a reply to respondent's letter of June 14, 1941, enclosing with it a check for the monthly installment of the $31,250 annual payment required by the subordination agreement. The letter acknowledged receipt of the notice of default and the intended sale under the trust deed, and informed the respondent that the appellant "believes that its obligation to make payment under the terms of the subordination agreement terminated upon purchase by you of the property at the foreclosure sale. The undersigned, however, transmits herewith its check ... in the amount of $2,604.17 ... In making payment in the amount above stated, or any future payments in amounts equal to the amount specified in the subordination agreement, the undersigned pays under protest the amounts included in the above sum ... in excess of the amounts required to be paid under the terms of said lease as modified ..." Since that time appellant has paid the amount required under the subordination agreement, but accompanied each check with a letter similar to the one above mentioned.
 The foregoing are the undisputed facts upon which the rights and obligations of the parties were determined by the trial court and upon which the judgment of the trial court must rest. Upon these facts the parties in their pleadings made the following contentions:
 Respondent contended that by the provisions of the subordination agreement the rights of the parties under the promissory note and trust deed were subordinated to appellant's lease for a period of ten years only, upon the condition that appellant should perform the provisions of the lease and pay to respondent the minimum sum of $31,250 per year during the last five years of that period; that the subordination of the rights under the trust deed to the lease will cease and terminate on July 26, 1945, at the end of the ten-year period specified in the subordination agreement; that respondent is entitled to the payment by appellant of the rentals under the lease as modified, but in any event to the minimum amount of $31,250 per year specified in the subordination agreement; *181 and that on July 26, 1945, respondent will be entitled to the immediate possession of the real property.
 Appellant claims that the subordination agreement was in full force and effect up to the time of the sale of the real property to the respondent by the trustee; that it operates to completely subordinate the title acquired by respondent at the trustee's sale to the lease for the full term specified in the lease and that it has no further force or effect; that by purchasing the property at the trustee's sale respondent acquired the title to the real property subject to the lease as modified, for the full term of the lease, expiring on September 30, 1955; that appellant's obligation to make further payments in the sum of $31,250 each year under the provisions of the subordination agreement terminated upon the purchase of the real property by respondent at the trustee's sale; and that thereafter appellant is only required to pay the rentals specified in the lease. In support of these contentions appellant cites the rule in volume 25 California Jurisprudence, page 94, section 78 that "When a transfer of the property through a sale under a deed of trust occurs, the deed ceases to exist and there is then no encumbrance on the property by virtue thereof," and in this connection cites the general rule that a lease executed prior to a mortgage or trust deed is superior to the mortgage, and the title acquired on foreclosure of the mortgage will be subject to the lease. (Enos v. Cook, 65 Cal. 175 [3 P. 632]; Security-First National Bank of Los Angeles v. Marxen, 28 Cal.App.2d 446 [82 P.2d 727]; San Mateo County Bank v. Dupret, 124 Cal.App. 395 [12 P.2d 669].) It is therefore argued that under the above cited cases, the deed of trust herein ceased to exist after the foreclosure sale, and that the priority of the subordination agreement must therefore be determined as of the time of the sale, and the rights of the parties are measured as of that time.
 [1] In view of the fact that there was no denial of any of the material facts in either the complaint or the answer, the motion for judgment on the pleadings was an appropriate remedy for the determination of the rights of the parties, and the conflicting conclusions of the parties as to their rights and obligations based upon those facts raised no issue requiring a trial. (Northern Light M. Co. v. Blue Goose Mining Co., 25 Cal.App. 282 [143 P. 540]; Davies v. Ramsdell, 40 Cal.App. 424 [181 P. 94]; McNew v. Mulcahy, 24 *182 Cal.App.2d 656 [76 P.2d 143]; Griffin v. County of Colusa, 44 Cal.App.2d 915 [113 P.2d 270].) Respondent moved for a judgment on the pleadings. The motion was regularly heard and argued by both parties and it was conceded that the trial court was required to accept as true all allegations of fact in the complaint admitted by the answer and all allegations of fact in the answer. Appellant did not at that time dispute the propriety of the motion or the trial court's right to enter judgment upon it but contended that the judgment should be in accordance with the claims of appellant. The trial court granted the motion for judgment on the pleadings and entered a judgment which was in fact a judgment in favor of respondent, which in effect followed the contentions and legal theory of the rights of the parties as advanced by respondent.
 [2a] The trust deed was a first lien and incumbrance on the real property. Respondent never waived its primary and superior rights except by the express terms of the subordination agreement. That agreement recited that respondent was willing to subordinate its rights under its trust deed only in the manner and subject to the terms of that agreement. The agreement specifically provided that the subordination of the trust deed to the lease should only be continued for a period of ten years and should terminate in any event at the end of ten years. It then provided four additional methods for termination of the agreement by act of the parties within the ten-year period. It is clear that the parties themselves carefully and expressly provided for the exact method for terminating the subordination agreement. It expressly provided that the subordination could be terminated by a trustee's sale, but only in the event that appellant was in default. No other method of termination in the event of trustee's sale was provided. Therefore, in the absence of any termination within the ten-year period by act of the parties, the agreement and the subordination it afforded were to continue for a period of ten years and then were to expire by its own terms. In the light of the facts pleaded, it is unquestioned that respondent's trust deed was originally prior and superior to appellant's lease. Under such circumstances a sale under the trust deed would terminate and cut off all rights in the real property which were created after the recording of the trust deed. (Metropolis Tr. & Savings Bank v. Barnet, 165 Cal. 449 [132 P. 833].) Appellant's only right to possession *183 of the real property after the execution of the trustee's deed to respondent, must rest alone upon the subordination agreement and the rights therein specifically granted to appellant, which alone can give that lease effect as against the rights of the purchaser at the trustee's sale. Appellant's right to possession, therefore, has ceased except for the protection afforded that possession by the subordination agreement. The subordination afforded by the agreement was granted only in the manner and subject to the terms and conditions of the agreement, and the first term of that agreement is that the subordination shall only be effective for ten years and shall terminate in any event at the end of ten years. In consideration of that period of subordination, appellant agreed to pay respondent $31,250 during each year of the last five years of the period. It therefore seems plain that under the terms of the agreement, the subordination of the rights under the trust deed to those under the lease was to continue for ten years and no longer. The sale and execution of the trustee's deed did not affect or terminate the subordination agreement. It still remained as an existing agreement affecting the right to the possession of the real property and the obligations of the parties.
 In Tanner v. Title Insurance & Trust Co., 20 Cal.2d 814 [129 P.2d 383], the Supreme Court applied and enforced the provisions of a subordination agreement after a sale and conveyance by the trustee, and determined the rights of a purchaser at the trustee's sale under a lease subordinate to the trust deed in accordance with the terms of the subordination agreement. That such a limited and conditional subordination is valid and operates to subordinate in accordance with its conditions was directly decided in Cummings v. Jackson (1897), 55 N.J.Eq. 805 [38 A. 763].
 The agreement itself lends no support to appellant's view that it ceased to be a document under which payments were to be made after the trustee's sale. Its express terms required the payment to be made "each and every year of said last five years of said ten-year period." These payments are directly made a condition of the subordination, and without the payment required, appellant would not be entitled to any subordination. The subordination agreement was just as much a document affecting the title and right to possession of the real property as was the lease. Without it the lease *184 had no validity as against the trust deed or the purchaser at the trustee's sale. The subordination agreement remained an operative and effective instrument regulating the rights of the parties, and subordination being clearly a limited and conditional subordination, the respondent, as purchaser at the trustee's sale, took the title subject only to the limited and conditional subordination granted by the agreement. [3] The title of a purchaser at a trustee's sale relates back to the date of the trust deed. (Carpenter v. Smallpage, 220 Cal. 129 [29 P.2d 841, 30 P.2d 995]; Penryn Fruit Co. v. Sherman-Worrell Fruit Co., 142 Cal. 643 [76 P. 484, 100 Am.St.Rep. 150]; Central Construction Co. v. Hartman, 7 Cal.App.2d 703 [47 P.2d 484].) [2b] Appellant could have no right at all to possession under its lease unless the subordination agreement was still effective and an integral part of the chain of title. The cases cited by appellant are not opposed to this construction.
 The trial court correctly determined that respondent was entitled to the payment of the rentals under the lease and to the minimum payment of $31,250 per year specified in the subordination agreement. That agreement granted a subordination only subject to certain terms and conditions, one of which was that in the event no election of termination was served upon respondent, the appellant agreed that it would pay $31,250 during each and every year of the last five years of the ten-year period in twelve equal installments. This was a definite consideration for the limited subordination granted, and the payments specified in the subordination agreement were required to be made without exception and were to be paid whether or not the rental under the lease was less than that amount. This is a reasonable interpretation of the agreement and the judgment of the trial court correctly declares the rights of the parties in strict accordance with the provisions of the documents upon which those rights rest. It therefore cannot be disturbed on appeal. (Johnston v. Landucci, 21 Cal.2d 63 [130 P.2d 405, 148 A.L.R. 1355]; Estate of Northcutt, 16 Cal.2d 683 [107 P.2d 607].)
 Judgment affirmed.
 Barnard, P. J., and Marks, J., concurred.
