This is an appeal from a judgment in favor of the plaintiffs in an action to quiet title. The complaint is in two counts, in the first of which the plaintiffs, after alleging themselves to be the owners in fee simple and possessed of the tract of land involved in the action, allege that the defendant, George A. Black, claims some interest in said parcel of land adverse to the ownership of plaintiffs, which claim is without right, and the defendant has no right, title, or interest in or to any part of said premises. The second count adopts the above averments of the first count, and then proceeds to set forth two instruments in *Page 505 writing which, being recorded, are alleged to be a cloud upon the plaintiffs' title. The first of these is termed an agency agreement, wherein the plaintiffs purport to authorize and employ said defendant to act as their agent in negotiating a sale of said property. This agreement purports to be signed with the names of the plaintiffs by one Archie Hood, as agent, and by said defendant. The other agreement is one purporting to be made by the plaintiffs, through said defendant acting as their agent under the prior agreement, with one J. G. Gardner for an exchange of certain property of the latter for the said property of the plaintiffs upon certain terms. The plaintiffs allege that neither of them ever authorized said Archie Hood or the said defendant or any other person to sign their names or the name of either of them to either of said agreements, and that both of said agreements are void. Wherefore the plaintiffs pray that their title be quieted as against said defendant.
The defendant demurred to the sufficiency of this complaint, which demurrer was overruled, and he thereupon filed an answer and counterclaim, to which the plaintiffs demurred, and which demurrer the trial court sustained. Thereupon the defendant presented an amended answer and counterclaim, wherein he expressly denied that he claimed any interest whatever in the lands of the plaintiffs, but in respect to the second cause of action alleged certain facts tending to show that he had been created the agent of the plaintiffs by virtue of the first agreement set up in said second cause of action, and that by virtue of such agency he had entered into the agreement with said Gardner set forth in the plaintiffs' complaint, and had thereby become entitled to a real estate agent's commission amounting to seven hundred dollars for having produced said Gardner as a purchaser of the plaintiffs' said premises under said agreements, for which amount he prayed judgment against said plaintiffs. Plaintiffs also demurred to this amended answer and so-called counterclaim, and upon hearing said demurrer the trial court sustained the same without leave to amend, and thereupon proceeded to take testimony and make its findings of fact and conclusions of law thereon in favor of the plaintiffs, quieting their title as against said defendant. *Page 506 From the decree entered in accordance therewith the defendant prosecutes this appeal.
The only contention of the appellant discussed in his briefs upon this appeal is his contention that under and by virtue of sections 437 and 438 of the Code of Civil Procedure he was entitled to present in this action to quiet title a counterclaim for his commission claimed to have been earned under and by virtue of the two agreements set forth in the second count of the plaintiffs' complaint.
Section 437 of the Code of Civil Procedure provides that the answer of the defendant shall contain (2) a statement of any new matter constituting a defense or counterclaim. Section 438 thereof provides that "the counterclaim mentioned in the last section must be one existing in favor of the defendant and against the plaintiff between whom a several judgment might be had in the action arising out of one of the following causes of action: (1) a cause of action arising out of the transaction set forth in the complaint as the foundation of the plaintiff's claim or connected with the subject of the action; (2) in an action arising upon contract another cause of action arising also upon contract and existing at the commencement of the action."
[1] It will at once be seen that the defendant's contention that he is entitled to present a counterclaim in this action cannot be predicated upon the second subdivision of said section 438 above set forth, since this is not an action arising upon contract but is a suit in equity founded upon the plaintiff's claim of title to the lands in question. The defendant's contention must, therefore, be confined to the first subdivision of said section, and he must be able to show in it authority for the filing of such a counterclaim as he has set forth in his answer herein in an action to quiet title. It is clear both upon reason and authority that this he cannot do. The foundation of the plaintiffs' claim is their asserted ownership of and title to the premises described in their complaint. Whatever cause of action the defendant might have for commissions cannot be said to arise out of the plaintiffs' title to and ownership of said premises, and cannot be said to be in any way connected with the subject of the action, which is the plaintiffs' right *Page 507 to have their title quieted against any asserted adverse claim on the part of the defendant. The defendant by his answer asserts no adverse claim, but, on the contrary, denies that he makes any adverse claim to the plaintiffs' premises. It therefore follows that he was not entitled to assert his so-called counterclaim in this action.
The authorities fully support this view. In the case ofEngebretson v. Gay, 158 Cal. 27, [109 P. 879], which was an action to foreclose the lien of a street assessment, the supreme court held that the defendant could not assert by way of either cross-complaint or counterclaim a claim for damages for a trespass alleged to have been committed by the contractor foreclosing said lien through his having wrongfully piled dirt upon the abutting property of the defendant.
In the case of Meyer v. Quiggle, 140 Cal. 495, [74 P. 40], which was an action to quiet title, the defendant undertook to set up a cause of action for damages for the breach of a contract with the plaintiff to sink a well upon the land to which this action to quiet title related. The supreme court held that such a claim could not be made the subject of a counterclaim under subdivision 1 of section 438 of the Code of Civil Procedure, in an action to quiet title. In so holding, the supreme court cited with approval the case of National FireIns. Co. v. McKay, 21 N.Y. 191, in which case the court said: "A counterclaim when established must in some way qualify or defeat the judgment to which a plaintiff is otherwise entitled."
In the early case of Carpenter v. Hewel, 67 Cal. 589, [8 P. 314], it was held that in an action of ejectment the defendant could not set up by way of counterclaim an alleged indebtedness of the plaintiff to him for rent alleged to have accrued by virtue of a lease between himself and the plaintiff.
Under these authorities we are constrained to hold that the defendant's asserted counterclaim could not be properly pleaded or heard in connection with the plaintiffs' suit to quiet title, and hence that the trial court was not in error in sustaining the plaintiffs' demurrer to the so-called counterclaim without leave to amend. *Page 508
No other points are discussed in the briefs upon this appeal.
The judgment is affirmed.
Gosbey, J., pro tem., and Waste, P. J., concurred.
A petition to have the cause heard in the supreme court, after judgment in the district court of appeal, was denied by the supreme court on May 6, 1920.
All the Justices concurred.