
121 N.W.2d 572 (1963)
175 Neb. 305
Major VON BOKELMAN, alias Gene Furgeson, Appellant,
v.
Maurice SIGLER, Warden, Nebraska State Penitentiary, Appellee.
No. 35379.
Supreme Court of Nebraska.
May 10, 1963.
*573 F. W. Carstens, Beatrice, for appellant.
Clarence A. H. Meyer, Atty. Gen., Richard H. Williams, Asst. Atty. Gen., Lincoln, for appellee.
Heard before WHITE, C. J., and CARTER, MESSMORE, YEAGER, SPENCER, BOSLAUGH, and BROWER, JJ.
*574 SPENCER, Justice.
This is an appeal from a judgment of the district court for Lancaster County denying an application for a writ of habeas corpus filed by the appellant, Major Von Bokelman, alias Gene Furgeson, hereinafter referred to as petitioner.
Petitioner alleges that he is unlawfully imprisoned in the State Penitentiary on a void sentence. His application for a writ of habeas corpus sets out the information filed against him in the district court for Dodge County, which involved two counts. The first count charged the petitioner with breaking and entering with the intent to steal property of value. The second count set out two previous convictions for felonies, and requested that upon conviction on the first count petitioner be deemed an habitual criminal. Petitioner alleges that he never entered a plea to said information; that he was deprived of counsel; that no valid sentence was imposed on him; and that no proper or sufficient hearing was ever had on the habitual criminal charge.
The only evidence presented by petitioner in the habeas corpus hearing is a transcript of the proceedings on three appearances in the district court for Dodge County, covering the arraignment, plea, and sentencing of the petitioner. The court denied the writ and dismissed the application. Petitioner prosecutes his appeal to this court.
Petitioner alleges four assignments of error which are as follows: "1. That the judgment rendered by the Court was contrary to the evidence.
"2. That the judgment rendered by the Court was contrary to law.
"3. That the judgment of the Court was erroneous, for the reason that the record shows that this petitioner was deprived of counsel at his trial in the District Court of Dodge County, Nebraska, from which Court he was sentenced to the State Penitentiary.
"4. That by reason of the irregularities in the proceedings in the District Court for Dodge County, Nebraska, this petitioner was deprived of a fair trial and the right to be represented by counsel."
The record does not support petitioner's contention that he was deprived of counsel at his trial in the district court for Dodge County. He was advised by the court that he was entitled to counsel and that if he was without funds the court would appoint counsel for him. He asked for the appointment of a specific attorney and was advised that if an attorney was appointed he would not be one of petitioner's choice but would be one chosen by the court. Petitioner then said he would try to see an attorney himself. At his next appearance he advised the court that he had been unable to get counsel, and when the court advised him he would check the list of attorneys and appoint counsel, the petitioner wanted to know if he could visit with the county attorney. A recess was taken to permit him to do so. After the recess, the county attorney advised the court that the petitioner wished to plead to the information. Defendant pleaded guilty. By so doing he waived his right to counsel.
We held in In re Application of Carper, 144 Neb. 623, 14 N.W.2d 225: "While a defendant in a criminal case is entitled to defend by counsel, such right is not inalienable and not conferred by consideration of public policy. He may, by judicial confession of guilt, waive the constitutional rights guaranteed him by the federal and state Constitutions."
On petitioner's allegation that he never pleaded to the information, we quote the following from the transcript offered by the petitioner on the habeas corpus hearing: "Mr. Kuhlman: (County Attorney) Are you prepared at this time to plead to the information? The Court: You understand that this is two counts? Major Von Bokelman: Yes. The Court: The breaking and entering charges carries a penalty of one to *575 ten years. Mr. Kuhlman: The penalty for the habitual criminal charge would be ten to twenty years. You understand that? Major Von Bokelman: Yes. Mr. Kuhlman: And what is your plea? Major Von Bokelman: Guilty."
This point is not argued nor discussed in petitioner's brief. However, in his statement of facts, petitioner suggests that there is nothing in the record to show that the court was aware of his plea of guilty. Attached to petitioner's application is a certified copy of the proceedings from Dodge County, including the journal entry. This recites that the petitioner entered a plea of guilty and that the court found him guilty and also found him to be an habitual criminal, and that the defendant was informed by the court of the findings of the court.
In Hulbert v. Fenton, 115 Neb. 818, 215 N.W. 104, we held: "Habeas corpus is a collateral, and not a direct, proceeding, when regarded as a means of attack upon a judgment sentencing a defendant; and, when the judgment is regular upon its face and was given in an action in which the court had jurisdiction of the offense and of the person of the defendant, no extrinsic evidence is admissible in a habeas corpus proceeding to show its invalidity."
The exact point involved in the fourth assignment is not specifically pointed out in petitioner's brief, but, from the application for the writ, we assume it pertains to the fact that after the defendant's plea of guilty, the court did not fix a time for a further hearing on the habitual criminal charge, and no waiver of the 3-day notice of hearing is shown. After the plea, the court permitted the county attorney to offer information on seven previous felony convictions of the petitioner, including the ones set out in the information. The proceedings were then continued to permit the court to personally visit with the defendant. Eleven days thereafter, the defendant was returned to the court and was sentenced to the State Penitentiary for 11 years.
The penalty provided by statute for the crime of breaking and entering is 1 to 10 years. S. 28-532, R.R.S.1943. Section 29-2221, R.R.S.1943, our habitual criminal statute, provides for a term of not less than 10 nor more than 20 years. The habitual criminal law does not set out a distinct crime, but provides that the repetition of the criminal conduct aggravates the offense and provides heavier penalties. See Jones v. State, 147 Neb. 219, 22 N.W.2d 710. It is evident from the information that this was the only purpose of the second count.
Habeas corpus is a collateral and not a direct proceeding when regarded as a means of attack upon a judgment sentencing a defendant. It cannot be used as a substitute for a writ of error. In re Application of Carper, 144 Neb. 623, 14 N.W.2d 225.
Petitioner cites Kuwitzky v. O'Grady, 135 Neb. 466, 282 N.W. 396, as authority for his right to a writ of habeas corpus. In that case there were two separate sentences, one of them on the specific offense which brought the defendant into court, the other on an habitual criminal charge, as though it were a distinct crime. We there held habitual criminality is a state, not a crime; the separate sentence on that count was void; and that after the sentence on the first count had been served, the application for a writ of habeas corpus was a proper procedure to review the sentence on the habitual criminal charge. That case has no application to the facts herein. Here there is only one sentence, which is not void. The habitual criminal provision was used only to justify a heavier penalty than that provided for the offense charged in the first count.
In order to release a person from a sentence and imprisonment by habeas corpus, it must appear that the sentence was absolutely void. Habeas corpus will not lie to discharge a person from a sentence of penal servitude when the court imposing the sentence had jurisdiction of the offense, had *576 jurisdiction of the person of the defendant, and the sentence was within the power of the court to impose. Truman v. Hann, 154 Neb. 501, 48 N.W.2d 418.
Accepting for the moment petitioner's premise that the provisions of the habitual criminal act do not apply and that the sentence being for 11 years is above the maximum which could be imposed without the habitual criminal act, this action still must fail.
In McElhaney v. Fenton, 115 Neb. 299, 212 N.W. 612, the defendant was sentenced to a term of not more than 20 years nor less than 3 years. The statute provided for a term of not more than 10 years nor less than 1 year. We said: "The fixing of the sentence at not more than twenty years was erroneous, but did not render the judgment void. It stands as valid and enforceable for the term that the statute authorized the court to impose sentence, to wit, for not more than ten years. However, while error was thus committed in entering the judgment, if the proper proceedings had been had looking to the correction thereof, the judgment would have been modified to conform with the provision of the statute. As we have seen, such proceedings were not had, hence, while the error remains, `habeas corpus will not lie on behalf of a convicted prisoner on the ground that the sentence to imprisonment is in excess of the statutory period, since such a sentence is erroneous merely, and not void.' In re Fanton, 55 Neb. 703, 76 N.W. 447."
For the reasons stated, the writ was properly denied and the application dismissed. The judgment of dismissal is affirmed.
Affirmed.
