This is an action td foreclose a mortgage made by the defendant W. Parrish to the plaintiff *256on certain lots in the city of San Diego. Defendant, D. Choate, answered and filed a cross-complaint, in which he set up and asked to have foreclosed a vendor’s lien upon the lots described in plaintiff’s mortgage. Plaintiff demurred to the cross-complaint upon the ground, among others, that the lien set up, if any existed, was barred by sections 339 and 343 of the Code of Civil Procedure. The demurrer was overruled, and thereupon plaintiff answered the cross-complaint, alleging in substance that the said lien had been waived by Choate.
The case was tried, and the court found the facts, and, among other things, the amount due from defendant Parrish to the plaintiff and to the defendant Choate, and as a conclusion of law that Choate had a vendor’s lien on each and every part of the lands involved in the action, and had not waived the same, and that said lien was not barred by the statute of limitations. A decree was accordingly entered that the mortgaged premises be sold, and the proceeds of the sale, after paying the costs and expenses thereof, be applied: 1. To the payment of the amount found due to Choate and his costs; and 2. To the payment of the amount found due to plaintiff and its costs. From this decree and an order refusing a new trial plaintiff appeals.
The only question in the case is: Did Choate have a vendor’s lien which was prior to the lien of plaintiff’s mortgage, and was he entitled to be first paid out of the proceeds of the sale?
The facts of the case are in substance as follows: On September 12, 1888, defendants Choate and Parrish executed to one Lillian M; Cullen their joint promissory note for three thousand dollars, payable two years after date, with interest at the rate of ten per cent per annum, payable monthly, and if not so paid to be compounded. This note was given for a balance due to Cullen from Choate for the transfer by her to him of an .interest claimed by her in certain lands, including those involved in this action.
*257On September 29,1888, Choate was the owner in fee of all the lands involved herein, and on that day he sold and transferred the same by a grant deed to said Parrish for the sum of two thousand five hundred dollars, but no part of this purchase price was then or has ever since been paid by him. At the time of the transfer, and as a part of the transaction, Parrish executed and delivered to Choate a written agreement by which he undertook to pay for Choate two thousand five hundred dollars of the Cullen note, and he stipulated that “ in case I shall fail at any time to pay the interest on two thousand five hundred dollars of said note when it falls due, or shall fail to pay the two thousand five hundred dollars of the principal of said note when it falls due, then and in that case the said D. Choate, his heirs or assigns, shall be entitled to collect of me on this agreement the sum I am so in default of paying.” Parrish failed to pay any part of said sum or the interest thereon, and on September 1, 1892, Choate was compelledto pay and did pay the whole thereof.
Prior to August 5, 1891, Parrish was indebted to the National Bank of San Diego in a large sum of money, for which he had given to the bank his promissory notes. This indebtedness one J. W. Collins had assumed and undertaken to pay, and at his request, for the purpose of paying it off and transferring the indebtedness to the plaintiff savings bank, Parrish obtained from the savings bank a loan of eight thousand five hundred dollars, for which, on the day last named, he executed the note and mortgage in suit. At the time of making the loan Collins was a director of the savings bank, and acted as its general manager. He attended to the business of making its loans, and all negotiations and conversations in regard to this loan were had with him. And before the mortgage was executed he was informed by Parrish of the condition of the property to be mortgaged and that its purchase price had not been paid.
Prior to February 13, 1892, Choate learned that Par*258rish had mortgaged the property to the savings bank, and made complaint to him about his having done so before he had paid the purchase price of said lands. Parrish then informed Choate that he was fully protected by his vendor’s lien, and that the mortgage was subject to such lien. Choate was not satisfied with this, but, fearing that purchasers or encumbrancers in good faith and for value might intervene, he insisted on haying a mortgage executed by Parrish to himself. Thereupon Parrish executed to Choate a mortgage, bearing date February 13, 1892, on the lands mortgaged to the plaintiff, and certain other lands, which were also subject to a prior mortgage, to secure payment by him of that part of the Cullen note which he obligated himself to pay by his written agreement of September 29, 1888.
When that mortgage was executed it was expressly agreed between the parties to it that Choate would not, and did not, thereby waive his vendor’s lien. And at that time the value of the land involved in this action did not exceed the sum of fifteen hundred dollars, and the value of the other lands covered by the mortgage did not exceed a like sum.
On August 28, 1894, Choate, fearing that the Cullen note was about to be barred by the statute of limitations, filed a complaint to foreclose his said mortgage, making Parrish and the savings bank parties defendant, but no summons was issued, and nothing further was done in the case.
On May 26, 1895, plaintiff filed its complaint in this action, and on July 27, 1895, Choate filed his answer and cross-complaint.
The first question to be considered is, Did it appear upon the face of Choate’s cross-complaint that his right to foreclose his vendor’s lien, if any existed, was barred by the statute of limitations? If it did so appear, then the demurrer to the cross-complaint upon that ground should have been sustained, and the other questions discussed by counsel as to the waiver of the lien may be disregarded.
*259The facts are set out in the cross-complaint, and it appears therefrom that when, on September 28, 1888, Choate conveyed the land in question to Parrish, the latter ivas to pay the purchase money—two thousand five hundred dollars—on the Cullen note, which was to become due two years after its date. And he obligated himself to so pay the money by a written agreement which provided that if he should fail to pay the interest as it fell due, or the principal sum Avhen the note fell due, then Choate should be entitled to collect from him the money which he had neglected to pay.
The purchase money, therefore, became due and payable when the note matured, and a cause of action to recover it then arose in favor of Choate. It was not necessary for him to wait, before he could institute such an action, till he paid the note himself. But the note matured and the cause of action accrued more than four years before this action was commenced and the cross-complaint was filed.
Our Civil Code contains the following provisions:
“ Sec. 3046. One who sells real property has a vendor’s lien thereon, independent of possession, for so much of the price as remains unpaid and unsecured othenvise than by the personal obligation of the buyer.”
“ Sec. 2911. A lien is extinguished by the lapse of the time within which, under the provisions of the Code of Civil Procedure, an action can be brought upon the principal obligation.”
Here it appears that the time within which, under the provisions of the code, an action could have been brought upon the principal obligation had expired before the cross-cbmplaint was filed. The lien was, therefore, extinguished, and the demurrer should have been sustained.
The decree and order appealed from should be reversed and the cause remanded, with directions to the court below to sustain the demurrer to the cross-complaint.
Searls, C., and Britt, C., concurred.
*260For the reasons given in the foregoing opinion the decree and order appealed from are reversed and the cause remanded, with directions to the court below to sustain the demurrer to the cross-complaint.
McFarland, J., Henshaw, J.
Temple, J., concurred in the judgment.