The opinion of the court was delivered by
On the defendant’s plea of guilty he was sentenced to the penitentiary for embezzlement of money belonging to J. R. Ely. The petitioner asks his release on the ground that more than two years had elapsed between the time the warrant was issued and the time of his arrest, although he had been within the state during most of that time and the officer having the warrant knew at all times where the petitioner was, and that the latter had requested the officer to arrest, the petitioner in order that he might be brought to trial. As a. further ground for his release the petitioner shows that more than two terms of court had gone by after the issue of the warrant before the term of court at which he pleaded guilty, and that he had not consented to such-postponement. The respondent argues that the petitioner was confined in the penitentiary during most of the time after the issuance of the warrant until the arrest, and that the petitioner had not been out of the penitentiary for two. years after the warrant was issued and before *137the arrest was made. The respondent also urges that the petitioner cannot in a proceeding in habeas corpus raise the question of the validity of the judgment sentencing him to the penitentiary on his plea of guilty to the charge of embezzlement contained in the information filed against him. If the last proposition urged by the respondent is correct, it is unnecessary to examine any other proposition presented.
The pleas of the statute of limitations and of'former jeopardy in criminal actions are closely analogous and are governed by the same principles of law. Both are defenses, and they are defenses of the same general character. This court has had occasion to pass on the right of one convicted to present the question of former jeopardy in a proceeding in habeas corpus. In In re Gano, 90 Kan. 134, 132 Pac. 999, this court said:
“Ordinarily an error committed in overruling a plea of former jeopardy does not entitle the prisoner to a discharge in habeas corpus, but it must be corrected on appeal.” (Syl. ¶ 1.)
Qn page 135 the court used the following language:
“The petitioner is not entitled to a discharge in habeas corpus, for-two reasons. If a mistake had been made in overruling his plea of former jeopardy it could not be corrected in habeas corpus. It has been decided that if error is committed in overruling such a plea it must be corrected on appeal.”
In In re Terrill, 90 Kan. 138, 49 Pac. 158, the court said:
“Error in overruling a plea of former jeopardy, or in the matter of change of venue, cannot be considered on habeas corpus.” (Syl. ¶ 2.)
In these cases the plea of former jeopardy was interposed but not sustained. Here the plea of the statute of limitations was not interposed, but that does not change the rule; it could have been interposed, and if pleaded and not sustained the error could have been corrected on appeal if error had been committed. That plea was not interposed, and for that reason the statute was not relied on. The principle declared in the two cases cited was followed in In re Terry, 71 Kan. 362, 80 Pac. 586, and in In re Wallace, 75 Kan. 432, 89 Pac. 687. The conclusion to be drawn from these decisions of this court is that a defense in a criminal prosecution must be presented to the court on the trial of the case, and if error is committed therein the matter must be presented to the supreme court on appeal and cannot be raised in this court by habeas corpus.
No analogous case has been cited from this state involving the *138statute of limitations, but there are authorities to sustain the view that the question is one that must be presented on the trial and cannot be raised in an application for a writ of habeas corpus.
In 12 R. C. L. 1206, it is said that—
“Accordingly it has been held that the operation of a statute of limitations, barring a prosecution for a criminal offense, is not ground for the release of the accused on habeas corpus.”
In 29 C. J. 44- this language is found:
“The existence of a defense, which would have been good if pleaded, is not ground for habeas corpus to secure release from imprisonment under the judgment, whether such defense is in abatement or in bar, and whether the question raised is one of fact dependent upon the evidence or one of law for the court, where such defense does not go to the jurisdiction. The statute of limitations is mere matter of defense and is not a ground for discharge on habeas corpus; but there is authority to the contrary.”
Supporting the rule that the statute of limitations must be presented to the trial court are the following: United States v. Cook, 84 U. S. 168; Biddinger v. Commissioner of Police, 245 U. S. 128, 135, and Ex Parte Blake, 155 Cal. 586. It follows that the defense of the statute of limitations should have been presented to the trial court before the plea of guilty was entered.
The petitioner is remanded to the custody of the respondent to comply with the judgment of the district court.