This case is in fact an action ex relatione, in which the relators are A. P. Johnson and another, and the respondent is J. F. Case, a justice of the peace, although the papers in the court below were entitled Johnson et al. v. Case. (Territory v. Potts, 3 Mont. 364.)
Section 794 of the Code of Civil Procedure provides, in reference to justice courts: “Upon a verdict by a jury the justice shall immediately render judgment accordingly.” In the case at bar the justice followed this statute; and, in accordance with the verdict of 'the jury, and on the same day, to wit, February 16th, he entered judgment for the claim and interest against defendants, and judgment for costs against the plaintiff. On motion of plaintiff, on February 24th, the justice undertook to partially set aside the judgment above described, and thereupon enter another judgment. This attempted judgment of February 24th varied from the judgment of February 16th, in that it added to the judgment against defendants an attorney’s fee for the plaintiff, and also taxed the costs against the defendants, which was contrary to the verdict of the jury, and contrary to the judgment of February 16th. This was not doné upon a new trial. A new trial was not applied for, nor granted, nor had. The action of the justice was simply a setting aside of the verdict of the jury as to costs, and the judgment in accordance therewith, and the entering of another and different judgment as to the costs, with the attorney’s fee added to the judgment for plaintiff, without any further or other trial. For convenience in referring to the action of the justice, we will call the judgment of February 16th the first judgment, and the action of the court of February 24th the second judgment. As we understand this case, *523all that was sought to be attacked and overthrown by the writ of certiorari in the district court was the second judgment. No attack was, or ever has been, made upon the first judgment, except the action of the justice of February 24th. The issue aud contention upon the trial on February 16th were solely as to the costs, as defendants admitted their liability upon the demand and interest. It is quite likely that that issue was not properly made, and that the pleadings were such, and defendants’ alleged teuder was such, that the judgment of February 16th, in favor of defendants for costs, was erroneous. But, upon the application for the writ of certiorari, no one complained of the first judgment. The question was whether the justice had jurisdiction to render the second judgment, and to that inquiry, we think, we should address ourselves.
The statute provides that “upon a verdict by a jury, the justice shall immediately render judgment accordingly.” (Code Civ. Proc., § 794.). “When the prevailing party is entitled to costs .... the justice shall add their amount to the verdict.” (Code Civ. Proc., § 799.) As the case was tried to the justice the “prevailing party” was, in effect, the defendants, i. e., the defendants prevailed in the contention. The only contention was as to the costs. In this defendants prevailed, i. e., the verdict was in their favor. The justice rendered judgment in accordance with the verdict, and in favor of defendants for costs. The word “ immediately,” as used in the statute above, has often been construed by courts. It has sometimes been construed as liberally as to mean twenty-four hours. But we have not observed that it has ever been construed as eight days. Now, if the justice is to immediately render judgment upon the verdict of the jury (§ 794), and if he is to add the costs to the verdict (§ 799), it would seem to be in contemplation that the question of who was to pay costs was something determinable upon the return of the verdict, and the immediate rendering of judgment; that is, we say that the question of, against whom the judgment for costs is to be, seems to be determinable with the general verdict. We do not think that we can be understood as holding that a justice has no jurisdiction or power after judgment to add an omitted item of costs, or cut out an item wrongly and inadvertently *524taxed. Such questions we do not understand are now before us, and upon them we express no opinion. What we are considering is the matter of a verdict and judgment upon the question of who shall pay the costs—not what the costs should be, in items. And, the matter of who shall pay the costs being adjudged by a justice in accordance with the verdict of a jury (§ 794), has the justice jurisdiction, eight days afterwards, to set aside that judgment, and readjudge the costs against another party? We understand that to be the question before us.
On February 16th there was a judgment in favor of defendants for their costs. Plaintiff did not attempt an appeal from this judgment. It was rendered by the justice upon the verdict of a jury. (Code Civ. Proc., § 794.) We are of opinion that we should not hold, under the circumstances of this case, that the costs were simply an incident of the judgment in the justice court, and, therefore, that the justice could add them eight days after the trial. Such view was not presented by counsel for the justice, who appeared and argued the case in this court. Whatever may be suggested about costs being incidental to the judgment occurs to us as scarcely applicable to this case, where the costs, instead of being an incident, were in fact the only contention which was tried—improperly tried, perhaps; the issue badly pleaded, probably. But still it was the only contention tried, and therefore seems not quite properly called, in this case, “incidental.” The verdict and judgment for costs in favor of defendants was separate and independent, and was not attached to any other judgment. It does not, therefore, seem to be appropriately called “ incidental.” We are of opinion that the proceeding of the justice in rendering the judgment of February 24th was clearly beyond his jurisdiction. (Code Civ. Proc., § 794; Winter v. Fitzpatrick, 35 Cal. 269; Weimmer v. Sutherland, 74 Cal. 343; Fox v. Meacham, 6 Neb. 530; Foist v. Coppin, 35 Ind. 471; Foster v. Alden, 21 Mich. 507; Stephens v. Santee, 49 N. Y. 35; Hamill v. Bosworth, 12 R. I. 124; People v. Delaware Common Pleas, 18 Wend. 558; Corthell v. Mead, 19 Col. 386.) In the Colorado case last cited it is held that, when a justice enters judgment on a verdict of a jury, his act is simply ministerial, and not judicial. That case further remarks: “ The judgment *525being entered according to the verdict, the aggrieved party may appeal; but the justice has no authority to render any judgment contrary to the verdict, and, if he does so, such judgment may be regarded as a nullity. Any other doctrine would involve proceedings in justices’ courts in troublesome, expensive, and vexatious delays, and would greatly hinder and embarrass the administration of justice. (Freeman on Judgments, § 53 a; High on Extraordinary Legal Eemedies, §§ 235-42.)”
The attempted judgment of February 24th was therefore void. Then, the question remaining for our consideration is, Can that judgment be reached and overturned upon a writ of certiorari? The respondent contends that an appeal lies to the district court from the justice court, from such judgment, and cites Ducheneau v. House, 4 Utah, 363; Saunders v. Seed Co., 6 Utah, 431; Trustees v. Shepherd, 139 Ill. 114; Sioux Falls Nat. Bank v. McKee (S. D., Jan. 26, 1892), 50 N. W. Rep. 1057; Livermore v. Campbell, 52 Cal. 75; Fox v. Nachtsheim, 3 Wash. 684.) He therefore contends that if an appeal lay from the judgment of the justice of February 24th the certiorari was properly dismissed by the district court. (Hayes v. District Court, 11 Mont. 225.) But let us examine whether, in fact and in substance, there is an appeal which reaches the attempted judgment of February 24th. Anderson’s Law Dictionary defines an “appeal” as, “To remove a cause to, a higher court for review and retrial.” In general terms, an appeal is a resort to an upper court, to review the action of a lower court.
In the justice court in this case there were two records, each of which is called in the argument a “judgment.” One was the first judgment, of February 16th; the other was the second or attempted judgment, of February 24th. Of the former, the defendants had no complaint. The latter was their grievance, which they wished to have righted. If the defendants could have appealed from the second judgment, and if they could have had that action of the justice reviewed, and if they could have had the district court decide whether the justice of the peace was right or wrong in his action of February 24th, and if, it appearing he was wrong in that *526respect, tbe district court could liave reversed that wrongful action, and have sent the case back with directions to the justice to wipe out the attempted judgment of February 24th, and leave defendants as they ought to have been left by the justice (that is, with the judgment of February 16th standing until it was properly attacked), then, if such could have been the result of the appeal by the defendants from the justice’s to the district court, the defendants would have had an appeal in substance as well as in name—an appeal which would have reached the grievance which they claimed to have suffered. But an appeal to tbe district court would have wrought out no such result as as above suggested. Had the defendants appealed, the district court would never have reviewed the pretended judgment of February 24th.- The ease would have been tried de novo. The attempted judgment of February 24th and the judgment of February 16th would have each been ignored, and the matter would have been tried de novo in the district court. There would have been a retrial in that court of the merits of the case. There would not have been a review of the performance of February 24th. The latter, the defendants wanted; the former, they did not. They would therefore get what they did not want, which would be an injury to them, and would be deprived of that which they sought to obtain. They would ask for bread, and receive a stone. (State v. Evans, 13 Mont. 239.)
If it be suggested that an appeal by defendants from the judgment of February 24th would obtain for them a review' of the determination of the question of who should pay the costs of the action in the justice’s court, it may be replied that defendants had obtained a judgment in their favor once (February 16th) upon that subject (a judgment which had been set aside by the justice without jurisdiction), and, if there were appealing to do, defendants had the right to look to plaintiff to assume that burden. It is said in the Colorado case, cited above: “Did petitioners have a plain, speedy, and adequate remedy, by the ordinary course of law, for the action of the justice in refusing to enter judgment upon their verdict? It is urged that their remedy was by appeal, but this view is not sustained by sound reason, nor by the weight of authority. *527As we have seen, the justice, in assuming to arrest judgment upon the verdict, and in dismissing the case against claimants, acted wholly without authority. Even if the claimants could have appealed from the entry of such orders, such a remedy would not have been adequate. They had tried and won their cause, and were entitled to the fruits of their victory. Why should they be required unnecessarily to assume the expense, trouble, and hazard of another trial? Judgment should have been entered upon the verdict, and then the burden of an appeal, if any had been taken, would have fallen upon the plaintiffs. The taking of an appeal is a matter of some inconvenience and hardship. It involves the giving of a bond, with surety, and the advancement of costs, as well as the hazard of another trial. A remedy, therefore, which required the claimants, rather than the plaintiffs, to take an appeal, was not adequate. Besides, if the judgment had been entered for the claimants, it is not certain that any appeal would have been taken.” (Corthell v. Mead, 19 Col. 386.)
It is said by the supreme court of California, as to another matter, but of kindred nature: “A mandate that’ the superior court proceed to a .hearing of the appeal on the merits, or to a retrial of the issues, would not annul, but simply ignore, the order dismissing the appeal. The order must first be annulled by a direct proceeding; that is, by certiorari. Such is the remedy when the court has entered a judgment or made an order in excess of jurisdiction.” (Levy v. Superior Court, 66 Cal. 292.) So, in the case at bar, by an appeal the defendants in the justice court would attack and destroy that which was not to them a grievance, but rather a benefit; that is, the judgment of February 16th. And they would never be able to attack or have reviewed the grievance which they sought to appeal from, and which, in name and in shadow, they would appeal from; that is, the attempted judgment of February 24th. We are satisfied that such an appeal would be wholly unsubstantial. It would not be a review or retrial of the matter complained of. (Seedefinitions of “appeal,” supra.) Its only characteristic of an appeal would be its name.
It is said in Sioux Falls Nat. Bank v. McKee (S. Dak., Jan. 26, 1892), 50 N. W. Rep. 1057: “To justify the issuance of the *528writ, there must not only appear an excess of .jurisdiction, but that there is no appeal or other adequate remedy. If the judgment complained of could have been brought to this court by appeal, and the question of jurisdiction determined in such proceeding, that fact alone would prevent the issuance of the writ. Upon this point the statute could hardly be plainer. The evident design of the statute is to make appeal the ordinary method of bringing cases.up for review, and certiorari an extraordinary method, to be resorted to only when necessary to save rights which would otherwise be lost.”
We are of opinion that the case at bar is just such an one as is suggested in the closing words of that South Dakota case. The certiorari before us in this case is necessary “to save rights which would otherwise be lost.” It is necessary to save to the defendants in the justice court the right to have the illegal action of the justice on February 24th obliterated and destroyed, and, moreover, to have it destroyed without carrying down in such destruction the judgment of February 16th. Such right of defendants to demolish the illegal judgment of February 24th, and preserve the judgment of February 16th, could not be saved by an appeal on the part of the defendants, and such right could be saved by this writ of certiorari. (Fox v. Nachtsheim, S Wash. 684; Paul v. Armstrong, 1 Nev. 95.)
The result of these views is that we are of opinion that, conceding that an appeal did lie from the justice court to the district court, yet that such an appeal was one in name only, and was not an appeal in substance or in fact, as reaching to the grievance. Certiorari was therefore an appropriate remedy against the justice. The judgment of the district court, dismissing the writ of certiorari and affirming the judgment of the justice, is reversed, and the case is remanded, with instructions to the district court to sustain the writ of certiorari, and, in pursuance thereto, to annul the judgment which the justice of the peace attempted to render and enter on February 24th.
Reversed.
Pemberton, C. J., concurred in the conclusion.