
136 S.E.2d 891 (1964)
STATE ex rel. Lester Paul ROBB
v.
Otto C. BOLES, Warden, West Virginia Penitentiary.
No. 12330.
Supreme Court of Appeals of West Virginia.
Submitted May 26, 1964.
Decided June 23, 1964.
*892 Neal A. Kinsolving, Charleston, for relator.
C. Donald Robertson, Atty. Gen., George H. Mitchell, Asst. Atty. Gen., Charleston, for respondent.
HAYMOND, President.
In this original habeas corpus proceeding instituted in this Court in May 1964, the petitioner, Lester Paul Robb, who is confined in the West Virginia Penitentiary by final judgment of the Intermediate Court of Kanawha County rendered February 3, 1961, which sentenced the petitioner to imprisonment for a term of not less than two years or more than ten years for the principal offense of which he was convicted and to imprisonment for an additional term of five years, seeks a writ to prevent the enforcement of the additional term of five years imposed by the court under the provisions of Sections 18 and 19, Article 11, Chapter 61, Code 1931, as amended.
On May 4, 1964, this Court awarded the writ and appointed an attorney to represent the petitioner in this proceeding. On May 19, 1964, the date to which the writ was returnable, this proceeding was continued by agreement of the attorneys for the respective parties until May 26, 1964, at which time the defendant appeared and produced the petitioner before this Court. The defendant, who was represented by an assistant attorney general, presented no defense to the petition, and this proceeding was submitted for decision upon the petition and its exhibits and the written brief of the attorney in behalf of the petitioner.
The facts are not disputed and are stipulated by the attorneys for the respective parties.
A grand jury of the Intermediate Court of Kanawha County at the September Term, 1960, returned an indictment for a felony which charged the petitioner with the crime of forgery; and at that term of the court, on October 31, 1960, the petitioner entered a plea of guilty to the offense charged in the indictment. On January 6, 1961, another day of the same term of the court, the prosecuting attorney filed an information that the petitioner had previously been convicted and sentenced for two separate offenses, each of which was a felony, and the court entered an order filing the information. No further action was taken by the court concerning the petitioner during the September Term, 1960, which ended *893 on January 7, 1961. The petitioner was not confronted with the foregoing information until after the adjournment of the September Term, 1960, of the court or until February 3, 1961, during the January Term, 1961, of the court. At that time the court duly cautioned the petitioner and required him to say whether he was the same person named in the information. The petitioner acknowledged, in open court, that he was the same person and the court found that the petitioner had previously been convicted of a felony and had been sentenced on October 30, 1952, by the United States District Court for the Northern District of Indiana to be confined in the United States Penitentiary at Leavenworth, Kansas, for a term of five years and that he had been so confined in that penitentiary under the sentence of imprisonment.
The court by its final judgment rendered February 3, 1961, sentenced the petitioner to confinement in the penitentiary of this State for a term of not less than two years or more than ten years for the principal offense and, because of his one prior conviction of a crime punishable by imprisonment in a penitentiary, also sentenced the petitioner to confinement in the penitentiary for an additional term of five years to begin at the expiration of the term of two years to ten years. The judgment provided that he be given credit for the time he spent in jail awaiting trial and conviction and that the sentence imposed should begin as of August 4, 1960.
The petitioner contends that the trial court, in imposing the sentence of imprisonment for an additional period of five years, did not comply with or satisfy the provisions of Section 19, Article 11, Chapter 61, Code, 1931, as amended, and that for that reason any sentence in excess of that provided by statute for the principal offense is void and unenforceable.
The decision in this proceeding is controlled by the decision of this Court in the habeas corpus proceeding of State ex rel. Foster v. Boles, W.Va., 130 S.E.2d 111, and that decision sustains the foregoing contention of the petitioner.
Section 19, Article 11, Chapter 61, Code, 1931, as amended, to the extent here pertinent provides that "It shall be the duty of the prosecuting attorney when he has knowledge of former sentence or sentences to the penitentiary of any person convicted of an offense punishable by confinement in the penitentiary to give information thereof to the court immediately upon conviction and before sentence. Said court shall, before expiration of the term at which such person was convicted, cause such person or prisoner to be brought before it, and upon an information filed by the prosecuting attorney, setting forth the records of conviction and sentence or convictions and sentences, as the case may be, and alleging the identity of the prisoner with the person named in each, shall require the prisoner to say whether he is the same person or not. If he says he is not, or remains silent, his plea, or the fact of his silence, shall be entered of record, and a jury shall be impanelled to inquire whether the prisoner is the same person mentioned in the several records. If the jury finds that he is not the same person, he shall be sentenced upon the charge of which he was convicted as provided by law; but if they find that he is the same, or after being duly cautioned if he acknowledged in open court that he is the same person, the court shall sentence him to such further confinement as is prescribed by section eighteen of this article on a second or third conviction as the case may be." Section 18 of the same article and chapter provides, in part, that "When any person is convicted of an offense and is subject to confinement in the penitentiary therefor, and it is determined, as provided in section nineteen of this article, that such person had been before convicted in the United States of a crime punishable by imprisonment in a penitentiary, the court shall, if the sentence to be imposed is for a definite term of years, add five years to the time for which the person is or would be otherwise sentenced. Whenever *894 in such case the court imposes an indeterminate sentence, five years shall be added to the maximum term of imprisonment otherwise provided for under such sentence."
It clearly appears that the trial court did not comply with the requirement of Section 19 in that it failed to cause the defendant to be confronted with the charges set forth in the information and to be duly cautioned at the same term of court at which he was convicted of the offense charged in the indictment. The provisions of Section 19 are clear and free from ambiguity and the procedural requirements which it imposes are mandatory. In the Foster case this Court, approving and quoting point 3 of the syllabus in State ex rel. Housden v. Adams, 143 W.Va. 601, 103 S.E.2d 873, held in point 1 of the syllabus that "A person convicted of a felony cannot be sentenced under the habitual criminal statute, Code, 61-11-19, unless there is filed by the prosecuting attorney with the court at the same term, and before sentencing, an information as to the prior conviction or convictions and for the purpose of identification the defendant is confronted with the facts charged in the information and cautioned as required by the statute."
It is well settled by the decisions of this Court that the jurisdiction of a trial court to sentence to further confinement in the penitentiary a person who is convicted of an offense and is subject to confinement in the penitentiary for such offense depends upon and is derived from Sections 18 and 19, Article 11, Chapter 61, Code, 1931, as amended. State ex rel. Foster v. Boles, W. Va., 130 S.E.2d 111; State ex rel. Cox v. Boles, 146 W.Va. 392, 120 S.E.2d 707; Shears v. Adams, 145 W.Va. 250, 114 S.E.2d 585; State ex rel. Housden v. Adams, 143 W.Va. 601, 103 S.E.2d 873; State ex rel. Browning v. Tucker, 142 W.Va. 830, 98 S.E. 2d 740; Dye v. Skeen, 135 W.Va. 90, 62 S. E.2d 681, 24 A.L.R.2d 1234. This Court has also held that the provisions of Section 19 of the statute are mandatory and must be complied with fully for the imposition of a valid sentence of further confinement under the statute. State ex rel. Foster v. Boles, W.Va., 130 S.E.2d 111; State ex rel. Cox v. Boles, 146 W.Va. 392, 120 S.E.2d 707; State ex rel. Yokum v. Adams, 145 W.Va. 450, 114 S.E.2d 892; State ex rel. Housden v. Adams, 143 W.Va. 601, 103 S.E.2d 873; State ex rel. Browning v. Tucker, 142 W. Va. 830, 98 S.E.2d 740.
When, as here, it affirmatively appears from the record in the trial of a criminal case on an indictment for a felony punishable by confinement in the penitentiary for a period of less than life imprisonment that the trial court entered a judgment imposing an additional period of imprisonment under the habitual criminal statute, Sections 18 and 19, Article 11, Chapter 61, Code, 1931, as amended, but did not fully comply with the provisions of that statute by failing to cause the defendant in such case to be confronted with the charges in the information and to be duly cautioned at the same term of court at which he was convicted of the principal offense charged in the indictment, the added portion of the sentence, in excess of the maximum statutory sentence for such principal offense, is void for the reason that the trial court lacked jurisdiction to impose such additional sentence. State ex rel. Foster v. Boles, W.Va., 130 S.E.2d 111; State ex rel. Cox v. Boles, 146 W.Va. 392, 120 S.E.2d 707; State ex rel. Yokum v. Adams, 145 W.Va. 450, 114 S. E.2d 892; State ex rel. Housden v. Adams, 143 W.Va. 601, 103 S.E.2d 873; State ex rel. Browning v. Tucker, 142 W.Va. 830, 98 S.E.2d 740; State ex rel. Medley v. Skeen, 138 W.Va. 409, 76 S.E.2d 146; Dye v. Skeen, 135 W.Va. 90, 62 S.E.2d 681, 24 A.L.R.2d 1234; Ex Parte Evans, 42 W.Va. 242, 24 S.E. 888; Ex Parte Mooney, 26 W.Va. 36, 53 Am.St.Rep. 59.
The judgment which sentenced the petitioner to confinement in the penitentiary for an additional period of five years, being in excess of the imprisonment for an indeterminate period of two years *895 to ten years, the maximum sentence of imprisonment which the trial court had jurisdiction to pronounce upon the plea of guilty entered by the petitioner to the indictment against him for forgery, is a void judgment to the extent that it exceeds the maximum sentence of two years to ten years. A judgment which is wholly void, or is void in part, is subject to collateral attack in a habeas corpus proceeding. State ex rel. Foster v. Boles, W.Va., 130 S.E.2d 111; State ex rel. Cox v. Boles, 146 W.Va. 392, 120 S.E.2d 707; State ex rel. Yokum v. Adams, 145 W.Va. 450, 114 S.E.2d 892; State ex rel. Browning v. Tucker, 142 W.Va. 830, 98 S.E.2d 740; State ex rel. Medley v. Skeen, 138 W.Va. 409, 76 S.E.2d 146. The effect of a void judgment will be avoided and the enforcement of such judgment will be prevented by the writ of habeas corpus. State ex rel. Browning v. Tucker, 142 W.Va. 830, 98 S.E.2d 740; Dye v. Skeen, 135 W. Va. 90, 62 S.E.2d 681, 24 A.L.R.2d 1234; Ex Parte Evans, 42 W.Va. 242, 24 S.E. 888; Ex Parte Mooney, 26 W.Va. 36, 53 Am.St. Rep. 59. In the opinion in Ex Parte Evans, 42 W.Va. 242, 24 S.E. 888, this Court said: "Where the imprisonment is under process or order that is void, as distinguished from irregular or erroneous, the writ of habeas corpus holds it for naught, disregards or ignores it as not furnishing warrant for imprisonment; but it does not operate directly on the void process or judgment by annulling or reversing it, like an appeal, writ of certiorari, or writ of error, but, as a collateral procedure, simply releases from the prison by ignoring the alleged warrant for imprisonment."
The sentence of confinement for the additional period of five years, being void, can not be enforced. The relief from that portion of the sentence imposed upon the petitioner as prayed for by him is granted, and the petitioner after completely serving the valid portion of his sentence must be released. At this time, however, he has not served the valid portion of his sentence of two years to ten years which has been reduced to one year to ten years by statute enacted after sentence was imposed upon the petitioner, Chapter 27, Acts of the Legislature, 1961, Regular Session, and such sentence, as so reduced, has been consented to by the petitioner as provided in Section 2, Article 1, Chapter 63, Code, 1931. For this reason the writ, which would presently release him from confinement, is denied and the petitioner is remanded to the custody of the defendant until he has completely served the valid portion of his sentence of confinement in the penitentiary of this State.
Writ discharged; prisoner remanded.
