*548The opinion of the court was delivered by
Cunningham, J-.:This is an original proceeding in habeas corpus. The petitioner is confined in the penitentiary, at Lansing, Kan., by virtue of a judgment of the district court of the fourth judicial district of the territory of Oklahoma, for Kay county. The return of the warden sets up in full the order of that court for the confinement of the petitioner. To this return petitioner demurs. We greatly doubt whether, in this condition of the pleadings, the question sought to be raised is properly presented, but, waiving this, we look into the merits of the petitioner’s application.
He rests his right to be discharged upon the following claim. The statutes of Oklahoma provide :
“If the offense charged in the indictment be punishable with death or imprisonment in the territorial prison for life, if it be made to appear by the affidavit of the accused and two disinterested persons that a fair and impartial trial cannot be had in such county, the change must be granted.” (Stat. 1893, § 5138.)
The offense charged against the petitioner was of the kind mentioned in this statute. It was made to appear by his affidavit and that of two disinterested persons that a fair and impartial trial could not be had in Kay county, and an application was based thereon for a change of venue as therein provided. This application was refused, and the trial of the petitioner resulted in his conviction and the sentence, by virtue of which he is being detained by the respondent. His claim is that, as the statute directs that the change of venue must be granted when the application is made in the form as therein indicated, upon the making of such application the court lost *549jurisdiction of the case, and all acts of the court thereafter were wholly without warrant in law and void. We are not able to give our assent to this proposition. Undoubtedly it was error on the part of the district court of Kay county not to grant the change of venue as asked for, the application being in accordance with the requirements of the statute. For its refusal to do so the order would, beyond question, have been reversed upon proper proceedings to the higher court. Such refusal, however, was but error, and did not defeat or oust the court of jurisdiction.
The case of Lincoln v. Territory of Oklahoma, 8 Okla. 546, 58 Pac. 730, is cited by the petitioner in support of his contention. Some of the language of the court in that case supports the petitioner’s claim. This case, however, was one in which a like order of a district court was attacked upon direct proceedings, so that the language found therein which would lend color to the petitioner’s contention is entirely obiter dictum.
The contrary rule has been announced by this court in Barnhart & Brother v. Davis, 30 Kan. 520, 2 Pac. 633. The statute therein discussed (Gen. Stat. 1901, §5306) provides, in substance, that if a party files an affidavit stating that he cannot have a fair trial in that court, the trial should be changed to some other justice of the peace. Proper application was made, but the justice refused the change, and this court upon these facts announced the law to be as follows :
“Where a sufficient application for a change of place of the trial is made before a justice of the peace under the provisions of article 7, chapter 81, Compiled Laws of 1879, and the party making the application confesses judgment for the costs before the justice, it is the duty of .the justice to change the trial of the case to some other justice of the peace, as pro*550vided in the statute; but even if the application be sufficient, and is overruled, the ruling is simply erroneous. The justice does not lose his jurisdiction over the case, and the judgment subsequently rendered is not a nullity, or void for want of jurisdiction.”
In the case of The City of Ottumwa v. Schaub, 52 Iowa, 515, 3 N. W. 529, the court held:
“A motion for a change of venue, though properly made and erroneously overruled, will not deprive the court of jurisdiction to proceed in the trial of the case.”
' Another statement from the same opinion is as follows:
“It was held by this court in Finch v. Martin, 46 Iowa, 384, that upon proper application a change of venue should be granted from the court of a mayor to that of a justice of the peace. But upon the filing of a motion for a change of venue the mayor does not lose his jurisdiction over the cause. If the motion is overruled, the ruling is simply erroneous. The judgment subsequently rendered is not void for want of jurisdiction. It follows that upon the appeal of this cause to the district court that court acquires jurisdiction, and that the motion to dismiss the appeal was properly overruled.” (Page 516.)
We are compelled to deny the application of the petitioner for discharge from custody upon his writ of habeas corpus.
All the Justices concurring.