(November 1, 1923.)

#### WILLIAM DANIELS, FRED B. PATTEE and JOSEPH L. PATTEE, Petitioners, v. RALPH W. ADAIR, Judge of the Sixth Judicial District of the State of Idaho, Defendant.

[220 Pac. 107.]

Waters and Water Bights — Prohibition — Injunction — Water-Masters — Exchange of Water Bights — Contempt—Sufeiciency of Complaint to Warrant Injunction.

1. Under the facts of this case, *held*that the trial court exceeded its jurisdiction by issuing a temporary injunction to compel exchange of decreed waters of one stream for undeereed waters of another.

2. A writ of prohibition will issue to enjoin the judge of the trial court from proceeding further where it clearly appears that said court is proceeding wholly without and beyond its jurisdiction.

3. A water-master upon a stream, the waters of which have been decreed, must distribute the waters of said stream in compliance with sueh decree, and in the absence of a modification thereof cannot be compelled by mandatory injunction to do otherwise.

4. Complaint examined and found insufficient to warrant issuance of temporary injunction.

Original proceeding for writ of prohibition.

*Writ granted.*

Burleigh & Glennon, for Plaintiffs.

A court has no authority to compel an exchange of property. It can only be taken from the owner for public use and then only after just compensation has been allowed in the manner prescribed by law.

It is the duty of the water-master to be governed by the terms of the decree under which he is distributing the water. *(Stefhem v. Shinner,*11 Ida. 374, 82 Pac. 451.)

The court is also bound by the terms of that decree and exceeds its jurisdiction when it attempts to direct the water-master to distribute the water otherwise than in accordance *131with the decree through the force of either an injunction or writ of mandate. *(Lewis v. Mountain Some Co-op. Irr. Co.,*28 Ida. 682, 686, 156 Pae. 419.)

Prohibition is the proper remedy. *(Gunderson v. District Court,*14 Ida. 478, 94 Pae. 166.)

This court may properly examine the complaint to determine whether or not it states a cause of action for the purpose of determining the propriety of this proceeding. *(Ramsay v. District Cowrt,*33 Ida. 296, 193 Pac. 733.)

Whitcomb, Cowen & Clark and E. H. Casterlin, for Defendants.

“A writ of prohibition cannot be issued to restrain the exercise of judicial functions.” *(Smith v. Whitney,*116 U. S. 167, 6 Sup Ct. 570, 29 L. ed. 601; *Ex parte Detroit River Ferry Co.,*104 U. S. 520, 26 L. ed. 815; *Orr v. State Board of Equalization,*3 Ida. 190, 28 Pac. 416.)

“A writ of prohibition will not issue to prevent an inferior court from deciding erroneously in a matter within its jurisdiction, or to prevent the enforcement of an erroneous judgment.” *{Bank Lick Turnpike Co. v. Phelps,*81 Ky. 613; *More v. Superior Court,*64 Cal. 345, 28 Pac. 117; *Leonard v. Bartels,*4 Colo. 95; *State v. Superior Court of King County,*3 Wash. 705, 29 Pac. 213; *State v. Twenty-sixth Dist. Judge,*34 La. Ann. 611; *Clayton v. Seidelburg,*17 Smedes & M. (Miss.) 623; *State v. Burkhartt,*87 Mo. 533; *Buskirk v. Judge of Circuit Court,*7 W. Ya. 91; *State v. Columbia,*17 S. C. 80.)

“Where the lower tribunal has jurisdiction of the parties and the subject matter, prohibition will not lie.” (35 Cyc. 605; cases cited in note 34.)

Upon application for prohibition the only inquiries permitted are whether the inferior tribunal is exercising a jurisdiction it does not possess, or, having jurisdiction, has exceeded its legitimate powers. (32 Cyc. 629, note 1.)

BUDGE, C. J.

— This is an original proceeding brought to secure a permanent writ of prohibition enjoining the de*132fendant, as judge of the district court of the sixth judicial district, from proceeding further in the matter of punishing petitioners as for contempt for their failure to comply with a certain injunctive order relating to the distribution of the waters of Agency Creek in Lemhi county.

