Plaintiffs, in their complaint, aver that the corporate plaintiffs own a certain canal or ditch, of which the individual plaintiffs are in possession as lessees, and that without permission of plaintiffs, or any of them, defendant wrongfully entered upon the same, and without right took water therefrom, and injured the banks thereof, and threaten to continue to enter upon it and to take water therefrom, and will so enter and divert and use water therefrom, and injure and destroy the embankments and head-gates thereof.
And particularly on a day named he did enter in and upon the canal, and, with intent to injure and break said canal, raised the head-gates nearest defendant’s residence, intending that the waters should injure and destroy the canal.
They further aver that defendant will, unless- restrained, enter upon the canal, and without right, and divert water therefrom, and injure and destroy, tear down, remove the embankments and head-gates thereof. They ask that defendant be enjoined from these acts, and for damages.
The defendant answered, and also filed a cross-complaint. Plaintiffs demurred to the cross-complaint for want of sufficient facts, and on the trial objected to evidence in support of the claim of defendant asserted in the cross-complaint on the same ground. The demurrer and the objections were overruled, and the court gave judgment to plaintiffs for all of the relief demanded by them, and then awarded to defendant all the relief asked by him. From the judgment in favor of defendant, and from an order refusing plaintiffs a new trial as to the issues tendered by the cross-complaint, plaintiffs take this appeal.
By the demurrer the point is made that the cross-complaint does not state a cause of action at all, and that it does not state facts sufficient to constitute a cause of action for a cross-complaint in this action.
Both points are well taken. _ The cross-complaint nowhere shows by statement of ts that defendant owns *145or holds by right any lands which are riparian to Panoche creek. He avers that he owns three lots in section 16, and has possession and control of three other lots, and that said creek flows “through the natural channel thereof over and across the lands of defendant as aforesaid.” This would be true, though the creek only flows over the three lots of which he is possessed, and which he controls but does not own. He does not aver that he possesses or controls by right, and the presumption is that this allegation is as strong as he could make it. The presumption, therefore, is that he has taken possession of' the other three lots without right, and that the water only flows over these lots in which he has no right. A trespasser on public lands is for some purposes deemed the owner, but when one asserts riparian rights as against an upper appropriator of water he must show some right, inchoate or otherwise, to the land.
In another paragraph of the cross-complaint it is averred that defendant has a large amount of land which it is necessary to irrigate, and the only waters available for that purpose are the waters of Panoche creek. It is not intimated in any way that this large tract of land is part of the lots described, or that it is riparian to Panoche creek. In short, in the cross-complaint the defendant does not show any right to the waters of Panoche creek. But if the cross-complaint can be held to state a cause of action which might be the basis of an independent suit, it does not state a cause of action which is the proper subject of a cross-complaint in this case.
The relief sought in the cross-complaint does not defeat, overcome, or affect plaintiff’s cause of action or lessen or modify the relief to which plaintiffs are entitled. If this proposition can be tested by the result, it is fully shown by the fact that plaintiffs and defendant were each awarded all the relief they sought.
Nor does the cause of action set up arise out of the transaction set out in the complaint, nor is it connected *146with the subject of the action. The transaction is the alleged trespass of the defendant, and, if the phrase “ subject of the action” refers to the rights involved, only the claim of plaintiffs to their ditch was involved. No right to water is asserted, nor was it necessary for plaintiffs in order to make a. case to show any. The court so held in giving them the relief demanded, while finding that they had no right to water in the creek. The trespass charged did not consist in destroying or injuring the dam or other means by which the water was ■diverted from the creek, nor in diverting the water in •the creek to other uses, but was an injury to the em-bankments of the ditch and a taking of the water from -the ditch itself. Had the alleged trespass consisted •in an attempt to prevent the flow into the ditch from t4he stream, possibly the assertion of a right to have the -water flow would be considered, but no such defense - could be made here. The cause of action set up by ^plaintiffs and the rights asserted by defendant have no -reference to each other. True, there was water in the vditch, and the evidence shows that it came from Panoche -creek. But the fact that defendant had a superior right -to the water flowing in the creek would not justify him in destroying the ditch, or in taking what water he needed from the ditch at points where it passed over or near his land.
The court is directed to modify the judgment by striking out the judgment in the cross-complaint in favor of the defendant, and also by awarding to plaintiffs their costs.
McFarland, J., and Henshaw, J., concurred.