PER CURIAM.
— This is an application for a peremptory writ of mandate to compel the judge of the district court of the county of Flathead to cause to be entered an order changing the place of trial in a certain action commenced and pending in that court, wherein one Whiteside is the plaintiff and the relators are the defendants, to the county of Lewis and Clarke. An„ alternative writ was issued, the verified petition in support of which shows these facts: The action was brought to recover damages for alleged libels published by the defendants in the county of Flathead; all the defendants were served with summons in the county of Lewis and Clarke, where they reside; at the time the defendants appeared and demurred, they made and filed a demand for a change of venue to the county of their residence, and accompanied the demand with an affidavit of merits, which demand was denied. To the petition the respondent demurs for insufficiency, asserting that mandmnus is not the proper remedy, and also that, even if the remedy sought be proper, the order of the district court refusing the request to change the place of trial was correct. The relators, on the other hand, contend that the provisions of Sections 613, 61é, 615, of the Code of Civil Procedure, made it the ministerial duty of the court, upon the filing of the demand and affidavit of merits, to grant the change, and that the performance of such act by the district court of which the respondent is the judge is a duty specially enjoined' by statute, to compel the discharge whereof there is no plain, speedy and adequate remedy in the ordinary course of law, and that therefore mandamus is the remedy.
Granting or refusing to grant a change of venue upon the *332ground of residence is a judicial act, when done by a district court of this state. ’ On appeal to this Court from the final judgment of the district court, an order denying a change of venue demanded by the appellant may be reviewed (Section 1742 of the Code of Civil Procedure); hence we are cleaxdy of the opinion that mandamus is not, under the statutes of Montana, the proper remedy to compel a court of general common-law jurisdiction, or its judge, to grant a change of the place of trial of an action for libel to the county where the defendant resides and was served with summons, nor to correct or annul an erroneous order denying such change. The writ lies to coerce into activity, but not to direct the making of a particular judicial decision or ruling in a matter within the jurisdiction of the court or judge. If final judgment shall be entex’ed against the defendants in the action brought by Whiteside, an appeal therefrom is a plain, speedy and adequate remedy afforded them in the ordinary course of law for the review and correction of the supposed error committed in refusing to change the venue. If the writ be proper on the present application, then it might well be invoked to review any intermediate order or decision of a court or judge, such as an order overruling a demurrer to a complaint, or striking out irrelevant matter from a pleading, or granting or refusing a motion to quash a summons, or granting or denying a continuance. Mandamus may not thus be diverted from its legitimate office. From a multitude of cases supporting the conclusion here announced, we cite People v. Sexton, 24 Cal. 78; People v. McRoberts, 100 Ill. 458; State v. Cotton, 33 Neb. 561, 50 N. W. 688; People v. Hubbard, 22 Cal. 35; People v. Judge of Twelfth Dist., 17 Cal. 548; People v. Clerk of Court, 22 Colo. 280, 44 Pac. 506; Ex parte Chambers, 10 Mo. App. 240; State v. Clayton, 34 Mo. App. page 569. See, also, High, Extr. Leg. Eem. (4th Ed.) Sec. 172, and 4 Enc. Pl. and Prac. 442, 443 and 492.
The relators invite attention to State ex rel. Gleim v. Evans 13 Mont. 239, 33 Pac. 1010. That was a proceeding in certiorari, in which it was held that, when an application was *333made to a justice of the peace for a change of venue on the ground of the prejudice of the justice, any proceeding by the justice thereafter, except to transfer the cause to another justice, would be beyond his jurisdiction, and that any judgment subsequently rendered the justice on whom demand for a change was made should be annulled upon certiorari. Herbert v. Beathard, 26 Kan. 746, is a case of the same kind. The statute of Kansas provides, in substance, that if, prior to trial, either party shall file with the justice of the peace before whom a case is pending an affidavit stating that he believes he cannot have a fair and impartial trial, on account of-the bias or prejudice of the justice against, the affiant, the trial of the case shall be changed to another justice of the peace; and the court held that upon the filing of such an affidavit the justice of the peace does not exercise any judicial discretion in determining whether he will grant the change of venue or not, but that the granting of the change of venue is, under-such circumstances, a purely ministerial act. So, in Krumdick, v. Crump, Judge, 98 Cal. 117, 32 Pac. 800, the court, held that ma/ndamus would lie to compel a judge who, having been the attorney for the defendant in the action, was confessedly disqualified to grant a change of venue, the court saying that the statute left the disqualified judge no discretion to exercise; moreover, if he had tried and determined the cause, the judgment would doubtless have been void because coram nonjudice, since no man may adjudge his own case. It was held that his duty was specially enjoined by the statute, and was ministerial. In State v. Superior Court of King Co., 5 Wash. 518, 32 Pac. 457, a writ of prohibition was issued to the superior court to prevent it from trying a certain action, wherein the defendant had made due application for a change of venue to the county of his residence; and the decision proceeds upon the assumption or premise that, after the demand for a change of venue was made, the court had no jurisdiction of the action for the purposes of trial. No one of the cases relied upon by the relators is persuasive authority for their position.
*334The demurrer is sustained, and the application dismissed, for the reason that mandamus is not the proper remedy. Judgment will.be entered accordingly.
Dismissed.