The opinion of the court was delivered by
MARSHALL, J.:The defendant appeals from a judgment granting a peremptory writ of mandamus commanding him as justice of the peace in the city of Hutchinson to grant a change of the place of trial and transmit the papers to another justice of the peace in an action pending before the defendant, wherein the Hutchinson Lumber Company is plaintiff and John L. Weaver, the plaintiff in the present action, is defendant.
*418The application for an alternative writ of mandamus showed that on the 18th day of October, 1921, the plaintiff in this action, the defendant in the action before the justice of the peace, applied for a change of venue on account of bias and prejudice of the justice. The application recited — ■
“That thereupon said justice stated that he would allow said change of venue, but would'not grant said change of venue nor transmit the papers in said case until the costs were actually paid to him.”
The alternative writ of mandamus was as follows:
To R. P. B. Wilson, Justice of the Peace in and for the City of Hutchinson, Reno county, Kansas:
“Whereas, it has been represented to this court that you have refused to grant a change of place of trial and to transmit the papers to another justice in the city of Hutchinson in the case of the Hutchinson Lumber Company vs. John L. Weaver until the accrued costs were actually paid to you. Whereupon, we being willing that justice should be done in the premises do command you that you R. P. B. Wilson, Justice of the Peace in and for the City of Hutchinson, Reno county, Kansas, do grant said change of place of trial and transmit said papers according to statute in such case made and provided; or in default thereof, that you make known to this court before the Judge thereof the 24 day of October, 1921, at 9:00 a. m., why you have not done the same. And have you then there this writ.”
The motion for a change of,venue contained the following:
“Said defendant hereby confesses a judgment for the accrued costs herein before the above-named justice as provided by section 7778, General Statutes •of Kansas, 1915.”
The record of the order of the justice of the peace on the motion . was that—
“The court after hearing the arguments of the parties and being fully advised finds said motion should be sustained on the condition that the defendant confesses judgment for costs and pays same.
“It is considered and adjudged said motion be sustained and this cause be transferred to Justice T. F. Cox in the City of Hutchinson, Kansas, for trial, and transcript and all papers in files are ordered transmitted upon the payment of costs by the defendant, taxed herein at $3.15, which defendant agreed to pay.”
The plaintiff, in his brief, states that he did not at any time agree to pay the court costs on his application for a change of venue.
The defendant argues that his order on the application for a change of the place of trial was the result of an exercise of judicial discretion which cannot be controlled by mandamus. He argues that if he made a mistake in imposing terms on the change in the *419place of trial, the mistake must be corrected on appeal. In response to this contention, it must be said that after the affidavit had been filed and the confession of judgment had been made, there was nothing for the defendant to do but grant the application for a change; he had no discretion in the matter.
The statutes material for consideration in the determination of the question presented are sections 75, 78 and 79 of the justice civil code. They read as follows:
“If, on the return of process, or at any time before trial shall have been commenced, either party shall file with the justice of the peace before whom any cause is instituted or is pending for trial, an affidavit, stating, first, that such justice is a material witness for either party; or, second, that he verily believes that he cannot have a fair and impartial trial before such justice on account of the bias or prejudice of the said justice against the affiant; or, third, if a jury be demanded by the adverse party, then that he cannot as he verily believes have a fair and impartial trial in such township, on account of the bias or prejudice of the citizens thereof — the trial of the case shall be changed to some other justice of the peace, as provided in the next section.” (Gen. Stat. 1915, § 7775.)
“Before any such change .shall be allowed, the costs, as specified in the next following section, shall be paid by the party applying for such change, or he shall have confessed a judgment therefor before the justice granting the change.” (Id., § 7778.)
“When such change is at the instance of the plaintiff, he shall be taxed with all the costs which have accrued and which shall accrue in the cause, until such transcript and papers shall be delivered to the justice to whom such cause is removed for trial; and when on the application of the defendant, he shall be taxed with the costs which have accrued for issuing subpoenas to witnesses, and service thereof, witness fees, and costs of the justice for transferring the cause to the docket of the other justice.” (Id., § -7779.)
The plaintiff relies on Herbert v. Beathard, 26 Kan., 746, an action in mandamus to compel a justice of the peace to grant a change of venue. The district court granted a peremptory writ, and the case was appealed to the supreme court, where the judgment of the district court was modified, in particulars not important here, and as modified was affirmed. The effect of the case was to allow a peremptory writ of mandamus to compel the justice of the peace to grant a change of venue. The court there said:
“The granting of a change of venue by a justice of the peace is not a matter of pure judicial discretion, but is in fact purely a ministerial act. The justice may, in some cases, exercise some judicial discretion in determining the question as to what justice he will send the case; but he cannot exercise any judicial discretion in determining whether he will grant the *420change of venue, or not. If the application, when the justice is finally called upon to act upon it, is sufficient, he must grant the change of venue, but if not, he must refuse it.” (Syl. If 3.)
The defendant relies on Spacek v. Aubert, 92 Kan. 677, 141 Pac. 254, where this court said:
“An erroneous refusal by a justice of the peace to grant a change of venue does not deprive him of jurisdiction. The remedy in such case is by appeal. Mandamus will not be allowed to correct the error.” (Syl. ¶ 2.)
In Hamilton v. Smart, 78 Kan. 218, 95 Pac. 836, the court used the following language:
“It was said that if an error was committed in denying a motion for a change -of venue it could be corrected in a proceeding in error, and mandamus could not be employed to compel the trial court to allow the motion.” (Syl.)
In Spacek v. Aubert, supra, several decisions of this court are reviewed. Herbert v. Beathard, 26 Kan. 746, is not mentioned.
26 Cyc. 203 uses this language:
“Where there is a clear ministerial duty to award a change of venue, such change may be compelled by mandamus.”
26 Cyc. 196 says:
“Mandamus lies to compel a justice of the peace ... to change the place of trial.”
Before 1909, the code of civil procedure provided for a petition in error from the judgments and final orders of justices of the peace. That law was repealed when the code of 1909 was passed. (Kroenert v. Sawyer, 87 Kan. 374, 124 Pac. 418; In re Miller’s Estate, 90 Kan. 819, 821, 136 Pac. 255; Atkinson v. Kuchler, 94 Kan. 438, 146 Pac. 1038; Hallacy v. White, 106 Kan. 504, 188 Pac. 423.) Since 1909, the statutes, sections 120 and 121 of the justice civil code, provide for an appeal from the final judgment of a justice of the peace upon a bond being given to prosecute the appeal without unnecessary delay and to satisfy the judgment and costs if judgment be rendered against the party appealing. Do these statutes give to the plaintiff such an adequate remedy in the ordinary course of law as is intended by section 715 of the code of civil procedure? The defendant may not be able to give the bond required to perfect an appeal; his only adequate remedy is by an action in mandamus to compel the defendant to do what the law says he must do.
This may appear to be contradictory to Spacek v. Aubert, 92 Kan. 677, 141 Pac. 254; but, when that case was decided, this *421court was assuming that on an appeal from a judgment of a justice of the peace errors of the justice might be reviewed. Afterward, this court held otherwise. (Norman v. Toliver, 94 Kan. 356, and the unreported opinion referred to therein.) When it was held that errors of a justice of the peace cannot be reviewed, the reason for the rule declared in- Spacek v. Aubert no longer existed, and another rule must prevail.
The judgment of the district court is ¿firmed.