
103 S.E.2d 873 (1958)
STATE of West Virginia ex rel. Raymond HOUSDEN
v.
D. E. ADAMS, Warden, West Virginia Penitentiary.
No. 10996.
Supreme Court of Appeals of West Virginia.
Submitted June 3, 1958.
Decided June 17, 1958.
*874 Angus E. Peyton, Charleston, for relator.
W. W. Barron, Atty. Gen., Virginia Mae Brown, Asst. Atty, Gen., for respondent.
DUCKER, Judge.
Raymond Housden filed his petition in this Court for a writ of habeas corpus ad subjiciendum directed to D. E. Adams, Warden of the West Virginia Penitentiary. The petition alleges that petitioner is confined in the penitentiary for and during his natural life and that the sentence is illegal and in violation of petitioner's constitutional rights. Upon the issuance of the writ by this Court on May 20, 1958, counsel was appointed to represent the petitioner.
It was stipulated by counsel for the parties that certified copies of the indictment, the order showing a true bill, the order of arraignment, the order of trial, the order for pre-sentence social, physical and mental examinations, the information and the final order and prayer of the petition, constituting the record of the criminal proceeding against the petitioner in the Circuit Court of Jefferson County, West Virginia, be made a part of the record in this proceeding.
The petitioner was indicted in the Circuit Court of Jefferson County, West Virginia, at its September, 1957, Term, for sodomy, and on September 18, 1957, upon arraignment entered a plea of not guilty; on September 24, 1957, he was tried by a jury and found guilty, and the court took time to consider its judgment; on September 26, 1957, the court committed the petitioner to the State Commissioner of Public Institutions for pre-sentence social, physical and mental examinations as provided by statute; on December 9, 1957, at a subsequent term, namely, a Special Term of the Circuit Court of Jefferson County, the petitioner was returned from the custody of the State Commissioner of Public Institutions and brought before the court, and the Prosecuting Attorney of Jefferson County, on that day, filed his duly verified information, alleging that Raymond Housden had been convicted in the Commonwealth of Virginia for the commission of three separate felonies on separate dates, namely, December 5, 1945, September 30, 1946, and October 15, 1947, respectively, and further alleging that the petitioner had been sentenced on each conviction and that each conviction stood unreversed and unappealed from, and that the petitioner, then before the court for sentencing for his conviction in the September Term of said Court of the felony of which he was found guilty, was one and the same person; the Court inquired of petitioner if each of these facts so alleged was correct, to which the petitioner answered in the affirmative; and thereupon the Court sentenced the petitioner to confinement in the West Virginia Penitentiary for life.
*875 The respondent answers that the petitioner is legally confined for life in the penitentiary, pursuant to a judgment valid on its face and a valid commitment based thereon by a court of competent jurisdiction, and prays that the writ be discharged and the petitioner be remanded to his custody.
The contentions of both the petitioner and the respondent, however stated, raise the sole issue of whether the Circuit Court had jurisdiction to impose the sentence of life imprisonment, or any sentence in excess of a term of one to ten years, which is the period prescribed by Code of 1931, 61-8-13, for the crime of sodomy for which the petitioner was indicted and of which he was convicted by the verdict of the jury, because of failure of the Circuit Court to comply with the requirements of Code 61-11-18 and 19, as last amended by Chapter 31, Acts of the Legislature, 1943, Regular Session, known as the habitual criminal statute, which provides as follows:
"[18] Punishment for Second or Third Offense of Felony.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 (§ 6131) 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 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.
"When it is determined, as provided in section nineteen hereof, that such person shall have been twice before convicted in the United States of a crime punishable by confinement in a penitentiary, the person shall be sentenced to be confined in the penitentiary for life.
"§ 6131. [19] Procedure in Trial of Persons for Second or Third Offense.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 (§ 6130) of this article on a second or third conviction as the case may be." (Italics ours.)
The principles governing a decision in this case were conclusively stated in the case of State ex rel. Browning v. Tucker, 142 W.Va. ___, 98 S.E.2d 740, 743, as follows:

