
232 Ind. 593 (1953)
114 N.E.2d 640
REYNOLDS
v.
DOWD, WARDEN, ETC.
No. 29,042.
Supreme Court of Indiana.
Filed October 5, 1953.
Rehearing denied November 9, 1953.
T. Ernest Maholm, of Indianapolis, for appellant.
Edwin K. Steers, Attorney General, and Carl M. Franceschini, Deputy Attorney General, for appellee.
BOBBITT, C.J.
Appellant filed his verified complaint for writ of habeas corpus in the LaPorte Circuit Court, to which appellee filed a motion to quash on the grounds (1) the facts alleged in the petition are insufficient to constitute a petition for a writ of habeas corpus, and (2) the petition shows on its face that petitioner is being held pursuant to a legal and valid commitment issued under a judgment of a court of competent jurisdiction. *594 The motion was sustained, appellant refused to plead further, and from a judgment dismissing the action this appeal is prosecuted.
Appellant, by this action, seeks to set aside a judgment, of the Shelby Circuit Court, under which he is now in custody. The sole error assigned is the sustaining of appellee's motion to quash the writ.
A motion to quash a writ of habeas corpus is in the nature of a demurrer, and in order to withstand such motion the complaint must state facts sufficient to show an illegal restraint. Witte v. Dowd, Warden (1952), 230 Ind. 485, 489, 102 N.E.2d 630.
The sole ground for the writ alleged in plaintiff's complaint is that appellant was, by the judgment of the Shelby Circuit Court, twice placed in jeopardy for the same offense.[1] Is this allegation, if true, sufficient to sustain appellant's complaint for a writ of habeas corpus as against a motion to quash? On the record before us we think not.
The defense of former jeopardy is one which must be raised at the trial and in the court in which the issues were tried. Pivak v. State (1931), 202 Ind. 417, 420, 175 N.E. 278, 74 A.L.R. 406; Mann v. State (1933), 205 Ind. 491, 497, 186 N.E. 283, 187 N.E. 343; 25 Am. Jur., Habeas Corpus, § 52, p. 182; and generally it is not available as a ground for habeas corpus; Gillespie v. Rump (1904), 163 Ind. 457, 462, 72 N.E. 138; Wentworth et al. v. Alexander (1879), 66 Ind. 39; 25 Am. Jur., Habeas Corpus, §§ 51, 52, p. 182; 39 C.J.S., Habeas Corpus, § 23, p. 474; see also: 122 A.L.R. 1443 Ann.
The right to immunity from being twice put in jeopardy for the same offense is a constitutional right which *595 may be waived. State ex rel. Lopez v. Killigrew (1931), 202 Ind. 397, 406, 174 N.E. 808, 74 A.L.R. 631; 22 C.J.S., Criminal Law, § 277, p. 412; and the failure to raise the question properly in the trial court operates as a waiver of the right; 14 Am. Jur., Criminal Law, § 280, p. 958.
There is nothing in the complaint to show that the defense of former jeopardy was raised or presented at appellant's trial in the Shelby Circuit Court. Neither does the complaint state facts sufficient to bring the case within an exception to the general rule that a plea of former jeopardy is not reviewable in an action for writ of habeas corpus. The failure of appellant to raise this question properly in the trial court operated as a waiver. 14 Am. Jur., Criminal Law, § 280, p. 958, supra.
Since the only reason for appellant's alleged illegal detention is one which cannot be reviewed in this action, the complaint, therefore, does not state facts sufficient to sustain the writ. The motion to quash was properly sustained and the judgment of the trial court should be affirmed. Having reached this conclusion, it is not necessary to consider the second ground of appellee's motion to quash.
Judgment affirmed.
Gilkison, J., not participating.
NOTE.  Reported in 114 N.E.2d 640.
NOTES
[1]  The proceedings in which appellant claims he was first put in jeopardy for the offense for which he was tried and convicted in Shelby County, was in Marion County, Indiana.
