This action was brought by the plaintiffs to compel the defendant corporation, by writ of mandate, to deliver to the plaintiffs 200 inches of water for the irrigating season of 1914, and for each succeeding year thereafter. The amended complaint was filed in February, 1914, and alleged, among other things, the representative capacity of the plaintiff Lewis and the corporate capacity of the defendant. It then alleged that the defendant and its predecessors in interest were engaged in the business of furnishing and delivering water for irrigation purposes to users under its system, among whom are the plaintiffs; that the plaintiffs are the owners of and entitled to use therefrom 100 inches of water each, to be delivered to them within one-half mile of their lands described as the west half of sec. 21, township 4 south, range 5 east, Boise Meridian. They allege further that the Great Western Beet Sugar Company, a corporation, which was the original predecessor of the defendant, located, in 1902, some 1,000 cubic feet of the waters of Little Camas creek and its tributaries, in Elmore county, and thereafter constructed two reservoirs on these streams of 19,650 acre-feet capacity, besides canals and ditches, to supply its prospective users, and proceeded to sell a large number of rights thereunder, among which are the rights now claimed by plaintiffs; that the Great Western Beet Sugar Company delivered some water through its system during the year 1908 and the following years until about September, 1912; that in 1908 the plaintiffs constructed, as a part of said canal system, a certain lateral to connect with their private *687ditches, under an agreement with the Great Western Beet Sugar Company, for which the latter was to pay plaintiffs $200; that in the spring of 1911 plaintiffs planted 100 acres of their lands in crops and irrigated a portion thereof during that season until about July 4th, when, by reason of breaks in the canal system, the water was cut off and their crops perished, and that they have not been furnished any water since; that plaintiffs made application to the receiver of the Great Western Beet Sugar Company for water in 1912, and offered to pay the reasonable charges therefor, and that the plaintiff Lamson made application in writing to the defendant in January, 1913, for water for that season, and thereafter commenced an action against the defendant for a writ of mandate to compel its delivery for that season; that the defendant in such action answered alleging it had not sufficient water to deliver any to plaintiffs and that it was not the purpose of the defendant to deliver any water to the plaintiffs, which action was afterward dismissed without prejudice; that the canal and reservoir system of the defendant and its water supply are sufficient to furnish a large portion of the 200 inches of water to which the plaintiffs are entitled. Plaintiffs further allege that one James H. Brady acquired the rights of large numbers of the persons entitled to use water under the said irrigation system, and he transferred the right so acquired to the defendant company, which later made application to the state land board for license to sell water rights, and that such application was allowed to the extent, at one time, of supplying 2,000 acres of land and afterward was allowed to the extent of supplying 3,250 additional acres of land; that should any necessary expenses be incurred by the defendant in delivering water to plaintiffs, they offer to pay for such expenses, provided they may be given credit for the $200 expended by them in the construction of the lateral, before mentioned, and credit for the further sum of $300 for repair work alleged to have been done by plaintiffs on the canal system in 1911; and that plaintiffs have no plain, speedy and adequate remedy at law.
*688As a second cause of action the plaintiffs reallege all matters in their first cause of action, together with additional allegations that the defendant claims some right adverse to their ownership of the said 200 inches of water.
And as a third cause of action they reallege all matters in their first cause of action, with the additional allegation that the defendant threatens to, and will, sell, dispose of and deprive plaintiffs of their said water rights, to the great and irreparable damage of the plaintiffs, unless restrained by the court.
The.prayer is for a writ of mandate to compel the delivery of water, for a decree quieting plaintiffs’ title, and for a writ of injunction restraining the defendant from interfering with their alleged water rights.
The defendant demurred for misjoinder of causes of action and answered denying a sufficient number of material allegations of the complaint to put the plaintiffs upon their proofs, and alleging specially that all of the water carried by their irrigation system has been applied to a beneficial use by consumers of water whose rights are prior to those of plaintiffs.
The demurrer was sustained for misjoinder, and plaintiffs elected to stand upon their application for a writ of mandate.
Upon the trial the plaintiffs submitted their proofs and the court thereupon granted a motion for nonsuit, and plaintiffs bring the case here alleging error in the dismissal of the second and third causes of action and in granting the nonsuit.
At the trial the plaintiffs introduced a deed from the Great Western Beet Sugar Company to one B. E. Sherman and conveyances from ■ Sherman to themselves for the 200 inches of water. Licenses from the state land board to the defendant permitting it to sell water rights for 2,000 acres of land at the rate of 1.75 acre-feet per acre and for 3,250 acres at the rate of 2 acre-feet per acre were also introduced. Plaintiff then offered in evidence a decree of the fourth district court in the case of Thomas Mellen et al. v. Great Western Beet Sugar Company et al., decreeing the rights of water users under the irrigation system of the said Great Western Beet Sugar Company, which system is the one now *689owned by the defendant company and in controversy in this action. From this decree it appears that there has been decreed to water users under the said system, whose rights are prior to those of the plaintiffs in this action, approximately 9,200 inches of water and approximately 1,500 inches to users whose rights are subsequent in time to those of plaintiffs. Oral testimony was also introduced showing the times when the plaintiffs had been able to get water from the system and the efforts that had been made by them to obtain water through demands made on the receiver of the Great Western Beet Sugar Company and upon the officers of the defendant company. It also appeared from the evidence that the Great Western Beet Sugar Company went into the hands of a receiver in the year 1909 and continued in such condition for two or three years, when the defendant company acquired the canal system and other property formerly owned by the Great Western Beet Sugar Company. How the defendant acquired such property does not appear from the evidence, but it is alleged in the answer to have been taken over at a receiver’s sale thereof. It also appears that at the time of its transfer the canal system was in a bad state of repair and was able to convey very little water, if any, on account of slides which had occasioned several breaks in the canal, and from decay of some of the flumes and caves in tunnel work.
The action of the lower court in sustaining the demurrer for misjoinder of causes of action is approved. Sec. 4169, Rev. Codes, provides what causes of action may be united in the same complaint, and the several causes which were attempted to be set up in the complaint in this case are clearly not included in the provisions of that section.
The application for a writ of mandate is a special proceeding, provided for a particular purpose, and should not be united with a cause of action other than that for which the writ was intended. The proceedings are initiated by affidavit, and not by complaint; and while this court has held that an affidavit verified in the form of a complaint will be construed as a proper affidavit to set the proceedings in mo*690tion, we think it should not be treated as an ordinary complaint in a civil action with which any other cause of action may be united to suit the convenience of the pleader.
With reference to the question of nonsuit which is here treated as though it were a motion to dismiss or quash, it is to be observed that the affidavit for the writ does not contain any allegation that the defendant company has under its control in its irrigation system sufficient water to supply the rights of plaintiffs, over and above the amount of water necessary to supply the rights of users therefrom, whose rights are prior in time to those of plaintiffs. While it contains an allegation that the system impounds, and its canals are capable of carrying a sufficient amount to supply a portion of plaintiffs’ rights, this cannot be construed to allege that it means an amount sufficient to supply their rights over and above the rights of prior users. Nor is there any evidence in the record to establish this important requirement, although defendant placed the matter directly in issue by the allegations of its answer. It was held in case of Gerber v. Nampa & Meridian Irr. Dist., 16 Ida. 1, 100 Pac. 80, that “In this class of cases, it is necessary for the plaintiff to aver and prove that the canal company has sufficient water to supply him with the desired amount, and that its canal has sufficient capacity to carry it, over and above the amount of water that prior users are entitled to receive.” (See same case on subsequent appeal in 19 Ida. 765, 116 Pac. 104.)
Besides, the plaintiffs showed affirmatively by their proofs that there had been decreed by the Mellen decree some 9,000 inches of water to users under the system whose rights were prior to plaintiffs’. This was sufficient to supply, perhaps, 12,000, or more, acres of land if furnished at the rate per acre allowed in the licenses from the state land board. The two licenses admitted in evidence authorized the defendant to dispose of rights for only 5,250 acres, and, in the absence of any showing to the contrary, we must presume that these rights were the ones purchased and turned over to the defendant as alleged in the affidavit, and it would appear to be *691the duty of the company to furnish water for many thousands of acres of land before the lands of the plaintiffs can be reached in their turn in the decree. Under these conditions the plaintiffs were clearly not entitled to require the defendant company to deliver them any water until the prior users had first been supplied, or, at least, until the defendant company is shown to have sufficient capacity to supply them if it would, and that its failure to do so was the neglect of an obvious duty.
This court is inclined to approve the rule laid down in Kinney on Irrigation and Water Rights, as found in vol. 3, 2d ed., sec. 1649, p. 3024, which is as follows:
“Before a writ of mandamus will be granted by the court, and the defendant ordered to furnish the plaintiff the water demanded, there must have been found to exist the following essentials: First, that the duty is imposed upon the defendant to furnish the water; second, that the plaintiff has the right to demand the performance of that duty and to be furnished with the water; third, that a legal demand has been made, accompanied with a payment or a tender of the established rates; fourth, that the defendant has the water under its control which it can furnish the plaintiff, without impairing the rights of others previously entitled to the same; and, fifth, that the plaintiff has no plain, speedy, or adequate remedy at law.”
Tested by this rule, there was also a failure to show that a legal demand has been made upon defendant for the delivery of the water, accompanied with a payment or a tender of any reasonable charges therefor. While it may be true that the defendant company had waived the question of demand by a refusal to furnish any water to plaintiffs — a question which the court does not here pass upon — yet there was no tender or offer to pay any expenses or reasonable charges which the defendant may have incurred by reason of furnishing water to plaintiffs. The tender made in the complaint is conditioned that the defendant shall pay an obligation which the plaintiffs claim is due them from the Great West*692ern Beet Sugar Company, and another claim which they assert against the receiver of that company, which claims it does not appear this defendant is bound in any way to assume or pay.
It is impossible for- this court to determine in this appeal any matter which would be of any benefit to plaintiffs for the years 1914 and 1915. The only determination of the matter that could be favorable to them would result in establishing a permanent right in them requiring the defendant company to deliver the amount of water they require for each succeeding irrigation season hereafter. At the time this proceeding was initiated they had no growing crops on their lands and showed no intention of planting any; and stated that it is their purpose not to put in any crops until their status with relation to the defendant company is determined.
The proceeding to obtain a writ of mandate should not be used to litigate or determine a permanent or perpetual water right, as other actions are provided for by the statute in which such matters may be determined. And plaintiffs therefore have a plain, speedy and adequate remedy at law.
The action of the trial court should be sustained, and it is so ordered. Costs awarded to respondent.
Budge and Morgan, JJ., concur.