(May 29, 1924.)

#### FARMERS LAND & IRRIGATION COMPANY, a Corporation, Respondent, v. ENOCH JOHNSON and THORG JOHNSON, Appellants.

[228 Pac. 311.]

APPEAL from the District Court of the Fifth Judicial District, for Bannock County. Hon. Robt. M. Terrell, Judge,

Action by Farmers Land & Irrigation Company, a corporation, against Enoch Johnson and Thorg Johnson, for an injunction. From a judgment for plaintiff, defendants appeal.

*Reversed*and *remanded,*with instructions.

Peterson & Coffin, for Appellants.

The right of the defendants to the use of the Cache Valley Canal system is protected and confirmed under C. S., sec. 5639. *{Adams v. Twin Falls-OaMey Land & Water Co.,*29 Ida. 357, 161 Pac. 322.)

The plaintiff by its long acquiescence in the action of the defendants in using the so-ealled Cache Valley Canal system has placed itself in a position where it cannot invoke the remedy of an equitable injunction, but is left to its remedy at law. (Pomeroy’s Eq. Juris., 3d ed., see. 817.)

Budge & Merrill for Respondent.

Where a grantor attempts to convey real estate to a foreign corporation which has not complied with the laws of the state relative to foreign corporations doing business in said state, said grantor is not estopped as against the corporation, its grantee or such grantee’s mortgagees from claiming benefits of a statute making transactions of foreign corporations void where it does not comply therewith. *(Wisconsin Trust Co. v. Munda/y,*168 Wis. 31, 168 N. W. 393, 169 N. W. 612.)

*256ADAIR, District Judge.

The respondent brought this action against -these appellants, seeking a permanent injunction restraining them from conveying water through a certain canal system known as the Cache Valley Canal, the ownership of which was alleged to be in respondent. Appellants filed an answer asserting a right to -convey through said canal 195 inches of water, and' also a cross-complaint by which they sought to quiet title in themselves and against the respondent to their right to use said canal.

Briefly stated, the essential facts are as follows: This canal system was first owned and operated by the Cache Valley Canal Company. This corporation on June 18, 1892, mortgaged its entire system and works, and said mortgage was afterward assigned to one Anthony Burdick. Said mortgagee later foreclosed, and at foreclosure sale 'bought in this property, receiving a deed therefor from the special master in chancery on January 5, 1900. On September 9, 1908, he deeded said property to Willis M. Marshall, who in turn on May 6, 1913, deeded the same to Fred W. Dickerson. On July 23, 1915, Dickerson entered into a written contract with respondent Farmers Land & Irrigation Company, a domestic corporation, whereby he agreed to sell it said canal system, and that respondent might take immediate possession. Pursuant to said contract, on June 3, 1919, Dickerson conveyed said property to the respondent company. On these -conveyances and facts the respondent’s title and ease rest.

The defendants settled upon certain lands lying under said irrigation'system about 1898, and for some years they rented water for irrigation purposes, without actually purchasing a water- right therefor. On April 30, 1904, after he had acquired title through the foreclosure sale as aforesaid, and also several years before he purported to deed to Marshall, Anthony Burdick executed a deed conveying this property to -the Bancroft Land & Irrigation Company, a Colorado -corporation, which had' not at that time complied with the laws of the state of Idaho relative to foreign corporations doing business in this state. This deed was delivered *257February 25, 1905, and was recorded March 5, 1905. Thereafter on March 23, 1905, said corporation qualified to do business in this state, but had not so qualified at the time of the delivery of said deed.

These appellants claim to have purchased title, during the years of 1904 and 1905, to 195 inches of water in said system, such title being transferred to them 'by means of certain mesne conveyances in all of which the source of title was the Bancroft Land & Irrigation , Company. By the terms of these conveyances the maximum annual charge for upkeep and maintenance was limited to $1 per inch and no more. Each instrument upon which appellants rely depends for its validity upon the right of the Bancroft Land & Irrigation Company to execute it, and to acquire title to said property in the first place.

It appears from the evidence that the Bancroft Land & Irrigation Company operated said system until about 1909, during which time appellants used said water and paid $1 per inch per annum in accordance with their said contracts. About this time said company apparently became defunct and abandoned said canal system absolutely. The water users thereunder, including these appellants, in order to protect their crops, but without permission, right or title, took possession of the canal and operated it, each of said users, including the appellants, paying their *pro rata*share of the expense of maintenance, and one of the appellants •acting as a director, or committeeman, for this group of farmers.