*876 "A habeas corpus proceeding is not a substitute for a writ of error or other appellate process and error in a final judgment in a criminal case, which renders such judgment voidable merely but not void, can not be considered or corrected in such proceeding; but if a sentence of imprisonment under which a person is confined is void, in whole or in part, it may be reached and controlled in a habeas corpus proceeding. * * *
"A void judgment, being a nullity, may be attacked, collaterally or directly, at any time and in any court whenever any claim or right is asserted under such judgment. * * *
"* * * A judgment which is wholly void, or is void in part, is subject to collateral attack in a habeas corpus proceeding. * * *
"When, without any showing to the contrary, 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 less than life imprisonment, that the trial court did not comply with the habitual criminal statute then in effect * * * a sentence of life imprisonment upon the convict, based upon the statute, is void, to the extent that it exceeds the maximum sentence for the particular offense charged in the indictment, for lack of jurisdiction of the trial court to render it, and the effect of that part of the sentence of life imprisonment, in excess of the maximum sentence for such particular offense, will be avoided and its enforcement prevented in a habeas corpus proceeding."
Here the petitioner was convicted of a criminal offense, punishable by confinement in the penitentiary, in one term of court, and in a subsequent term of the court he was charged and sentenced under the habitual criminal statute. This course of action is not in compliance with the plain and unambiguous provisions of such statute, and as compliance with the provisions of the habitual criminal statute is jurisdictional and mandatory, there can be no material deviation therefrom, and must be applied. While procedural steps relating to sentencing and other matters, including sentencing, may be done at a subsequent term, if the habitual criminal statute is sought to be enforced, the information must be given and the convicted person confronted with the charge of previous convictions "before expiration of the term at which such person was convicted."
The procedure, as set out in section 19 of the habitual criminal statute, expressly requires that before a sentence of life imprisonment may be lawfully imposed it must be admitted, or by the jury found, that the person convicted had previously been twice sentenced in the United States to a penitentiary, and such section further provides that the prosecuting attorney must give information to the court of such sentences "immediately upon conviction and before sentence" and "said court shall, before expiration of the term at which such person was convicted" proceed to confront the convicted person with the charges for the purpose of identifying the convicted person with the person so previously convicted, either by his admission or for the purpose of determining such fact later by a jury finding. There is no provision in such section requiring the other steps such as sentencing at that term, as these, we think, could be had at some subsequent term within a reasonable time.
The Attorney General directs the attention of the Court to the provisions of Chapter 43, Acts of the Legislature, 1957, Regular Session (Code 27-6A-1 and 4), which requires the court to commit a person convicted of offenses under Code, 61-8-12 and 13 (incest and sodomy) to the State Commissioner of Public Institutions for presentencing social, physical and mental examinations. *877 Section 1 of such act does so require, and section 4 is in this language:
"Upon completion of the examination, but not later than sixty days after the commitment order, a report of the results of examination and recommendation of the board of control (State Commissioner of Public Institutions) shall be sent to the court."
We see no impediment in this statutory provision to the valid procedures under sections 18 and 19 of the habitual criminal statute. The procedures required for the filing of the information and the identification, if then possible, of the convicted person, as hereinabove discussed, may be properly carried out at the same term in which the person was convicted, and the person then committed to the State Commissioner of Public Institutions, and upon report of such Commissioner or his failure to report, as in this instance, the person convicted could properly be sentenced within a reasonable time at some subsequent term.
The record here clearly shows the petitioner was improperly sentenced to life imprisonment when he legally could have been sentenced only to a term of one to ten years, under Code 61-8-13.
The judgment sentencing the petitioner to life imprisonment, being in excess of imprisonment for a term of ten years, which is the maximum sentence of imprisonment which the Circuit Court had jurisdiction to pronounce upon the verdict convicting the petitioner of the crime of sodomy, is a void judgment to the extent it exceeds the maximum sentence of imprisonment for ten years from the date of its rendition. State ex rel. Browning v. Tucker, supra.
"A petitioner in a habeas corpus proceeding upon whom punishment by imprisonment for life has been imposed, under Code, 61-11-19, may be relieved of the void portion of the punishment, but will not be discharged from serving the maximum terms provided by statute as punishment for the principal offenses." State ex rel. Medley v. Skeen, 138 W.Va. 409, 76 S.E.2d 146, or, as in this case, will not be discharged from serving the maximum term provided by statute as punishment for the principal offense.
Therefore, since petitioner was sentenced December 9, 1957, and the maximum valid term of ten years, for which he could be sentenced under such conviction, has not been served, we must deny his prayer for release upon the writ of habeas corpus ad subjiciendum heretofore issued; and, the petitioner is remanded to the custody of the Warden until he has completely served the valid portion of his sentence of confinement in the West Virginia Penitentiary.
Writ discharged; petitioner remanded.
GIVEN, Judge (concurring).
I concur in the conclusions of the Court, relating to the lack of jurisdiction of the Circuit Court of Jefferson County to impose that part of the sentence declared void. The reason for the action of the Legislature, however, in limiting the jurisdiction of trial courts in some cases to a single term has caused me concern, though, of course, the Court is not required to spell out any reason why the legislation was enacted. Nevertheless, especially in habeas corpus proceedings, principles of due process should be matters of concern of the courts. As I understand the opinion, the Court does not hold that additional punishment can not be imposed on a defendant as to prior convictions, in the circumstances of this case, but merely that a particular court may not do so after a certain time.
The real problem, to my mind, is solved by consideration of the provisions of Code, 62-8-4, as amended, relating to the imposition of such additional punishment by the Circuit Court of Marshall County, the county wherein the state penitentiary is located, in the event such additional punishment was not imposed in the court of the last conviction, pursuant to Code, 61-11-18, 19, as amended. When the two statutes are considered, *878 the statutory provisions accord to persons previously convicted and made liable for such additional punishment the same or equivalent rights as to the procedure for the imposition of such additional punishment. Some persons previously convicted are not relieved as to such additional punishment, for example, where the necessary facts were unknown to the prosecuting attorney in time to file an information, while others are subjected thereto. In this view of the total legislation, I see no denial of due process. Moreover, the treatment of the matter by the Legislature has the salutary effect of permitting persons convicted of serious offenses to be moved to the state penitentiary immediately after conviction, thereby preventing, at least in some cases, confinement in local jails until some future term or terms of court for such purposes as allowing prosecuting attorneys, or others, to conduct investigations, or, to obtain witnesses from distant points.
I am authorized to say that Judge BROWNING concurs in the views herein expressed.