From the record it appears that on August 15, 1923, Margaret Mahaifey and the Pioneer Bank & Trust Company, a corporation, filed a complaint in the district court of the sixth judicial district in and for Lemhi county in which they sought, among other things, to have awarded to them the right to the use of 175 inches of the waters of Agency Creek for the irrigation of their lands, which they alleged to be subject to irrigation from that stream. A ditch known as the Lemhi River Ditch was constructed in 1914 for the purpose of delivering water from the Lemhi River to Agency Creek and to supply intervening users. Plaintiffs seek by delivering a certain amount of water from the Lemhi River into the Lemhi Ditch, to have an equal amount of water delivered to them out of Agency Creek in exchange therefor. The complaint alleges that the petitioners, Fred' B. Pattee and Joseph L. Pattee, subsequent to the construction of the Lemhi River Ditch, changed their point of diversion from a point where. that ditch empties into Agency Creek to a point above it, thereby diverting the waters of Agency Creek and denying plaintiffs the right thereto. They also alleged that the petitioner, Daniels, water-master of Agency Creek, has refused to deliver any of the waters of Agency Creek to the plaintiffs to their great and irreparable damage. From the record it further appears that the Avaters of Agency Creek have been decreed; that the petitioners, Pattees, and others Avere aAtarded all of the waters of Agency Creek by decree made and entered by the district court of the sixth judicial district for Lemhi county on December 14, 1914, which decree is of record in that county.

Upon the filing of the complaint and on motion duly made, Honorable George W. Edgington, Judge of the ninth judicial district, in the absence of the defendant judge, issued an in*133junction enjoining the petitioners from in any manner interfering with the plaintiff’s right to the use and enjoyment of 175 inches of the flow of the waters of Agency Creek so long as said amount of water is being supplied to the waters of Agency Creek from the Lemhi River through the Lemhi River Ditch and requiring petitioner, Daniels, water-master, to deliver to the plaintiffs 175 inches of the waters of Agency Creek so long as that amount of water is being supplied to the waters of Agency Creek through the Lemhi River Ditch. On August 17, 1923, petitioners filed a notice and motion to- dissolve the injunction, the motion being supported by affidavits and verified answer. All of the material allegations of the complaint were denied 'by the answer. By way of affirmative defense, petitioners alleged the ownership of a large tract of land which is irrigated from Agency Creek and that such water is necessary for the proper irrigation of their lands; that all of the waters diverted from the Lemhi River through the Lemhi River Ditch are appropriated by the owners of said ditch and that the capacity thereof is insufficient to carry water in excess of that necessary for the proper irrigation of the lands of the owners of the ditch; that they are the owners of an interest in the waters flowing in the Lemhi River Ditch and that their point of diversion of the waters of Agency Creek was changed long prior to the construction of the ditch, and that for more than five years prior to the commencement of the action they had used the waters of Agency Creek from their present point of diversion to and upon their lands and claim a right to continue such use and deny the right of plaintiffs to exchange Lemhi River water conducted through the Lemhi River Ditch for the waters of Agency Creek. The motion to dissolve the injunction was denied on August 22, 1923. On August 29, 1923, a motion for an order to show cause, supported by the affidavit of Margaret Mahaffey, was made to the court. An order was made by the court on August 30, 1923, directing petitioners to appear and show cause why they should not be punished as for contempt in failing to obey *134the order and writ of injunction theretofore issued. Whereupon this proceeding was resorted to for the purpose of enjoining further proceedings in the matter.

