
    (March 19, 1917.)
    J. M. BRUNZELL, Respondent, v. J. R. STEVENSON and J. S. STEVENSON, Copartners Doing Business Under the Firm Name and Style of STEVENSON BROS., and H. W. STEVENSON, Appellants.
    [164 Pac. 89.]
    Injunction — Judgment—Costs.
    1. An injunction will not issue unless it appears that the party against whom the relief is sought is violating, or will or threatens to violate, some right of the party seeking the remedy.
    2. Judgment must he limited to the relief demanded, or to .such as is embraced within the issues.
    3. Actions involving title to or possession of irrigating ditches are within the meaning of secs. 4901 and 4903, Rev. Codes, and the party in whose favor judgment is rendered is entitled to recover costs of suit.
    [As to what is within the meaning of the law of irreparable injury, see note in 1 Am. St. 374.]
    APPEAL from the District Court of the Third Judicial District, for Owyhee County. Hon. Carl A. Davis, Judge.
    Suit to quiet title to an irrigation ditch and to enjoin defendants from interfering with the rights of plaintiff to the same. From a judgment for plaintiff, defendants appeal.
    
      Reversed.
    
    Sinead, Elliott & Healy, for Appellants.
    Some sound and substantial reasons must affirmatively appear before a court will be justified in invoking so drastic a power as injunction. (Healy v. Smith, 14 Wyo. 253, 116 Am. St. 1004, 83 Pac. 583; High on Injunctions, 4th ed., par. 22; Van Horn v. Decrow, 136 Cal. 117, 68 Pae. 473, 16 Am. & Eng. Ency. Law, 561; Boise Dev. Go. v. Idaho Trust & Savings Bank, 24 Ida. 36, 133 Pae. 916.)
    Under sec. 4353, Rev. Codes, the extent of the relief granted is governed by the issues. This section is the same as see. 580 of the California Code of Civil Procedure. Concerning this, that court, in the case of Yuba County v. Kate Hayes Min. Co., 141 Cal. 360, 74 Pac. 1049 says: “The court cannot grant any relief except such as is embraced within the issues and consistent with the case made.”
    In an action involving the title or possession of real estate, the costs must be awarded to the prevailing parties. The court has no discretion in awarding costs in actions of this character, and it makes no difference whether the action is legal or equitable. (Stoddard v. Treadwell, 29 Cal. 281-, Lawrence v. Getchell, 2 Cal. Unrep. 267, 2 Pac. 746; Schmidt v. Klotz, 130 Cal. 223, 62 Pac. 476; Sierra Union Water & Min. Co. v. Wolff, 144 Cal. 430, 77 Pae. 1038; Hoyt v. Hart, 149 Cal. 722, 87 Pac. 569; Petitpierre v. Maguire, 155 Cal. 242, 100 Pac. 690.)
    Under sec. 3656, Rev. Codes, an irrigation ditch is real estate. (Ada County Farmers’ Irr. Co. v. Farmers’ Canal Co., 5 Ida. 793, 51 Pae. 990, 40 L. R. A. 485; 11 Cyc. 49, 53.)
    Perky & Brinck, for Respondent.
    The court, while awarding plaintiff a part of the relief asked, apportioned the costs by ordering each party to pay his own costs; and had plaintiff appealed from this part of the judgment, he must have obtained a reversal as to costs, the whole costs being properly chargeable to defendants. Certainly, however, the defendants cannot complain; the error, if any existed, was in their favor. This proposition is borne out by the cases cited by counsel in their brief; unless the ease of Lawrence v. Getchell, 2 Cal. Unrep. 267, 2 Pae. 746, be an exception.
    The decree cannot be disturbed as to the costs of the trial. (Hoyt v. Hart, 149 Cal. 722, 87 Pac. 569.)
   MORGAN, J.

It is alleged in the complaint that respondent is the owner and entitled to the exclusive possession of an irrigation ditch running through lands belonging to him, situated in Owyhee county; that he built the ditch and for more than twenty-five years has used it as a necessary means of irrigating his land; that for more than five years preceding the time of the acts of appellants complained of his use of it was open and notorious and in hostility to any right or title claimed by them; that on May 16,1912, appellants took possession of it for their exclusive use, dammed and blocked it, prevented him from using it and threaten to continue to do so; that they claim some interest therein, but that their claim is without right or foundation. He asks that appellants be required to set up the nature of their claim, that he be adjudged to be the sole owner and entitled to the exclusive possession of the ditch, and that they be enjoined from interfering with his use of it.

