This is a proceeding to procure a writ of prohibition directed to the district court of the sixth judicial *298district, in and for Lemhi county, and to O. R. Baum, acting judge, prohibiting further proceedings in the case of Ramsey v. Lawyer et al. That case was instituted by Charles H. and George A. Holbrook on July 29, 1919, for the purpose of securing an adjudication of their right to the use of the waters of Basin Creek. To this complaint Edwin L. Call and Louise J. Call, named therein as defendants, answered and filed cross-complaints. On October 9, 1919, H. Y. Rice et al., who were parties to the suit, answered the complaint and also filed cross-complaints. The plaintiff, Ramsey, was substituted for the plaintiffs, Holbrook, and on April 3, 1920, filed an amended complaint. With the pleadings in this condition, on May 8, 1920, the plaintiff, Ramsey, moved to dismiss the action. His petition in this proceeding alleges that all the defendants and cross-complainants joined in the motion to dismiss. This allegation is denied by the defendants in the following language: “That the statement of the petitioner herein to the effect that all the parties to said action joined in the application for said dismissal is untrue, as will appear from the exhibit hereinbefore referred to and the affidavit of L. E. Glen-non attached hereto and made a part hereof. ” The exhibit referred to was the motion to dismiss, and shows that it was signed only by the plaintiff and his attorney.
The affidavit of L. E. Glennon states: “That said H. Y. Rice has never joined in any motion to dismiss this action, and is not now in favor of the dismissal of such action, and has advised this affiant, as his attorney, that he will not consent to any dismissal thereof.” It thus appears that Rice was a cross-complainant, and that he did not consent to the dismissal.
Under C. S., sec. 6830, a plaintiff has an absolute right to dismiss his action, provided a counterclaim has not been filed or affirmative relief sought by the cross-complaint or answer of defendant. The dismissal may be accomplished by a motion addressed to the court, as well as by a formal certificate of dismissal. If a motion be made, the court has no power to deny it. In contemplation of law the action is dismissed *299upon the filing of the motion or a formal dismissal. (Boyd v. Steele, 6 Ida. 625, 59 Pac. 21; Elliott v. Collins, 6 Ida. 266, 55 Pac. 301.)
The question arises as to whether the cross-complaint filed by defendant Rice prevented plaintiff from dismissing his action. In Mott v. Mott, 82 Cal. 413, 22 Pac. 1140, 1142, construing a statute identical with our own, it is said that to prevent a dismissal by the plaintiff, the counterclaim or cross-complaint must be one upon which the defendant would be entitled to affirmative relief. (See, also, Belleau, v. Thompson, 33 Cal. 495.) In Kreichbaum v. Melton, 49 Cal. 50, it is said: “A cross-complaint must state facts sufficient to entitle the pleader to affirmative relief; and cannot be helped out by the averments of any of the other pleadings in the action. Like a complaint, it must itself contain all the requisite facts.” (See, also, Coulthurst v. Coulthurst, 58 Cal. 239, Hunter v. Porter, 10 Ida. 72, 77 Pac. 434, and Stewart v. Gorham, 122 Iowa, 669, 98 N. W. 512.)
The cross-complaint of Rice sets out that he is the owner and in possession of certain lands, describing them, and that he and his predecessors in interest on about the first day of September, 1896, appropriated a certain amount of water for their irrigation, and used the water each and every irrigation season thereafter upon such lands; that the lands are arid in character, and require artificial use of water for the production of agricultural crops.
As a cross-complaint, this fails to state a cause of action. It does not call for any action on the part of the court. It does not suggest that anyone ever has interfered or expects to interfere with his rights, or that there is any conflict whatever between his rights and those of any other person, or indeed that there is any other appropriator from the stream.
There is nothing contained in this cross-complaint which prevented plaintiff from dismissing his action. In Boyd v. Steele, supra, it was held that when the plaintiff dismissed his action, the court thereby lost jurisdiction, and a writ of *300prohibition should issue to prevent further proceedings in the action.
This case conies within the principles announced in the Boyd case, and a peremptory writ of prohibition will be issued. No costs allowed.
Morgan, C. J., and Budge, J., concur.