The object of this action, as instituted by Katie Schaetzel, a taxpayer, was to procure an injunction permanently restraining the city of Huron from the payment of certain interest-bearing warrants and bonds, described in her complaint, and alleged to have been issued by said city without authority, and for an unlawful purpose. After issue was joined upon certain paragraphs of the complaint by the answer of the defendant, appellant, who was the owner of certain of the bonds and overdue interest coupons mentioned in the complaint, applied to the court, and obtained an order allowing him to intervene in the action. Whereupon the respondent Schaetzel demurred to the complaint of the intervener, and the *137defendant, city of Huron, filed an amended answer thereto, which traversed the allegation of such complaint,. and contained averments similar in effect to the recitals of the complaint of Katie Schaetzel, and concluded with a demand for the same relief, and, in addition thereto, prayed that intervener’s bonds and coupons be declared and adjudged to be illegal and void. After overruling the demurrer above mentioned, and on January 11, 1893, the court, upon application of appellant made an order dismissing his complaint upon payment of costs, and. without prejudice to the cause of action stated therein. Within a few days thereafter, and during the same month, and upon the application of both respondents, the court made an order vacating and setting aside the order dismissing appellant’s complaint, and specified therein, as a sole ground therefor, that the court was without jurisdiction and had no power to make the order of January 11, 1893. From this order, Charles H. White, intervener, appeals.
Although there is no motion to dismiss the appeal before us, counsel for respondent maintains that the order is not appealable. Subdivision 4 of section 5236 of the Compiled Laws provides for an appeal from a,u order of the circuit court ‘ ‘when it involves the merits of the action, or some part thereof. ” Considered as to its force and effect, the order appealed from was a denial by the court, at the instance of the respondents, of appellant’s application to dismiss his- complaint of intervention upon payment of costs, and thus discontinue the prosecution of his alleged cause of action, which, as the pleadings then stood, presented the only questions at issue before the court, as it is clearly obvious from an inspection of all the pleadings that the intervener had become the only plaintiff in the case, and his claim was adverse to, and its enforcement was being resisted by, both Katie Schaetzel and the city of Huron. An examination of the merits of the case, so far at least as disclosed by the pleadings, was essential to a determination of the questions presented to the court by the application to dismiss; and an *138order may be said to involve the merits of the action when it requires a plaintiff to remain in court, and bear the expense of litigating a cause upon its merits; and with equal candor it might be said that an order dismissing thé complaint of the intervener would involve the merits'of the action, because, as to him, the effect of such an order would be to terminate the existence of his action. We therefore conclude that the order under consideration “involves the merits of the action, or some part thereof,” and is appealable. McLeod v. Bertschy, 30 Wis. 324. The question as to whether an order refusing plaintiff leave to discontinue his suit could be made the subject for an appeal was subsequently before the Wisconsin court on a motion to dismiss an appeal in an action between the above-named parties, and. from the opinion we quote the following: “The remaining question is, does the order appealed from involve the merits of the action? If it does it is an appealable order, and the motion must be denied. If it does not, it is not appealable, and the motion must be granted. Our conclusion is that the question must be answered in the affirmative. * '* * An order which involves the existence of the action necessarily involves the merits.” McLeod v. Bertschy, 33 Wis. 176.
Any person having an interest adverse to both the plaintiff and defendant may, before trial by leave of the court, intervene in an action, by setting forth in his complaint the grounds upon which the intervention rests, and either party may demur thereto or answer as though it were an original complaint. Comp. Laws, § 4886. The order appealed from in effect denies appellant’s application to pay the costs and dismiss his complaint of intervention, on the ground, as specified in such order, that the court, under the circumstances, had no power t'o grant an order of that character. While the common law seems to. vest the court with no discretion, but allows a plaintiff to dismiss his suit ■ before or after issue is joined, as matter of absolute right, and without leave of court, it appears to us that there may be, in the case of an intervener, controlling circum*139stances to be considered, and that as a matter of practice an application to dismiss should be submitted to the court, for the exercise of its discretion as to the terms on which a discontinuance is allowed; and if such dismissal would materially j rejudice the rights of a party to the action, as in case of a counterclaim, a regard for the substantial rights of litigants, and a disposition to avoid a multiplicity of suits, suggests that an order granting a discontinuance of an action might with propriety be refused. Cooke v. Beach, 25 How. Pr. 356; Mullen v. Peck, 57 Iowa, 430 10 N. W. 829; Mason v. Ryus, 26 Kan. 464; Bertschy v. McLeod, 32 Wis. 205; In re Butler, 101 N. Y. 307, 4 N. E. 518; De Wolf v. Manufacturing Co., 12 R. I. 133; Burns v. Reigelsberger, 70 Ind. 522; Peck v. McKellar, 33 Tex. 234; Keithley v. May, 29 Mo. 220; 1 Am. & Eng. Enc. Law, 184g; 5 Am. & Eng. Enc. Law, 676, note 1, holding that a judge at chambers may grant leave to discontinue. In a justice court a plaintiff may, without prejudice to a new action, voluntarily dismiss his suit at any time before it is submitted; and, from a regardful examination of numerous authorities, we conclude that leave to dismiss a complaint or discontinue an action ordinarily is, and ought to be, granted, and we are therefore of the opinion that the learned court erred in holding that it had no power to grant an order allowing appellant to withdraw his complaint of intervention upon the payment of the costs that had then accrued. Comp. Laws, § 6103. As a case in point under a similar statute, we cite Sheldon v. Gunn, 56 Cal. 582. The order specifies no reason for the conclusion that the court was without power to act in the matter, and, as the record fails to enlighten us upon that subject, we are unable to know the particular grounds upon which the learned court held that it was without such power. True, it appears from the record that the application to discontinue was not made at a trial term, but under section 4828, Comp. Laws, the court was open for the purpose of hearing and determining, at the instance of a party, an application for a judgment dismiss*140ing his complaint upon the payment of costs; and, the matter being properly presented, the court had jurisdiction and power to grant the order for. which appellant applied, and a refusal to exercise such power constitutes reversible error. Champion v. Commissioners, 5 Dak. 416, 41 N. W. 739; Smith v. Draget, 61 Wis. 222, 21 N. W. 46; Tyler v. Healey, 51 Cal. 191; Tilton Beecher, 59 N. Y. 176; Elliott, App. Proc. 605, and cases there cited.
Although counsel, in elaborate briefs, discuss the entire case upon its merits, we deem a consideration of the questions thus presented unnecessary, and not essential to a determination of this appeal. The order considered on this appeal is therefore reversed, and the complaint of intervention stands dismissed upon the payment of costs, in accordance with the order of the circuit court entered January 11, 1893, and subsequently set aside on the ground that the court was without power to make the same.