Action to quiet title to real property situated in the city and county of San Francisco. The complaint is in the usual form of actions of that type. The defendant answered and alleged that he was the owner of an undivided one-fourth of the real property of which the plaintiff claimed to be the sole owner. In addition to his answer, he filed a cross-complaint making the plaintiff a cross-defendant, and bringing in and making a party to said action, Retta Tuttle Thomson, the mother of the plaintiff and defendant, the two parties named in the original complaint being brothers. In his cross-complaint, the de *674 fendant claimed that under a verbal agreement with his mother on or about the 25th day of July, 1925, in consideration of certain monthly payments to be made by him to his mother, he “would then and there and from said aforementioned date, have a one-fourth (¼) interest”, subject to a life estate to his mother, in the real property described in the complaint. He further alleged that, after the making of said agreement, he and his mother resided on said land as their home until the mother conveyed the whole of said real property to the plaintiff, who thereafter ejected defendant from said real property. In a separate count, the defendant alleged that the plaintiff and his mother were indebted to defendant in the sum of $1680 for money had and received by them to and for the use of the defendant. An answer to this cross-complaint was filed by the plaintiff and his mother in which they denied the material allegations of the cross-complaint. They also raised by answer, as they had previously done by demurrer, the question as to whether the second count of the cross-complaint was barred by the provisions of section 442 of the Code of Civil Procedure. By this we understand that they intended to raise and did raise the question as to whether a cross-complaint for money had and received would lie in an action to quiet title.
Prior to the action being called for trial, and within the time provided by law and the rules of said court, the defendant demanded a trial by jury, which the court denied. The case was subsequently tried by the court without a jury, and resulted in a judgment in favor of the plaintiff and his mother, from which the defendant has appealed.
Practically the sole point made by the defendant is that the court erred in denying him a jury trial in this action.
Ae we have before stated, the action of the plaintiff is an action to quiet title to real property. The plaintiff was, at the time of the commencement of the action, and for a long time prior thereto had been in possession of said, real property. In the answer and cross-complaint defendant avers that he was at a time some two and one-half years pi’ior to the commencement of the action in possession of said real property and that plaintiff ousted him of such possession.
*675
The action to quiet title to real property, and by subsequent amendment to personal property, is provided for by section 738 of the Code of Civil Procedure. This is a statutory action, and in the early case of
Curtis
v.
Sutter,
The statute which was the subject of this comment by Mr. Justice Field was section 254 of the Practice Act, which is the same as the original section 738 of the Code of Civil Procedure, except that the section of the Practice Act limited the action to quiet title to one in possession of real property. Section 738 of the Code of Civil Procedure makes no such limitations and under its provisions an action to quiet title may be brought by the owner of land even if he is out of possession.
(Cobe
v.
Crane,
In
Donahue
v.
Meister,
In
Angus
v.
Craven,
In
McNeil
v.
Morgan,
In that case the court cites with approval the case- of
Johnson
v.
Peterson,
In the case of
Cobe
v.
Crane,
These authorities establish the following principles of law respecting the nature and character of an action to quiet title.
(1) In a simple action to quiet title when the possession of the property is not involved, it is an equitable action.
(2) When the right of possession is involved, the nature of the action, that is whether it is cognizable in an action at law, or in a court of equity, depends upon the following facts and circumstances.
(a) If plaintiff is in possession and no claim is made that he has ousted the defendant of possession, the action is equitable and triable by the court without a jury.
(b) If plaintiff is in' possession and defendant by answer or complaint avers that he was recently ousted of possession of the property involved, the action is in reality one at law, and the parties thereto are entitled to a jury trial.
(c) If the plaintiff is out of possession and seeks by an action to quiet title to recover possession, the action is triable in a court of law.
(d) If plaintiff is in possession, and the defendant by answer or cross-complaint seeks to eject the plaintiff and recover possession, the action involves both equitable and legal issues. The issues arising out of plaintiff’s cause of action are equitable, and those resulting from defendant’s answer and cross-complaint are legal. In such an action the plaintiff is entitled to have the equitable 'issues tried by the court without a jury, and the defendant is entitled to have the legal issues submitted to a jury.
In the present action, the plaintiff was in possession of the real property at the commencement of the action. The defendant claimed to be entitled to possession and averred in his cross-complaint that plaintiff ousted him from possession some two and a half years before the commencement of said action. Defendant seeks to bring this ease within the rule announced in Donahue v. Meister, supra, where the plaintiff ousted the defendant of possession, and then almost immediately brought his action to quiet title against defendant. Defendant in that action by answer alleged his possession and plaintiff’s ouster of defendant *682 from possession. As we have seen, the court in that action held that plaintiff could not oust the defendant of possession and turn around and bring an action to quiet title, and in that manner deprive the defendant of the right to a jury trial to determine the right of possession. The court held the action in its entirety was an action at law. In the present case, the defendant, it is true, avers that he was entitled to possession, and that while he was in possession ho was ousted by plaintiff. But he admits in his answer that plaintiff had been in possession of the property involved for some two and a half years prior to the commencement of the action. He had ample opportunity during that period of time to test his right to possession in an action in ejectment which he failed to do. After this long delay, he cannot by merely alleging that he was ejected from said real property by plaintiff, convert the action to quiet title instituted by the plaintiff into an action for possession and thus oust the court of its equitable jurisdiction to try the issues arising under plaintiff’s complaint to quiet title. These issues the plaintiff was entitled to have tried by the court without a jury. On the other hand, the defendant’s cross-complaint stated a cause of action in the nature of an action in ejectment and presented purely legal issues cognizable in a court of law. We, therefore, have for trial in the same action both equitable and legal issues. The procedure to be followed when such a condition exists has been indicated by Mr. Justice Henshaw in a concurring opinion in the case of Angus v. Craven, supra (p. 699), in the following apt language: “Under our system, equitable and legal rights are determined in the same forum. It is within the discretion of the court to control the order of proof upon the issues joined. In the natural order, before defendant was entitled to a hearing upon the equitable issues tendered, she must defeat plaintiffs upon the equitable issues presented by them. This was the view of the trial court, and in pursuance of it, it took to itself, as was proper, the determination of these equitable matters. The result was, that it found defendant’s deeds to have been' forgeries. Had it reached the opposite conclusion, then defendant might with right have insisted -that the remaining issues of law be tried before a jury. But that time never arrived, and I do not concede the right of a litigant to oust *683 a court of equitable jurisdiction in an action of purely equitable cognizance, merely by tendering additional issues which are triable at law before a jury. It is sufficient if a jury be had when those issues come to trial.”
This procedure, as indicated above, was followed substantially by the trial court in the present action. It first passed upon the equitable issues presented by plaintiff’s complaint to quiet title and defendant’s answer thereto. Having determined these issues in favor of the plaintiff— that is, having found that the plaintiff was the owner of said real property and that defendant had no interest therein, there was nothing further for the court to consider. It necessarily followed, if plaintiff was the owner of said real property at the time the defendant claims he was illegally ejected therefrom and entitled to the possession thereof, that defendant’s action by cross-complaint must fail. Had the court found against plaintiff in the action to quiet title, then it would have been its duty to try the issue of ejectment under defendant’s cross-complaint. But as Mr. Justice Henshaw said: “That time never arrived,” and it was only that issue which the defendant was entitled to have tried by the jury. Under these circumstances, the trial court did not err in denying defendant’s demand for a jury trial.
A further claim is made by defendant that his demand for a jury should have been granted, based upon the second count of his cross-complaint for money had and received. This was a' purely legal right, and entitled the defendant to a jury trial if the subject-matter of said count was a. proper matter to be litigated by means of a cross-complaint. This count simply set forth a cause of action for money had and received. It in no way related to or depended upon any transaction upon which the action to quiet title was brought, nor did it affect any property to which the action related. It failed to meet the requirements of section 442 of the Code of Civil Procedure. A mere money demand unrelated to plaintiff’s cause of action is not a proper subject for a cross-complaint in a quiet title suit.
(Meyer
v.
Quiggle,
The judgment is affirmed.
Langdon, J., Thompson, J., Waste, C. J., Shenk, J., and Seawell, J., concurred.
