Paterson, J.
This is an application for a writ of review to annul an order of the court below adjudging petitioners guilty of contempt, for the disobedience of its judgment.
It appears that the petitioners, Julia V. Stewart and W. B. Prentice, entered into a contract with one Hill, whereby they agreed to deliver to the latter or his executors, representatives, and assigns, at a certain point on the line of their pipe, water not to exceed ten miner’s *544inches in perpetual flow under a four-inch pressure, for a term of twenty years. Thereafter Hill sold and assigned all his rights under the contract to one J. W. Sefton, who constructed a pipe-line extending from the point mentioned in the contract to his ranch, and thereupon demanded of Stewart and Prentice that he be allowed to make a direct connection between his pipe and the pipe-line of Stewart and Prentice, and to divert from the flume two inches of water. This demand was refused by Stewart and Prentice, who claimed that he had no right to make such connection, whereupon Sefton instituted an action against them, in which, upon proper allegations made, he prayed that an injunction might issue commanding the defendants not to interfere with the plaintiff in effecting a connection of his pipe with the conduit of the defendants, and for the sum of one thousand dollars damages. Thereupon the court issued a temporary injunction in accordance with the prayer of the complaint, which was afterwards on motion of the defendants dissolved, and the plaintiff was ordered to detach his pipe -from the pipe-line of the defendants, the connection having been made during the pendency of the temporary injunction. A trial was had upon the merits, and judgment was entered in favor of the plaintiff awarding to him one dollar damages, and the right to connect his line of pipe as prayed for. It was further decreed that the defendants desist, and refrain from interfering with the plaintiff in making the connection of his pipe with the pipe-line of defendants, and thereafter and for the period of twenty-five years in any manner interfering with or preventing the flow of water from defendants’ pipe to the extent of two miner’s inches. Immediately after the entry of the judgment, the defendants perfected an appeal to this court by giving and filing a notice of appeal, and executing and filing an undertaking in the sum of three hundred dollars. Thereafter the plaintiff, notwithstanding the fact that notice of appeal had been filed and served, and an undertaking given, entered upon the premises of the defend*545ants, cut into their water-pipe and connected his own pipe therewith'. The petitioners herein, acting under the advice of counsel that the perfecting of the appeal stayed all proceedings, broke the connection and restored the pipe and line to the condition in which it had existed prior to the time the connection was made. Again the plaintiff in the action cut the pipe of the defendants and connected his pipe therewith, and proceeded to take water therefrom, whereupon the petitioners herein again broke the connection and restored the water-way to its previous condition. Thereupon they were cited to show cause before the superior court why they should not be punished for the acts set forth, and after a hearing the order adjudging them guilty of contempt, above referred to, was made. A stay of proceedings was granted for a period of thirty days to enable the petitioners to make this application.
We think that the appeal in Sefton v. Prentice et al., operated as a supersedeas against the judgment, in so far as it authorized the plaintiff therein to connect his pipe with the pipe of the defendants. The decree was in effect a mandatory injunction, although prohibitory in form. Neither Hill nor Sefton had ever connected his pipe with the pipe-line of the defendants, prior to the commencement of the action, and the main question in the case was whether, under the contract and the acts alleged to have been done by the plaintiff, he was entitled to make such connection. It is true that such connection had been made under the preliminary injunction, but when that injunction was dissolved the defendants’ property^was restored to the condition in which it had theretofore existed. The purpose of an injunction is to hold the subject of the litigation in statu quo until a final determination. It is doubtless true as a general rule that an injunction is not dissolved or suspended by an appeal, but there are exceptions to the general rule, and these exceptions are where the judgment commands or permits some act to be done. In such cases a stay of proceedings can be had. (Hicks v. *546Michael, 15 Cal. 107.) An appeal would in many cases be useless if the execution of a decree which authorizes or permits the plaintiff to use the property of the defendant cannot be stayed during the pendency of the appeal. “During the pendency of the appeal the court below could do no act which did not look to the holding of 'the subject of the litigation just as it existed when the decree was rendered.” (Dewey v. Superior Court, 81 Cal. 68.) In Bullion etc. M. Co. v. Eureka Hill M. Co., 5 Utah, 151, the court said: “ The taking of the appeal, and the giving of the supersedeas bond did not make void, or nullify or suspend the judgment nor the injunction contained therein, but all affirmative action looking to the execution of the terms of the decree was suspended. (Slaughter House cases, 10 Wall. 273; Swift v. Shepard, 64 Cal. 423.) But the lower court could nevertheless take such action as was necessary to hold the property intact and enforce a continuance of the statu quo. However, the district court, during the pendency of the appeal, could do no act which did not look to the holding of the subject of litigation just as it existed when the decree was rendered. (Hovey v. McDonald, 109 U. S. 161.) In the exercise of its authority to preserve the property, the district court was empowered to punish as for contempt the violation of any provision of the injunction, where the parties were not allowing the property to remain as it was at the date of the decree.....Taking all the evidence together, we do not see that the appellants, at the time they are charged with having violated the injunction, occupied any other or different place on the lode in question than they did when the judgments containing the injunction were rendered, or that they were in any manner hindering or obstructing the respondent company from working its lode. This being so, an injunction could not be used to eject them; and it was no violation of the injunction for the appellants to remain as they were when the injunction was granted.” The office of a writ of injunction, as its name imports, is peculiarly a preventive and *547not a remedial one; it is to restrain the wrongdoer, not to punish him after the wrong has been done or to compel him to undo it. An injunction, though restrictive in form, if it have the effect to'compel the performance of a substantive act, is mandatory, and necessarily contemplates a change in the relative positions or rights of the parties from those existing at the time the injunction is granted, or the decree is entered. To hold that an appeal from a judgment granting such an injunction does not stay the operation of the judgment, would often render a reversal of the judgment entirely ineffectual— “a barren victory.” (Dewey v. Superior Court, 81 Cal. 68; Merced Mining Co. v. Fremont, 7 Cal. 132.)
We think that the court below exceeded its jurisdiction in adjudging the parties guilty of contempt. •
The demurrer to the petition is overruled, and it is ordered that the writ issue as prayed for.
De Haven, J., and Harrison, J., concurred.
Hearing in Bank denied.