SpaldiNG, Ch. J.
On the 10th of June, 1913, an information was filed against the appellant in the office of the clerk of the district court of McKenzie county, charging him with ■ the offense of keeping for sale intoxicating liquors as a beverage in said county. It would seem from the abstract that he had had a preliminary examination before a magistrate prior to the convening of the next preceding term of the district court, which was held in October, 1912, on this offense, and had been held to the district court by the magistrate, and that the cause had been placed upon the calendar of the October, 1912, term of that court, but that no information was filed until the June,’ 1913, term. Sometime during the October, 1912, term, he made an application for a continuance, on the ground of illness, which application was granted by the court. On the same day that the information was filed, counsel for appellant filed a motion and affidavit for change of the place of trial to some other county, upon the following grounds': 1. That the person appointed to prosecute had undue influence over the minds of the people of McKenzie county, and particularly over the minds of the jurors impaneled to try and determine said action; 2, that the sheriff of said county had similar undue influence; 3, that the state’s attorney and the *226sheriff of said county were prejudiced and biased against appellant; and, 4, that the people of McKenzie county, and particularly the jurors impaneled to try and determine the cause, were biased and prejudiced against the appellant, and against the offense with which he stood charged, and that, by reason of such prejudice and bias, it was impossible to obtain a jury in said county that had not formed and expressed an opinion as to the guilt or innocence of appellant, such as would disqualify them to sit and act as fair and impartial jurors in the trial of said action; and stating further that, by reason of such facts, he could not have a fair and impartial trial in said county. The state filed affidavits in opposition to the change. On the same day, and subsequent to the filing of such affidavit, he made a motion supported by affidavit of the defendant, for a change of the place of trial to another county, and to secure the attendance of some other judge to preside at such trial, by reason of the prejudice of the judge of the eleventh judicial district, in which McKenzie county is situated. The affidavit on which this motion was ba/sed, so- far as it relates to the prejudice of the state’s attorney and jurors and people, was substantially the same as the first affidavit filed, but to it was added the allegation that the judge of the judicial subdivision in which said action was pending was biased and prejudiced against said defendant. The court denied the motion for a change of venue and change of judges in these words: “I will deny the motion at 'this time on account of the fact that it comes too late,” and entered its order denying such motion, which order recites that “on the second day of the term, the defendant, without first having given any notice to the state’s attorney, presented to the court and filed a petition on oath,” and concludes, “and it appearing to this court that the original petition herein, and the one later offered, were neither of them filed nor offered within the time required by the statute, particularly in that they were not filed nor presented within the time specified in § 9920, Kev. Codes of N. D. 1905, as this action was continued from the last-term of the court, at the special instance of the defendant, and as the petition was not presented before this present term of this court, and as a reasonable notice thereof was not given to the state’s attorney, it is ordered, adjudged, and decreed that the petitions of the defendant for a change of venue be, and hereby are, denied.” Thereupon defendant objected to the jurisdiction of the court to call or impanel a jury to try *227the action, and to the introduction of any testimony on the part of the state, in brief on the ground that, by the filing of the affidavit and motion last referred to, the court was devested of jurisdiction. Subsequent objections were made on the same ground to the impaneling of a jury and to the swearing of witnesses. These objections being overruled and exceptions taken, the court proceeded with the trial of the action, the defendant declining to participate therein. In due time, a verdict of guilty was returned by the jury, and judgment was pronounced and entered on the verdict. From this judgment the defendant appeals, assigning as error the denial of his motions for a change of venue and for a change of venue and of judges. To make the record correct, we may add that, at the time of the argument of the motion for a change of the place of trial and of the judge, the second affidavit had not actually been filed, but defendant had requested leave to file it, and it was filed that day and it is found in the record. Hence, we' treat it as though it were on file at that time. We may further add that this appeal is discussed by both parties on the theory that § 9920, Rev. Codes 1905, applies to both an application for a change of the place of trial, and the combined application for a change of the place of trial and of the judge, by the defendant, it being contended on the one hand that, inasmuch as there had been a continuance, and that these applications were not made until the second day of the next term of court held after the continuance, and were made without notice to the state’s attorney, they came too late. On the other hand, the defendant contends that, inasmuch as the continuance was had before any information was filed in the district court that the June, 1913, term was the first term at which the case could have been tried, and that therefore, under the provisions of § 9920, supra, the applications were both in time. We cannot decide this case on the narrow grounds argued without establishing a precedent which we think would conflict with the statute. For a correct under _ landing of the statutory provisions, we set them forth as far as necessary to a decision of this appeal. They are found in article 5 of chapter 9 of the Code of Criminal Procedure, 1905. This article is entitled, “Removal of the Action before Trial.” Section 9919 reads: “The defendant in a criminal action prosecuted by information or indictment in any district court of this state may be awarded a change of the place of trial, upon his petition on oath, or upon the *228oath, of some credible person, setting forth that he has reason to believe and does believe, and the facts upon which such belief is based, that he cannot receive a fair and impartial trial in the county or judicial subdivision where said action is pending, upon any of the following grounds.” Then follow the grounds, which are, in brief, that the prosecuting witness or the state’s attorney or other person promoting the prosecution has undue influence over the minds of the people of the county or judicial subdivision where the action is pending; prejudice of the people of the county against the defendant or the offense of which he is accused; that it is impossible to' obtain a jury in the county or judicial subdivision that has not formed an opinion such as would disqualify them as jurors to sit in the case; or that any other cause exists in the county or judicial subdivision where the action is. pending, whereby he would probably be deprived of a fair and impartial trial. Section 9920 provides that “the petition must be presented at the first term of the court at which the action can be tried, and before the trial is begun, or if the action-has been continued, at any time before the term to which it is continued, upon reasonable notice to the state’s attorney, or the attorney appointed to prosecute. ...” Section 9921 requires the court; on being satisfied that cause exists for a change of the place of trial as defined in § 9919, to order a change of the place of trial. Section 9922 prescribes the duties of the. clerk in case of a change of' the place of trial. Sections 9923, 9924, and 9925 provide for the disposition of the defendant, if in custody, for bail for witnesses, notice to witnesses, and undertakings, subpaaias, etc. Section 9926 relates to the proceedings of the court to which the action is removed, and the transmission of papers to such court. It is not necessary to notice the next two sections. Section 9929 reads: “Whenever the defendant, or a defendant in a criminal action, shall file his affidavit stating that he has good reason to believe, and does believe, that he cannot have a fair and impartial trial of such action on account of the prejudice of the judge of the district court in which said action is pending, the court shall thereafter proceed in said action as follows: 1. If the defendant or a defendant asks for a change of the place of trial of said action on any of the grounds specified in § 9919, and also for the cause mentioned in this section, it shall be the duty of the court to order said action removed for trial to some other county or judicial subdivision in *229this state, as provided in this article, and to request, arrange for, and procure some other judge than the one objected to, to preside at the trial of said action.” Paragraph 2 of § 9929 is immaterial, except that it provides that a change, upon the ground in this section provided for, must be asked before the trial is begun.
That the provisions of § 9929, supra, are mandatory, is not open to question. It was so held before the statute was amended, and when the word “may” was used instead of “shall” in “it shall be the duty of the court.” State v. Kent, 4 N. D. 517, 21 L.R.A. 686, 62 N. W. 631; State v. Barry, 14 N. D. 316, 103 N. W. 631.
The change in the language of the statute makes it more imperative than formerly, and was intended to leave no question of its construction open. It is made the absolute duty of the court when an affidavit setting forth the facts specified is presented before the trial is begun, to change the place of trial and secure another judge to preside. It is not left to the judge to try and determine the question of his own disqualification, and as the change in the place of trial is coupled with the change of the judge, the same language applies, and the two demands cannot be separated, and one denied and the other granted. They are equally mandatory. When the affidavit conforms to the requirements of the Code, and his affidavit is presented in time, no trial can be had in the county where the information is filed, and the judge of that district has no further jurisdiction or power, except to make the transfer and to secure another judge to preside.
Do the provisions of § 9920, which require the petition to be presented at the first term at which the action can be tried, or if it has been continued, before the term to which it is continued, and upon notice to the state’s attorney, apply to an application under § 9929 ? It is argued by the state that, because the several sections to which we have made reference were orginally one enactment, and because of the phrase in § 9929 reading, “it shall be the duty of the court to order said action removed for trial to some other county or judicial subdivision in this state, as provided in this article, and to request, etc.,” it reaches over and limits the provisions of § 9929, and when the application for a change of the place of trial and of the judge is not made at the first term at which the case could have been tried, or when it is not made until after the commencement of the second term, and then without *230notice to tbe state’s attorney, the defendant does not bring himself within the terms of § 9929, and the court is not deprived of jurisdiction. We think this an erroneous view. Standing alone, as we have shown § 9929, it is mandatory. Section 9920 immediately follows § 9919, which relates only to a change in the place of trial, and relates only to the application authorized by § 9919. In deciding the application for a change in the place of trial, the judge reaches a determination on the facts presented as ground for such change, and it is only proper that there should be some limit to the time within which the application should be made, and it should then only be upon notice to the state’s attorney, if not made at the first term at which the trial might have taken place, thus enabling the state’s attorney to meet the allegations of prejudice. Then, again, as to the reasons for not trying it in the county or subdivision, the defendant has as much reason to know the state of feeling toward him and the offense when the information is filed, as he is likely to have at a later date. As to the prejudice of the judge, different reasons apply. The defendant may be unaware of the mental attitude of the judge toward him until after something has occurred in the preliminary proceedings leading up to and prior to the beginning of the trial. He may not have the information as to the judge until the last minute before a jury is impaneled, and if he then learns of the bias of the judge, it is just as necessary to his protection that there be another judge called into the case, as though he had learned of it prior to the filing of the information. The judge may have become prejudiced in the meantime. We do not construe the words “as provided in this article ” as applying to the method or time of making the application, when it is made under the provisions of § 9929. This applies rather to the other sections of the article prescribing the duties of the clerk and others after an order of removal is made, that is, as to what shall be done to complete the removal of the action to another county or subdivision, so as to give the court in the new county possession of the pleadings and put it in position to proceed with the trial. The only requirement contained in § 9929 relating to the time when the affidavit shall be filed is that it be before the trial is begun. Had it been intended to make § 9920 applicable to § 9929, there would have been no reason for repeating the requirement that it shall be “before the trial is *231begun.” If our understanding of these provisions is correct, the application for a change for the combined reasons of local prejudice, etc., and prejudice of the judge, was seasonably made. It follows from these considerations that the learned trial court was in error in retaining jurisdiction and in proceeding with the trial of the case, and we are compelled to reverse the judgment appealed from, and remand the case for further proceedings in accordance with law.