It is the contention of the petitioners that the defendant judge 'is acting in excess of the jurisdiction of the court for the following reasons: (1) That the complaint, which forms the sole basis for the issuance of the injunction, does not state a cause of action; (2) that the complaint, even though stating a cause of action, does not set forth any grounds or show any reason for injunctive relief during the pendency of the action; (3) that the so-called injunction is a writ of mandate so far as the petitioner William Daniels is concerned and directs him to perform acts in violation of his official duty as prescribed by law; (4) that the injunction attempts to restrain the petitioners, Fred B. Pattee and Joseph L. Pattee, from enjoying a vested right — the right to the use and enjoyment of which has been confirmed in them by a final decree of a competent court; (5) that by said injunction the petitioners, Fred B. Pattee and Joseph L. Pattee, are deprived of a property right without due process of law and without just compensation in violation of their rights as guaranteed by art. 1, sees. 13 and 14, of the constitution of this state.

We shall discuss only such of the contentions mentioned as we deem necessary to a final disposition of this proceeding. It is admitted in the complaint that the Pattees were awarded under the above-mentioned decree the right to the use of 270 inches of the waters of Agency Creek; that they have put said waters to a beneficial use, and that the use of the same is necessary to the proper irrigation of their lands. The complaint also admits that the construction of the Lemhi River Ditch by the plaintiffs and others in 1914 has, since that year, augmented the flow of the waters of Agency Creek. From the pleadings it is clear that the controversy between the plaintiffs and the petitioners, Pattees, involves the right of the plaintiffs to require petitioners to accept the undeereed waters of Lemhi River in lieu of waters decreed to them from Agency *135Creek, and also the determination of the date of change of the point of diversion by petitioners.

It would seem to us that plaintiffs are attempting, by invoking the injunctive power of the trial court, to enforce an exchange of the waters of Lemhi River for the waters of Agency Creek. It is admitted that the petitioners, Pattees, have a decreed right to the waters of Agency Creek. To require them to surrender such property right and take in lieu thereof undecreed waters of Lemhi River would be in violation of their constitutional right to the possession and enjoyment of their property. The extent to which this court has gone in the matter of the exchange of water was announced in the case of *Reno v. Richards,*32 Ida. 1, 5, 178 Pac. 81, where it is said:

> “It is not shown that there were any rights intervening between their point of diversion from Birch Creek and the point where they caused the waters of Pass Creek to empty into Birch Creek. In the absence of detriment to other users of water from Birch Creek there is no doubt of their right to make a diversion from Birch Creek, at their point of diversion, of the amount of water which they caused to flow therein for the use of other appropriators farther down the stream.”

It may be that under certain circumstances, where a clear ease is made, an exchange of water may be brought about, but under no circumstances can it be done where the exchange would result to the detriment of prior users or result in depriving such prior users of a property right. In the case of *Berg v. Twin Falls Canal Co.,*36 Ida. 62, 213 Pac. 694, this court said:

> “They could mix waters appropriated by them with those of respondent and any number of others, in a natural watercourse for a similar purpose. (C. S., sec. 5560.) But this practice is allowed upon the theory that the water taken out is the water appropriated.”

In the instant case plaintiffs do not seek relief upon this theory, but, on the contrary, seek to take decreed waters of petitioners, Pattees, diverted from Agency Creek above the point where the Lemhi River Ditch empties into Agency *136Creek and compel petitioners to accept undecreed Lemhi River water at a point below their point of diversion, just so long as the plaintiffs deliver 175'inches of the waters of Lemhi River into Agency Creek. Under the facts as admitted in the pleadings the power to bring about such an exchange would 'be beyond and in excess of the jurisdiction of the court.

In so far as the injunction affects the petitioner Daniels it is mandatory and directly in violation of the decree whereby the waters of Agency Creek are to be distributed. Daniels, as water-master, is limited in the matter of the distribution of the waters of Agency Creek by the decree and must follow its provisions.

We are of the opinion that the complaint did not state facts sufficient to warrant the court in issuing the injunction and also that the verified answer and affidavits of petitioners made a clear case warranting the dissolution of the injunction and that the court erred in refusing to dissolve the same, and acted without and beyond its jurisdiction in citing the petitioners to appear and show cause.

From what has been said it follows that a permanent writ of prohibition should issue from this court enjoining further proceedings in this matter, and it is so ordered.

McCarthy, Dunn, William A. Lee and Wm. E. Lee, JJ.} concur.