The time came, later, when work had to be done on the canal; the Spring Creek dam washed out; a new flume had to be installed; the canal had to be enlarged and strengthened; and a suit in court affecting the water rights appurtenant to this system had to be tried. These water users, that is, a majority of them, then decided that they would incorporate the present company, the Farmers Land & Irrigation Company, and acquire legal title to the system for their mutual protection and benefit. The company was *258formed and it procured the deed from Dickerson on June 3, 1919, as aforesaid.

These appellants refused to join said company as stockholders, and refused to pay their pro *rata*share of the expenses incurred, which largely exceeded the sum of $1 per inch, but at various times they tendered payment of $1 per inch of water per year, and they rely on the terms of their deeds and purported title from the Bancroft Land & Irrigation Company.

To put an end to their alleged unlawful use of said system this action for injunction was instituted, and the ■trial court entered judgment permanently restraining appellants from further using said canal and irrigation works. This cause is here on appeal from said judgment.

An action to ascertain, determine and decree the extent and priority of a water right or ditch right partakes of the nature of an action to- quiet title to real estate. The respondent, by its complaint, and the appellants, by their eross-complaint, have each sought to have title quieted in themselves, and thereby establish their perpetual right to the use of this canal system for the conveyance of the water owned by them for the irrigation of their respective lands. The evidence clearly establishes the fact that these appellants made actual, *bona fide*settlement upon and are occupying large tracts of arid land, which require artificial irrigation for their successful cultivation. They settled there many years ago, and have expended large sums of money for the improvement and cultivation of their ranches, relying npon the irrigation system in controversy as their only source of water supply. Unfortunately, they contracted with a noncomplying foreign corporation, and paid for their water rights. They now honestly believe that they should be protected under the contracts which they attempted to make with that company, and for this reason have refused to join with their neighbors in the formation of the respondent company, and refused, and still refuse, to pay assessments in excess of those they thought they had legally contracted to pay.

*259On the other hand, the stockholders in the respondent company were required to make large expenditures in repairing and improving the works, thereby directly benefiting all the water users in said system, and these appellants refused to contribute their share of this necessary expense. They were morally, and should be legally, obligated to pay their just proportion thereof.

This is an action in equity, and the court should require these parties to do equity. It may be that the respondent has a remedy at law to compel contribution from its co-tenants, the appellants, for the payment of the costs and charges heretofore incurred, but the trial court has had the whole matter before it, and will again take jurisdiction thereof, and undoubtedly it has the authority to adjudicate every issue involved, and to impose such terms as may seem to it equitable and proper. '

"We think that under the circumstances as they exist in this case, all of these parties had obtained vested rights by long use of this canal system, -to such an extent that the court is justified in finding and establishing their rights therein as tenants in common, notwithstanding the fact that their record title may be defective or void. We hold that as between the parties to this action, the appellants own an undivided interest in said system to the extent of a carrying capacity for 195 inches of water therein, and that the respondent company owns the remainder thereof.

It would be proper that this irrigation system should be operated between these parties as mutual ditch companies are usually operated, the property of which is held by the members as tenants in common, each member being-liable to contribute to the expense of maintaining, repairing and operating, in proportion to his respective interests. The maintenance charges these appellants are required to pay should not be fixed or limited with regard to the terms of the contracts which they made with the Bancroft Land & Irrigation Company, but should be -based upon the actual operating and maintenance costs of the system and the legitimate necessary expenses incidental thereto.

*260The appellants are not liable to respondent on account of any sums paid by it to Dickerson, in consideration of the execution of said deed by him to respondent, neither are they liable for any expense incurred in increasing the capacity of the canal for the accommodation of any new parties who may have subsequently acquired rights therein. They are liable to contribute their just proportion of any expense which has 'been incurred that directly benefits them, such as necessary repairs to dams or ditches, and costs of operation. It should be determined, which cannot be done from the record before us, what the appellants’ proportionate share of the accrued costs and charges amounts to, and the appellants should be required by a proper order of the court to pay their proportionate share of all future lawful expenses, the trial court to specify the manner in which such amounts shall be determined and the time and manner of such payments. Appellants should be permitted to conduct water through this canal for the irrigation of their lands, upon the payment of such sums for current maintenance as the trial court may determine to be proper-, pending the final adjudication of this matter. The final decree should require appellants to pay to respondent all sums so found due, as a condition precedent to their future use of said irrigation works, and that defaulting in such payments, appellants be restrained from further using said canal.

This cause is remanded to the trial court, with instructions to take further proceedings in accordance with the views - expressed herein. No judgment for costs on appeal will be awarded to either party.

McCarthy, C. J., and William A. Lee and Wm. E. Lee, JJ., concur.

Petition for rehearing denied.