
95 N.W.2d 277 (1959)
Donald Wayne WALLACE, Petitioner-Appellant,
v.
Percy A. LAINSON, Warden, Iowa State Penitentiary, Appellee.
No. 49640.
Supreme Court of Iowa.
March 10, 1959.
Rehearing Denied May 8, 1959.
*278 Welch & Welch, Logan, for appellant.
Norman A. Erbe, Atty. Gen., Hugh V. Faulkner, Asst. Atty. Gen., for appellee.
HAYS, Justice.
Petitioner, now an inmate of the State Penitentiary, petitioned the Lee District Court for a writ of habeas corpus alleging his conviction and sentence was void. The writ was denied and he appeals.
In 1955, by a county attorney's information, the petitioner, appellant herein, was charged with breaking and entering in violation of section 708.8, Code 1954, I.C. A., and as an habitual criminal as defined in section 747.5, Code 1954, I.C.A. To this information petitioner, in person and by attorney, in open court entered a plea of guilty as charged and was sentenced to a term of not to exceed twenty-five years in the state penitentiary. Appearing *279 in the judgment entry is the following statement: "Sentence is being pronounced under the provisions of section 747.5 of the 1954 Code of Iowa, the defendant being sentenced as an admitted habitual criminal as defined therein."
The sole proposition argued on this appeal is that the trial court lacked jurisdiction to pronounce a sentence under section 747.5 due to a failure to comply with section 747.4, Code 1954, I.C.A.
Section 747.5, Code 1954, I.C.A., provides, "Whoever has been twice convicted of crime, sentenced, and committed to prison, * * *, for terms of not less than three years each shall, upon conviction of a felony committed in this state after the taking effect of this section, be deemed to be an habitual criminal, and shall be punished by imprisonment in the penitentiary for a term of not more than twenty-five years, * * *."
Section 747.4, Code 1954, I.C.A., provides, "Upon any trial when the indictment refers to former convictions of the defendant, the jury, if it finds the defendant guilty, and the court, if the defendant is convicted on a plea of guilty, must also find and determine specially whether the defendant had previously been convicted of either of the crimes referred to in the indictment, and the number of times so convicted."
Appellant states his case as follows: "In this case we respectfully submit that although there could be no attack upon the jurisdiction of the court over the parties and the subject matter if the Court had gone one step further and made a special finding that the defendant had in fact been guilty of the two previous convictions of crime which are a prerequisite to be adjudged an habitual criminal, but that in this case, when the court failed to do so, it failed to clothe itself with the necessary jurisdiction to pronounce sentence under Section 747.5." Assuming, but not holding, appellant's general proposition to be correct, it has no application to the instant case.
We have held many times that where an indictment charges prior convictions, the facts of the prior convictions are to be taken as part of the offense charged, at least to the extent of aggravating it and authorizing an increased punishment, and, that a plea of not guilty puts in issue not only the matter of the crime charged but the fact of an alleged former conviction. State v. Smith, 129 Iowa 709, 106 N.W. 187, 4 L.R.A., N.S., 539; State v. Lowe, 235 Iowa 274, 16 N.W.2d 226; State v. Eichler, 248 Iowa 1267, 83 N.W.2d 576. A plea of guilty admits all material fact averments of an indictment. Lockhart v. Smith, 241 Iowa 970, 43 N.W.2d 541; 14 Am.Jur., Criminal Law, Section 272; 22 C.J.S. Criminal Law § 424. A plea of guilty confesses the alleged prior conviction. 24 C.J.S. Criminal Law § 1964. Thus at the time the court pronounced sentence the defendant, appellant, had admitted the fact of two prior convictions and commitments, as well as the offense charged, i. e., breaking and entering.
While perhaps not squarely presented under the instant record, we are inclined to the view that a mere pronouncement of a sentence of twenty-five years would have been all that is required by Section 747.4, Code 1954, I.C.A. As supporting this view, see State v. Shepard, 247 Iowa 258, 73 N.W.2d 69. However, the trial court stated sentence was being pronounced under Section 747.5, Code 1954, I. C.A., as an admitted habitual criminal as defined therein. It thus, in effect, found defendant had specifically pleaded guilty to the prior convictions, which amounts to a specific finding of the former convictions. There is no merit to Appellant's contention.
Finding no error the order denying the writ is affirmed.
Affirmed.
All Justices concur.
