delivered the opinion of the court:
*218The plaintiff, as a senior appropriator of water from a natural stream for purposes of irrigation, brought this action to restrain the wrongful diversion of water by the two defendants, junior appropriators from the same stream, which, if permitted, would be, plaintiff says, to his injury. Each of the defendants filed a separate demurrer to the complaint upon the ground that it did not state facts sufficient to constitute a cause of action. The abstract does not show that any ruling was made upon these demurrers.
Afterwards the defendants filed separate answers to the complaint, that of Loggie containing a general denial of some of its material averments, among them that of plaintiff’s ownership, and certain affirmative allegations to the effect that he never has diverted, and does not propose to divert, any water from the stream from which plaintiff obtains his supply, and a further allegation, the materiality of which is not apparent, that the decree mentioned in the complaint, which determined the relative priorities of the parties, awarded to persons other than plaintiff rights superior to his. The answer of de^fendant Vance contained a general denial of most of the allegations of the complaint, including that of plaintiff’s ownership, and by way of counterclaim, or cross-complaint, alleged that plaintiff’s appropriation, though under the decree pleaded by plaintiff prior in point of time to defendant’s appropriation, was used by the plaintiff as a cloak for making a wasteful and extravagant application of the waters of the stream to the injury of the defendant, by reason whereof the defendant was damaged.
The affirmative matters in the answer were denied in the respective replications. Upon the issues thus made up,, trial was had by the court without a jury-
*219After oral testimony had been produced by the plaintiff tending to establish material allegations in his complaint, in order to show his own ownership and the relative priority rights of the parties, he offered the decree of the court in the matter of the adjudication of water rights in the water district in which the stream and the ditches of the parties were situate, and under the objection of the defendants to its introduction upon the ground that it was incompetent, irrelevant and immaterial, the court rejected it. Although the trial had not ended, and plaintiff apparently was not through with his proof, the court of its own motion then struck out all the oral testimony theretofore taken, and dismissed the action upon the ground that the complaint did not state facts sufficient to constitute a cause of action. The plaintiff then offered to prove, by other evidence, ownership, prior rights, and unlawful interference by defendants, but the court refused to hear him on the ground of the insufficiency of his complaint in that its allegations are not sufficient to prove ownership.
While the complaint, taken by itself, does not set forth facts sufficient to constitute a good cause of action — at least, it is only by a strained construction that it could be held good — yet the particulars in which it is defective are aided and cured by the denials and allegations of the answers to which reference will hereafter be made. The complaint, in substance, alleges that plaintiff is the owner of certain lands, describing them, and that he is devoting them to agriculture and water is necessary to grow crops; that he is the owner of certain ditches and water rights of a certain priority which he enjoys through the medium of certain ditches, and such priority was heretofore awarded to him by a decree of the district court; that he is in immediate need of the water for the purpose of irrigating his lands, and *220that defendants threaten to divert the same from the common source of supply, and have hitherto unlawfully diverted the same, to his injury, and that there was an insufficient flow in the stream at the time in question to supply the priorities of both the plaintiff and the defendants, and that defendants do not have or claim a superior priority.
The complaint undoubtedly was subject to a demurrer at least upon the ground of uncertainty, and possibly, as adverted to, had a ruling upon the general demurrers been seasonably invoked, the court might properly have sustained them. But an examination of the denials and affirmative allegations of both answers shows that by such denials the issue of plaintiff’s ownership is raised, and that at least one of the defendants claims under the same decree which measures the rights of the plaintiff, and defendants seek to excuse their diversion, not because they have a prior right, but on account of the extravagant and wasteful use of water by the plaintiff under color of his conceded earlier priority; the claim apparently being that if plaintiff made proper use of the water there would be enough to supply the needs of all the parties. In the answer, particularly of defendant Vance, his priority to his use of water from the stream in question is alleged to be of a later number and of a later date than that awarded to plaintiff, and defendant relies upon the same decree.
While it is true that a complaint, in an action by a senior appropriator to restrain an unlawful diversion of water, which merely alleges that plaintiff has a priority superior to that of the defendant, with which the defendant is interfering, is but a mere conclusion of law, and is not a sufficient statement of ultimate facts constituting a prior appropriation, but it is necessary to state the facts which *221show such appropriation and its priority; yet where, as in this case, it appears from the allegations of the complaint in connection with those of the answer and its denials that the parties claim under the same decree, and that plaintiff’s priority is superior to that of defendant, and the dates of the respective diversions and applications to a beneficial use are shown, and that the defendant has interfered and proposes to divért the water to the injury of the plaintiff, a cause of action is made to appear in so far as concerns the necessary averments of plaintiff’s superior rights, and his ownership.
The judgment of the district court is therefore reversed, and the cause remanded with instructions to set aside the judgment heretofore entered, and permit both plaintiff and defendants to make such amendments of their pleadings as they may be advised. ' ' Reversed.
Chief Justice Steele and Mr. Justice Gabbert concur.