An action was commenced by the Attorney General in the name of the state against George E. Moody, the sheriff of Richland county, under chapter 24, Code Civ. Proc. (sections 5741, 5743, et seq., Rev. Codes 1899), for the purpose of securing his removal from office. The complaint alleged as grounds for removal many acts of malfeasance, misfeasance and nonfeasance in office. After the commencement of the action an application was made, upon notice, for an order suspending the defendant from the functions of his office until the final determination of the case upon the merits, pursuant to section 363, Rev. Codes 1899. Judge Lauder, of the Fourth Judicial District, with the consent of the counsel on either side, requested Judge Glaspell, of the Fifth Judicial District, to take jurisdiction of and to try and detrmine said motion and the case. The motion to suspend was taken up' for hearing by Judge Glaspell pursuant to said request. The counsel for defendant Moody appeared specially, and moved to dismiss the motion for suspension upon the ground that the court was without jurisdiction of the action, the subject-matter, or the person of the defendant; that the application to suspend was unwarranted by any provision of law. They moved to dismiss the action upon the same grounds. The two motions were heard together, whereupon the court sustained the motion of defendant’s counsel, and denied plaintiff’s motion to suspend defendant, without considering the affidavits or evidence offered by relator, or considering the merits of said motion or the case, and granted defendant’s motion to dismiss said action. An order was made and filed by the court reciting that: “The court having heard the arguments of counsel for the respective parties, and being duly advised in the premises, having granted said motion of the defendants to dismiss said action and motion: Now, therefore, it is hereby ordered that said action be, and the same is hereby, dismissed, and that judgment be entered dismissing the same, with costs to defendant.” Judgment of dismissal was accordingly entered. An alternative writ of mandamus was thereupon sued out of this court directed to the district court of the Fourth Judicial District, W. S. Lauder, judge of the Fourth Judicial District, and S. L. *218Glaspell, judge of the Fifth Judicial District, commanding them, or one of them, to proceed forthwith to hear and determine, on the merits, the application for suspension in the writ described, or to show cause before this court, at the time and place named therein, why a mandatory writ should not issue. On the return day of the writ the respondents answered separately, after first making objections to the jurisdiction of this court and filing demurrers to the alternative writ. No issue of fact is raised by the answers, and all points raised can be disposed of together. ■
From the return to the alternative writ it appears that Judge Glaspell considered, and so decided, that section 363, Rev. Codes— the only statute under which any pretense of authority can be found to suspend a county officer pending an action for his removal— has no application to a proceeding under chapter 24 of the Code of Civil Procedure, upon which the complaint in the action was founded; also that the complaint was insufficient to entitle plaintiff to proceed under chapter 24, Code Civ. Proc., for the removal of the defendant Moody from the office in which he is installed; that the court was without jurisdiction to try defendant for the purpose of removing him from office in proceedings under said chapter. Relator claims that the court was mistaken in holding that it was without jurisdiction to try a county officer for his removal from office in this form of action and to suspend him; that mandamus is the proper remedy to coerce the trial court into taking and exercising the jurisdiction which it in fact possesses, and to' hear the case, and render some decision therein upon the merits. It is conceded that in a proper case mandamus may issue to compel a court to proceed and try a cause when it refuses to do so upon the erroneous decision that it has no jurisdiction. Merrill on Mandamus, section 203; 19 Am. & Ene. L. 827, and cases in note. This remedy is not available, however, where there is another plain, speedy, and adequate remedy in the ordinary course of law to- accomplish the same purpose. Section 6111, Rev. Codes 1899 ; Cattermole v. Circuit Judge (Mich.) 99 N. W. 1. Neither will it lie for the purpose of controlling an inferior court in the exercise of its judicial judgment or discretion. People v. Garnett, 130 Ill. 340, 23 N. E. 331. The district court did not refuse to exercise the jurisdiction it possessed in this case. On the contrary, it considered and passed upon the right of relator to maintain the action to remove a public officer in the form of action and under the statute upon which he relied, and determined that no *219such action would lie. In making this determination the court was acting within the’scope of its jurisdiction, and determined a question properly before it for adjudication, and necessarily preliminary to a hearing of the motion to suspend. If the court decided erroneously, this was an error in the exercise of its jurisdiction, to be corrected on appeal. It cannot be compelled to reverse the decision on mandamus. People v. Garnett, 130 Ill. 340, 23 N. E. 331; People v. Dutchess Common Pleas, 20 Wend. 658; People v. Weston, 28 Cal. 640; Ex parte Ry. Co., 103 U. S. 794, 26 L. Ed. 461; Ex parte Hurn, 13 L. R. A. 120, and note; State v. Court 38 N. J. Law, 182; State v. Court (Mont.) 64 Pac. 352; Ex parte Brown, 116 U. S. 401, 6 Sup. Ct. 387, 29 L. Ed. 676; 19 Am. & Eng. Enc. L. 829. The distinction between a case where the lower court has refused to take jurisdiction, when, by law, it ought to do so, and one where it refuses to proceed in the exercise of jurisdiction it has obtained, is illustrated in Ex parte Parker, 131 U. S. 221, 9 Sup. Ct. 708, 33 L. Ed. 123. Referring to the case of Ex parte Brown, 116 U. S. 401, 6 Sup. Ct. 387, 29 L. Ed. 676, the court said: “The Supreme Court of the territory entertained jurisdiction of the cause which was brought before it by appeal, but dismissed it for want of due prosecution — that is to say, because errors had not been assigned in accordance with rules of practice applicable to the form of the action; and we held that the judgment could only be reviewed here on writ of error or appeal, as the case might be. In the case before us the Supreme Court of the territory dismissed the appeal because not properly taken; that is, because the cause had not been brought before it from the lower court. The distinction in the two cases is obvious. In the one the court below had taken jurisdiction and acted, but in the present case it refused to take jurisdiction.” In Ex parte Pennsylvania Co., 137 U. S. 451, 11 Sup. Ct. 141, 34 L. Ed. 738, it is decided that, after a case has proceeded to the filing of a declaration and a plea to the jurisdiction, or its equivalent, and a judgment is rendered in favor of the plea, and a consequent dismissal of the action, the plaintiff is confined to his remedy by writ of error, and cannot have a mandamus. In Shine v. Ry. Co., 85 Ky. 177, 3 S. W. 18 — an action under the statute for condemnation of land- — the county court refused to impanel a jury to try the issue as to value, but, on objection of the defendant to the court’s jurisdiction, dismissed the case. Mandamus was applied for to compel the county judge to impanel a jury and *220try the case. The court, in denying the writ, said: “Unquestionably, the action of the county court was judicial. It did hot refuse to act. It did act, as shown by the copy of its orders filed with the petition, and dismissed the proceeding upon the ground that the appellee could not maintain it owing to the appointment of the receiver. It is unnecessary to decide whether the ruling was correct or not. The right of the appellee to maintain the proceeding was a question presented to the county court by the record for its decision. It exercised its judgment, and dismissed it because it was of the opinion that the appellee had no such power. It reached this conclusion in the exercise of its discretion, and, while mandamus will lie to set a court in motion, it cannot be used to control the result. It may compel the trial of an issue, but not how it shall be tried.”
The dismissal of the relator’s case did not deprive him of adequate remedy through which he may obtain the trial of tire issues which he attempted to -have litigated in that case. The object he sought to attain was the removal from office of the sheriff of Richland county for acts of misconduct in office. The acts complained of as grounds for removal can be made available for the same purpose in a different form of proceeding under section 7838, Rev. Codes 1899. This remedy is equally efficacious and speedy with that attempted by relator, and, being so, would bar the remedy by mandamus even if the court was in error in holding that it was without jurisdiction to try the action in the form it was brought. Territory v. Cavanaugh, 3 Dak. 325, 19 N. W. 413; State v. Osborn (Neb.) 83 N. W. 357; State v. Meiley, 22 Ohio St. 534; Goodwin v. Glazer, 10 Cal. 333 ; Railway Co. v. State, 25 Ind. 177, 87 Am. Dec. 358; People ex rel O’Brien v. Adams (Cal.) 22 Pac. 826. The judgment dismissing the first action, not being upon the merits, would not bar a proceeding against the sheriff under section 7834, Rev. Codes 1899. Roberts v. Hamilton, 56 Iowa, 683, 10 N. W. 236; White v. Savery, 50 Iowa, 515; Laird v. Morris (Nev.) 42 Pac. 11; Rosenthal v. McMann (Cal.) 29 Pac. 121. But it is urged that the other remedy is not adequate, in that it cannot be made available to afford relief upon the very subject-matter of the application; that plaintiff claims the right in a civil action to produce proof to the end that the sheriff may be suspended; that the court refused to hear such proofs upon the mistaken idea that it was without jurisdiction so to do, not only because the action in which the motion was made was improperly brought, but because the statute (section 363), which *221alone gives authority to suspend in any case, is a dead letter; consequently, should an action be commenced under section 7838, Rev. Codes 1899, for the removal of Sheriff Moody, the relief sought through this mandamus proceeding, to wit, an immediate bearing upon motion to suspend, could not be secured, and the accused would continue to exercise the functions of his office until the termination of the main case. It does not appear from the return that the court held section 363 a dead letter.
(100 N. W. 248.)The point was urged by counsel upon argument in this court that there is -no authority to suspend an officer pending his trial for removal, and Wishek v. Becker, 10 N. D. 63, 84 N. W. 590, was cited as necessarily settling this point. We do not think this question is before us for determination. If the remedy mentioned in section 363, Rev, Codes 1899, exists, and may be resorted to, either in an action under chapter 24, Code Civ., Proc., or a proceeding under section 7838, Rev Codes 1899, the fact remains that it can only be resorted to in a pending action. The action in which relator sought to make his motion has been terminated by the entry of a judgment of dismissal. This ended the action and all jurisdiction of the court over the defendant. The defendant stands, as to' that action, as if it had never been begun. Morgan v. Campbell, 54 Ill. App. 244; Loeb v. Willis, 100 N. Y. 231, 3 N. E. 177; Brooks v. Cutler, 18 Iowa, 433. The case cannot be reviewed or reinstated by mandamus. Moody, the defendant in that case, was not served with the petition and alternative writ in this proceeding. He is not before this court. His rights cannot be affected, and a judgment in his favor set aside, in a proceeding to which he is not a party, of which he has had no notice, and no opportunity to be heard.
The alternative writ of mandamus is quashed, and the proceeding dismissed.
All concur.