This is a companion case to State v. Waterhouse, 209 Or 424, 307 P2d 351, this day decided. As in that *477case, a demurrer to an indictment was sustained by the circuit court and the state has appealed.
The indictment charges the defendant with the crime of Detention and Inducement of Child with Intent to Commit Sodomy in violation of ORS 167.045, and further alleges that defendant had previously been convicted in the Oregon courts of the crime of rape in violation of ORS 163.210, and of the crime of sodomy in violation of ORS 167.040. These statutes are all enumerated in ORS 167.050, which provides that the penalty for violation of any of the statutes therein mentioned “by any person who has previously been convicted of a violation of any one, or more than one, of those sections, is punishable, upon conviction, by imprisonment in the state penitentiary for an indeterminate term not exceeding the natural life of such person.” The penalty for violation of ORS 167.045, the charge contained in the indictment, is imprisonment in the state penitentiary for a period not exceeding five years, or for an indeterminate term not exceeding the natural life of the person convicted.
The grounds of the demurrer are that the indictment includes prejudicial matter which precludes a fair trial and the defendant’s right to procedural due process, to wit, the allegations of prior convictions of rape and sodomy, that the same allegations are irrelevant and immaterial, that the facts stated do not constitute a crime under ORS 167.045, and that more than one crime is charged in the indictment.
The objection that the indictment does not state sufficient facts has not been urged in this court. The other grounds of the demurrer raise the same questions considered and decided by us in State v. Waterhouse, supra. As we there held, it is both proper and necessary, when a statute such as ORS 167.050 provides a *478heavier penalty for second and subsequent offenses, to allege in the indictment and prove prior convictions in order to make the defendant liable to the enhanced penalty, unless the statute otherwise provides; and, further, this procedure does not violate the defendant’s constitutional right to due process of law. The Water-house case controls the decision here.
The court erred in sustaining the demurrer, and the judgment is reversed and the cause remanded for further proceedings in conformity to this opinion.
Tooze, Acting Chief Justice, died December 21, 1956.