Appellants filed an answer, consisting of general denials and affirmative matter, and alleged that they are owners of lands adjacent to those of respondent; that in 1883 their predecessor in interest, one McDonald, owned and was in possession of these lands and, together with respondent, constructed the ditch for their joint use, and that each party paid half of the cost of building and maintaining it; that since that time McDonald and his successors in interest have paid half the cost of maintenance, and have used the ditch jointly and as tenants in common with respondent until 1911, when he denied its use to appellants. Appellants denied the acts of trespass and the threats alleged in the complaint to have been made, and prayed that they be adjudged to be the owners of an undivided one-half interest in the ditch, and that respondent be enjoined from interfering with their use thereof.

The court, in its findings of fact, sustained appellants’ contentions, but in its conclusions of law held that respondent was entitled to an order enjoining them from interfering with his possession and use of the ditch. Judgment was rendered adjudging that the parties were jointly entitled to possession and use of the ditch and, for that purpose, appellants were entitled to go upon respondent’s land in a peaceful manner; that the parties contribute equally toward the maintenance of the ditch; that appellants be enjoined from forcibly taking possession of that part of it running through respondent’s land, and from ejecting him therefrom or depriving him of the use thereof; that it is the duty of the parties to secure a water-master. No costs were awarded.

Appellants assign three errors. Assignment numbered 1 is: “The court erred in concluding as a matter of law that plaintiff is entitled to an injunction against the defendants restraining them from interfering with the possession and use of said ditch by the plaintiff, and that the court erred in enjoining and restraining the defendants.”

The court found as a fact that appellants committed none of the acts of trespass complained of and that they did not threaten to commit them. An injunction is not to be granted unless the party seeking it shows that his rights are being violated, or that the party against whom the injunction is sought threatens to violate them. (Boise Dev. Co. v. Idaho Trust & Savings Bank, 24 Ida. 36, 133 Pac. 916; Bower v. Moorman, 27 Ida. 162, 147 Pac. 496, 22 Cyc. 758, 14 R. C. L. 354; Heady v. Smith, 14 Wyo. 263; 116 Am. St. 1004, 83 Pac. 583; Van Horn v. Decrow, 136 Cal. 117, 68 Pac. 473; High on Injunctions, 4th ed., par. 22.) We hold, therefore, that the action of the court complained of was error.

Assignment numbered 2 pertains to the appointment of a water-master. In the Sess. Laws, 1909, p. 104, there is a provision conferring upon the district judge power to appoint a water-master upon petition by one or more owners of irrigating ditches, where such owners cannot themselves agree in their choice. In this action, however, neither party petitioned for such appointment. The court cannot grant relief not embraced within the issues (sec. 4353, Rev. Codes; Yuba County v. Kate Hayes Min. Co., 141 Cal. 360, 74 Pac. 1049), and therefore its action in directing the appointment of a water-master was erroneous.

Assignment numbered 3 brings up for review the refusal of the court to award costs of suit. Appellants el aim they are entitled to costs; respondent contends that he was in part successful in his suit, that he was adjudged to have certain rights, which were denied by appellants, and that the action of the court in the matter of costs was therefore proper. A careful perusal of the answer shows that appellants acknowledged the ownership in respondent of an undivided one-half interest in the ditch. Every issue of fact raised by the complaint and answer was decided in their favor. It is true that respondent obtained injunctive relief, but this, we have decided, was erroneously given by the court. It is likewise true that appellants did not obtain the injunctive relief asked, but the court, as a conclusion of law, found they were entitled to it and the findings of fact fully sustain this conclusion.

This action involves title to, the right of possession of, and a right of way for an irrigation ditch. Under sec. 3056, Rev. Codes, ditchés are classed as real estate. (Ada County Farmers’ Irr. Co. v. Farmers’ Canal Co., 5 Ida. 793, 51 Pac. 990, 40 L. R. A. 485; Nelson Bennett Co. v. Twin Falls Land etc. Co., 14 Ida. 5, at page 15, 93 Pac. 789; Smith v. Faris-Kesl Const. Co., 27 Ida. 407, at page 431, 150 Pac. 25; Hoyt v. Hart, 149 Cal. 722, 87 Pac. 569.) Sec. 4901, Rev. Codes, provides: “Costs are allowed, of course, to the plaintiff, upon a judgment in Ms favor, in the following cases: .... 5. In an action which involves the title or possession of real estate.....” Sec. 4903, Rev. Codes, provides: “Costs must be allowed, of course, to the defendant upon a judgment in his favor in the actions mentioned in sec.- 4901, and in special proceedings.” We hold, therefore, that costs should have been awarded to appellants and that the court erred in failing so to do. (Hoyt v. Hart, supra; Schmidt v. Klotz, 130 Cal. 223, 62 Pac. 470.)

The judgment is reversed, with direction to the trial court to enter judgment for defendants in accordance with the views herein expressed. Costs on appeal are awarded to appellants.

Budge, C. J., and Rice, J., concur.  