This is an appeal by defendant from a judgment in favor of plaintiff.
The action was brought in the superior court in and for the city and county of San Francisco. In the complaint it is averred that on September 17,1887, plaintiff was the owner of certain described tracts of land situated in the county of San Diego; and that on said day plaintiff entered into certain contracts with defendant by which the former agreed to sell and the latter agreed to buy said tracts of land. All of said contracts were alike, except that each referred to a different tract of land; and it is averred that the terms of each were that a certain part of the purchase money should be paid on the execution of the contract (which was done), and the balance, with interest annually, in manner as provided in said contract. The contracts provide that defendant may take possession of the lands therein mentioned, and averred that he did so take possession, and continues in possession. The complaint was filed in September, 1891; and it is averred that defendant has wholly failed and refused to make any of said deferred payments, although requested so to do. The prayer of the complaint is that it be adjudged that there is due from defendant to plaintiff a certain sum of money—being the amount of said deferred payments; and that it be decreed that if said amount be not paid within thirty days after the judgment “then and from that time the defendant, and all persons holding said premises under said defendant, shall be forever barred and foreclosed of all claim, right, or interest in said *120land and premises by virtue of said agreement, and be forever barred and foreclosed of all right to a conveyance thereof, and that plaintiff be let into the possession of said premises, and that said contracts be declared null and void.” Defendant demurred to the complaint upon the ground, among others, that the court had no jurisdiction of the subject matter of the action. The demurrer was overruled; and defendant filed an answer, and also a cross-complaint to which plaintiff answered. The judgment was substantially in accordance with the prayer of the complaint.
There is no necessity of discussing the questions which arose after the overruling of the demurrer to the complaint; for it is quite clear that the court had no jurisdiction of the subject matter of the action. It is provided in section 5 of article VI of the state constitution that “All actions for the recovery of the possession of, quieting the title to, or for the enforcement of liens upon real estate shall be commenced in the county in which the real estate, or any part thereof, affected by such action or actions is situated.” Taking respondent’s own view of the nature of the action, to wit: that it is for a “ strict foreclosure,” still it is clearly an action "for the enforcement of liens upon real estate”—leaving out of view the prayer for the “recovery of the possession” of the lands. Moreover, the question has been decided adversely to respondent in Urton v. Woolsey, 87 Cal. 38, which was a case precisely like the one at bar, except that the judgment in that case decreed a sale of the lands covered by the contract. (See, also, Pacific Y. Club v. Sausalito B. W. Co., 98 Cal. 487; Fritts v. Camp, 94 Cal. 393.) The jurisdiction of the action was therefore in the superior court of San Diego; and there was no jurisdiction thereof in the superior court of the city and county of San Francisco. The demurrer to the complaint should have been sustained. And, as the cross-complaint was a mere dependency of the original complaint, it falls with the original.
*121The judgment is reversed, with directions to the superior court to dismiss the action.
De Haven, J., and Fitzgerald, J., concurred.
Hearing in Bank denied.