WILLIAM A. LEE, J.
— This is an appeal from a judgment of the district court of the eleventh judicial district, in and for Twin Falls county, wherein the respondent is awarded a writ of mandate granting to him the rights of a stockholder in the appellant Twin Falls Canal Company, and adjudging him to be entitled to receive from said corporation a certificate of stock showing that he is the owner of eighty shares therein, which entitles him to a water right appurtenant to the lands described in his complaint. Ap. pellants are directed and ordered to recognize and observe the rights of respondent as such stockholder, to issue and deliver to him such certificate, and to deliver to him water for the irrigation of his lands in an amount equal to five-eighths of a miner’s inch per second of time, at the same time and upon the same terms as water is delivered to other stockholders in said corporation.
This is a case somewhat similar to State and Rice v. Twin Falls Land & Water Co. and Twin Falls Canal Co., ante, p. 73, 217 Pac. 252, but differs from that case in some important particulars.
Bespondent in the instant case on December 19, 1918, entered into a contract to purchase from the Twin Falls Land *321& Water Company eighty shares of water right in the canal system of the Twin Falls Canal Company, and thereafter applied to the state board of land commissioners to purchase eighty acres of land, particularly described as the W. % of the S. E. % of see. 8, T. 11 S., R. 20 E., B. M. In the Rice case one of the defenses relied upon was that the school lands in question purchased by respondent from the state were not susceptible of irrigation under this system, which question does not arise in this case. The state and Rice brought their action against appellant company in this case and also the Twin Falls Land & Water Company, which was represented in that action by the same counsel who represents the respondent in this case, so that if some of the matters urged by way of defense in the Rice case are tenable, the same reasoning and conclusions will apply to the instant case.
The “complaint and application for a writ of mandate” alleges that the Twin Falls Canal Company, which will be referred to as the “operating company,” is a corporation, and that the individual defendants are its board of directors and secretary, respectively. That the Twin Falls Land & Water Company, which will be designated as the “construction company,” was organized for the purpose of constructing an irrigation system and to sell water rights in the state of Idaho, under and pursuant to the act of Congress approved August 18, 1894, and acts amendatory thereto, commonly known as the Carey Act, and particularly for the purpose of constructing, operating and disposing of a certain Carey Act project in Idaho known as the Twin Falls South Side project. That on July 1, 1901, the government, pursuant to said Carey Act, segregated to the state of Idaho a large body of desert lands aggregating 244,025.98 acres, upon condition that the state was to cause to be irrigated and reclaimed said lands and that the government would patent the same to the state whenever it furnished or caused to be furnished an ample supply of water in a substantial ditch, canal, artesian well or reservoir, a copy of the *322contract between the state and the government being Exhibit “A,” made a part of said complaint, and describes by legal subdivision the lands so segregated to the state, which includes the land purchased by respondent. That prior to said segregation the construction company made a proposal to the state to construct ditches and canals and other irrigation works necessary to reclaim these lands, and also applied to the state for a right to divert from the Snake River at a point known as “The Cedars,” now the Milner Dam, 3,400 cubic feet of water per second of time, of which 3.000 cubic feet was to be diverted to and used upon the lands lying on the south side of said stream, and 400 feet to be used on the north side of said Snake River. That after the segregation of these lands to the state, on January 2, 1903, it entered into an agreement with said construction company to construct a canal system to reclaim these lands, which contract is pleaded haeo verba and made a part of the complaint as Exhibit “B,” and is the same contract construed and referred to as Exhibit “C” in the Rice case.
'The answer admits the foregoing allegations of the complaint. It qualifiedly admits paragraphs 8 and 10 following to the extent that the construction company bound itself to construct works sufficient to divert 3',000 second-feet to reclaim the lands described in the segregation contract between the government and state, but denies that it bound itself to furnish water to any more of said lands than the 3.000 feet of water appropriated was ample to irrigate.
It is alleged by the complaint and admitted 'by the answer that the construction company in its contract with the state was permitted to sell water rights in compensation for its constructing said water system, and that such shares represented one-eightieth of a second-foot of water per acre and a proportionate interest in the canal system, with all rights and franchises, based upon the shares finally sold, at an agreed rate of $15:50 for sections 16 and 36 and $25 per acre for other lands included within this segregation and susceptible of being reclaimed by said works.
*323This agreement between the construction company and the state required that there be organized an operating company, which is in fact the present appellant corporation; that this operating company was to take over, own, hold and operate the canal system when completed by the construction company, and the water rights of settlers under this system were to be represented by stock in the operating company.
It is further alleged by the complaint and admitted by the answer that the capitalization of the operating company was to be 275,000 shares, which was to include the projects on both sides of the Snake River, and the stock ivas to be fully paid up; that the construction company completed the said south side system of sufficient size to divert from the Snake River and convey to said lands 3,000 cubic feet of water per second of time. That after doing so, in the fall of 1909 this system was accepted by the state of Idaho as complete and as having been constructed in accordance with the contract; that the construction company proceeded to organize the appellant Twin Falls Canal Company, with a capitalization of 210,000 shares, which represented a water right for every acre of land to be irrigated under the south side project, and immediately thereafter conveyed the interest of said construction company in said system to this operating company, together with all appurtenances belonging thereto. That after said segregation and the inauguration of the construction work, the state board gave notice that certain lands were open for settlement, which notice included respondent’s said lands, and that the same could be purchased by qualified entrymen at fifty cents per acre, and the water right to reclaim them at $25 per acre. That subsequently the state, upon making proof that water sufficient to reclaim these segregated lands had been furnished in a substantial ditch, applied to the government and received patent therefor; and that the same has not been relinquished or withdrawn from settlement.
It is further alleged that there has been sold water rights for less than 205,000 acres; that stock has been issued for *324a like amount; and that there remains 35,000 additional shares for sale, which last allegation is denied.
It is also alleged that a decree was entered in the district court of the fourth judicial district, the counties of said fourth district now being in the eleventh district, in April, 1913, in an action entitled Twin Falls Land & Water Co. v. Charles M. Foster, et al., quieting title to 3,000 second-feet of water to be used on the south side, and that respondent’s lands were among the lands to which said water was decreed.
It is further alleged that since this system was turned over to the operating company, it has procured and holds additional rights in Snake River for the watering of said lands, and that respondent is a qualified entryman.
To the answer of appellants, the operating company and its officers, respondent demurred generally to each and every part thereof, on the ground that said answer did not state facts sufficient to constitute a defense, which demurrer was sustained. Respondent also moved to strike appellants’ answer and for judgment on the pleadings, which motions were also sustained. Appellants having elected not to plead further, judgment was entered in favor of respondent and against appellants as prayed for in the complaint. The demurrer to the answer, motion to strike and motion for judgment on the pleadings admit the truth of all relevant and v material facts properly pleaded in such answer, and it therefore becomes necessary to determine what relevant matter is pleaded by this answer and the effect of admitting the truthfulness of said facts on the part of respondent.
By way of an affirmative defense, appellants allege that at all times since this water has been carried in said canals to said segregated lands, it has been the uniform custom and usage of both the canal companies to deliver to said purchasers of water rights or stock in said canal system for the irrigation of their respective lands five-eighths of a miner’s inch per second of time for each acre of land, and to deliver the same within one-half mile of the user’s legal subdivision. That all of the water flowing in said canal system to its full *325capacity for more than five years prior to tbe commencement of this action has been appropriated to and beneficially used by the present stockholders and their predecessors in interest, for the irrigation of their respective lands; that they have used such water openly, notoriously, adversely and continuously, under a claim of title and right to the exclusive use of the same, and that there has been a continued occupation and possession of the same for more than five years prior to the commencement of this suit, and that they have paid all taxes of every kind whatsoever levied against the same, and defendant corporation suggests that these individual users should be made parties to this action. That in December, 1910, said construction company entered into a contract with this appellant operating company, whereby it was agreed that the determination of whether any more shares of stock in said company should be sold, or any additional water delivered, was to rest solely with the operating company, which company claimed at that time that stock to the full carrying capacity of the canal had already been disposed of, and that to now permit respondent to receive this water as prayed for would deprive its stockholders of their property. That there has already been sold 203,620.68 acres of land, and the same number of shares of stock in said operating company issued; that respondent had notice of these facts long prior to making his said entry; that all of the water, to the full capacity obtainable under said system, has been appropriated and placed to a beneficial use by said users under said system, and that there is no surplus in said canal subject to further appropriation or use; that prior to respondent’s said purchase there had been entered upon under said segregation 203,620.68 acres of land, the greater portion being lands segregated by the government to the state, and the construction company had sold the same number of shares of water right for such lands, which had been dedicated to the same. That the state in order to procure patent from the government to the lands then being watered, had represented that the water available for these lands, supplied through the canal system built by the construction *326company under its contract with the state, was a second-foot of water to each eighty acres of land, to be delivered within one-half mile of the point of intended use; that the state had represented to the government and to the entrymen thereafter settling upon said lands that there was available for the use of said project 3,000 second-feet of the appropriation from the Snake River, but in fact such appropriation is not sufficient to deliver more than 2,000 second-feet during a large portion of the irrigation season; that during every season there is much less than 3,000 second-feet available for use by the present entrymen upon said lands, and that such users, in order to supply themselves with water sufficient to enable appellant company to. deliver sufficient water to irrigate and reclaim their lands, have been inquired to expend more than $200,000 in the construction of a reservoir for the purpose of impounding the flood waters of the Snake River, so that such flood waters may be used in addition to the amount available from the natural flow of the Snake River during the low-water season; that this additional supply will probably be sufficient to fill the canal system to its capacity, but if this appellant company is compelled to deliver stock and water to other lands, it will deprive the present stockholders of a portion of their rights acquired by appellant in said storage water for its stockholders; that prior to the time respondent purchased from said construction company his water right, the said state board represented to all prior purchasers that the water right to which they would be entitled and the water which they would receive by virtue of their ownership of stock in defendant company would be a right to receive one second-foot flow of water for each acre of land, or five-eighths of a miner’s inch per acre, and that it was believed and understood that such water would be delivered within one-half mile of the legal subdivision of each several settler, and that such settlers have entered upon said lands and improved and cultivated the same at great expense, relying upon such representation; that appellant company’s canal system consists of a main canal and two subsidiary canals, with a large number of *327subordinate laterals and distributing ditches, built by said construction company under its contract with the state, but that said system is not capable or of sufficient capacity to deliver more than 2,100 second-feet to its stockholders, by reason of loss in transmission, and does not have more than 2,100 second-feet available for the use of its stockholders out of the construction company’s total appropriation of 3.000 second-feet; that the capacity of this system as completed by the construction company and accepted by the state and turned over to the operating company, representing the settlers thereunder, is not sufficient to deliver simultaneously more than 2,100 second-feet of water to more than 168.000 acres of land; that appellant company, in order to deliver to its present stockholders the amount of water necessary for the successful raising of crops on these lands, will require the entire canal capacity to be used under the most efficient and economical methods of delivery; that the contract of the construction company with the state provides that each of said shares of water right shall represent a carrying capacity in said canal sufficient to deliver water at the rate of one-eightieth of one second-foot per acre, and each share of water right sold or contracted shall represent a proportionate interest in said canal, together with all rights and franchises, based upon the number of shares finally sold in said canal; that it was fui'ther provided that in no case would water rights be dedicated to any of said lands or sold beyond the carrying capacity of the canal system, or in excess of the appropriation made by the construction company.
The answer further alleges that prior to respondent’s purchase there had been 180,000 acres of land under this system put in a high state of cultivation by the owners, upon the representation that an ample supply of water would be furnished, and that all of said persons have prior rights in and to the present available water supply, which is all required and necessary to supply their needs, under the most economical method of use, and that to now permit further rights to be sold under this system will cause all of said *328prior users to suffer great injury, and will violate see. 15 of art. 5 of the state constitution, and also the act of Congress of August 18, 1894, commonly known as the Carey Act, which said act requires as a condition precedent to the segregation by the government to the state and the sale of such land by the state to actual settlers that it provide or cause to be provided an ample supply of water in a substantial canal sufficient to thoroughly irrigate such lands and raise ordinary crops thereon.
The pleadings, it would seem, are needlessly prolix and voluminous, and we have endeavored to limit this recital to only the more essential facts relied on by the respective parties. The ultimate question for determination is: Admitting the truth of all facts pleaded by the answer, as the demurrer and motion to strike does admit them, should these admissions defeat respondent’s right to the relief prayed for.
The contract between the construction company and the operating company at the time of the transfer of the canal system contains the following:
“If the Twin Falls Canal Company shall hereafter conclude that there remains in said canal system water rights in excess of the number of shares of stock in said corporation already issued (and not' otherwise) including the stock evidenced by certificates provided to be issued in said paragraphs 1 and 2 hereof, then it, the said Twin Falls Canal Company, shall endeavor to sell said shares of stock in said Twin Falls Canal Company to represent the surplus and excess water rights in said canal system.....It is also further understood that nothing herein shall be construed to apply to any waters that may hereafter be appropriated by said Twin Falls Canal Company, nor to any of the increased capital stock of the Twin Falls Canal Company, if its capital stock shall be hereafter increased by the stockholders of said company, and that all water hereafter appropriated by the Twin Falls Canal Company shall be evidenced by the increased capital stock of the said company and not by any of its present authorized capital stock.”
*329Respondent in support of his application for this writ also relies upon the authority of State and West v. Twin Falls Canal Co., 21 Ida. 110, 121 Pac. 1039, It. R. A. 1916F, 236, discussed at length in the Rice case. For the reasons there given, we think the conclusion in the West case is based upon a state of facts so materially different from the admitted facts in the ease at bar that it is not controlling in this case.
Nor do we think appellants’ contention tenable that the acquiescence of the water users under this system in a certain method of distribution can control as to the manner of distributing such water, if such method is not in accord with the terms of the several agreements referred to in the pleadings. But in that respect we think it is clear that the contract between the state and the construction company limits the right of the company to a sale of such water rights to the capacity of the irrigation works, and defines the amount of a share of this water right, which includes a proportionate interest in the canal system, based upon the number of shares finally sold, but also provides that in no case will water rights or shares be sold or dedicated to any of the lands beyond the carrying capacity of the canal system, nor in excess of the appropriation. Manifestly, when the carrying capacity of the canal system is sold, or when all the water so appropriated by the company has been sold, the purchasers then own the entire system as tenants in common, bound of course by the terms of their agreement to have the system administered through the agency of the operating company. This company is merely a convenient method devised by the state contract for administering the affairs of these water users through the instrumentality of a corporate entity. It would have been competent for them to have administered this whole system in their own proper persons, but the impracticability of so doing was so great that this corporation was created to act on their behalf, and is in effect merely an .incorporated water master for the respective water users.
*330It is urged ou behalf of respondent that the state having procured patent from the government for the lands purchased by respondent, it holds these lands in trust for subsequent purchasers; that it obtained patent to the same by reason of having represented to the government that it had provided sufficient' water in a substantial canal system to reclaim such lands, and not having offered to reconvey, or given notice of the withdrawal of such lands- from further settlement, it is an act of bad faith on the part of the state to refuse water for their reclamation. We do not think that this result follows, for as appears from the record in State and Rayl v. Twin Falls Salmon River L. & W. Co., 30 Ida. 41, 166 Pac. 220; Caldwell v. Twin Falls Salmon River etc. Co., 225 Fed. 584, and Twin Falls Salmon River etc. Co. v. Caldwell, 242 Fed. 177, 155 C. C. A. 17, it is apparent that both the state and the government have been led into error with regard to the available water supply for a particular segregation, and that the practice has been for such lands to be released to the government and opened for settlement under some other provision of the federal land law. But whatever may be said with regard to an error by the state and the government in patenting to the state a greater amount of lands than can actually be reclaimed under a given system, neither the government nor the state should insist on depriving prior settlers who have located upon this segregation, spent a large amount in improving their lands and bringing them to a high state of cultivation, of the amount of water necessary to reclaim such lands, such water not being in excess of the amount which the granting clauses in their deeds of conveyance entitle them to receive.
In the Rayl ease, supra, it clearly appears that if the writ prayed for should issue to compel the delivery of water for •additional lands, it could only result in depriving lands that had already been purchased, settled upon and reclaimed of a part of the water which is necessary for their reclamation and which under their contracts of purchase the owners are justly entitled to receive, which water had already been dedicated to the lands, and the writ was denied. In the *331instant ease, if the admissions of the answer are taken as true, which must be done under the state of the pleadings, the same result must follow, and water users who have settled upon these lands, brought them to a high state of cultivation, made extensive improvements upon them, and been in the possession and use of this water for periods of from five to eighteen years, openly, notoriously, adversely, and under a claim of right, will be required to surrender’a part of such water to subsequent settlers if the allowance of this writ be sustained. We do not think it necessary to rest the rights of the settlers to the use of this water upon a prescriptive right, although we see no reason why this could not be done. The holding in the' Rayl case wherein it is said that: “The theory of proportionate shares of water priority ought not to be adopted in this case,” is applicable to every case where it appears that all of the water available for a Carey project has been disposed of to bona fide settlers under the terms of the sale contracts prescribed by the state, who have settled upon, reclaimed and improved their lands r-elying upon these representations. No further sale should ■be allowed when it would result in diminishing the prior settler’s right to less than the maximum amount which they have purchased, that amount being necessary for the successful irrigation of their lands.
As said in the Rice case, supra, it cannot be presumed that the present users of water under this system, when they acquired their rights to its use, intended or understood that they would receive only an indefinite, fractional part of this original appropriation, instead of the definite, specific quantity mentioned in the granting clause of their contract. We approve the doctrine announced in Caldwell v. Twin Falls Salmon River etc. Co., supra, wherein it is said that: “The settlers’ contracts for water were contracts for the sale of a specific water right for each acre of land described, and a proportionate interest in the system,” and further, where it is held that while under one of these projects priority of application for water rights or priority of entry and settlement does not confer upon such settler priority in the *332use of water, this must be construed in connection with the stipulation prohibiting the sale of water rights beyond the carrying capacity of the system, and when so construed it does not imply an understanding that the water right may he sold in excess of the normal capacity of the system, and the sale of water rights under the contract between tbe state and tbe construction company does not contemplate a sale only of an undivided interest in the appropriation.
For the reasons here given, the judgment awarding the writ of mandate is reversed and the cause remanded, with instructions to overrule the demurrer to the answer, deny the motion to strike the answer and also the motion for judgment on the pleadings, with leave that the trial of said cause may be proceeded with in accordance with the views herein expressed, if either party so elect; otherwise, the action to he dismissed. Costs to appellants.
Budge, C. J., and McCarthy, Dunn and Wm. E'. Lee, JJ., concur.