
142 S.E.2d 377 (1965)
STATE ex rel. Carl HALL
v.
Otto C. BOLES, Warden, West Virginia Penitentiary.
No. 12459.
Supreme Court of Appeals of West Virginia.
Submitted May 25, 1965.
Decided June 1, 1965.
*378 Robert L. Baughan, Charleston, for relator.
*379 C. Donald Robertson, Atty. Gen., George H. Mitchell, Asst. Atty. Gen., Charleston, for respondent.
HAYMOND, Judge.
This is an original habeas corpus proceeding instituted in this Court on May 3, 1965, in which the petitioner, Carl Hall, seeks a writ to require the defendant, Otto C. Boles, Warden of the West Virginia Penitentiary, to release him from the penitentiary where he is presently confined under a sentence of life imprisonment, imposed by the Circuit Court of Calhoun County, West Virginia, on August 22, 1949.
Upon the filing of the petition in this proceeding this Court issued a writ returnable May 25, 1965 and appointed counsel to represent the petitioner. Upon the return day of the writ this proceeding was submitted for decision upon the petition and its exhibits, the answer of the defendant and its exhibits, and the written brief in behalf of the petitioner. No oral arguments were presented in behalf of either party and no written brief was filed in behalf of the defendant, who produced the body of the petitioner as commanded by the writ and also filed an answer. The answer alleged that the petitioner was indicted with two other persons by the grand jury of the Circuit Court of Calhoun County on August 16, 1948, for the crime of grand larceny; that the petitioner was arraigned and entered a plea of not guilty to the charge; that a jury was impaneled and upon the trial of the indictment the jury, by its verdict, found the petitioner guilty as charged in the indictment; that upon the return of the verdict of the jury the prosecuting attorney filed an information charging that the petitioner had been three times previously convicted and sentenced for offenses punishable by confinement in a penitentiary; that when confronted with the foregoing information the petitioner denied that he was the same person named in the information; that a jury was impaneled and upon a trial upon the information the jury found that the petitioner was the same person described in the information who was convicted and sentenced to the Industrial Reformatory at Chillicothe, Ohio, by the District Court of the United States for the Southern District of West Virginia, on November 3, 1928, and was the same person described in the information who was convicted and sentenced to the penitentiary of this State by the Intermediate Court of Kanawha County, West Virginia, on January 17, 1938; and that the Circuit Court of Calhoun County by final judgment rendered August 22, 1949, sentenced the petitioner to confinement in the penitentiary of this State for the term of his natural life. There is no denial of the foregoing facts and they are fully established by the record in each of the various criminal proceedings. Each of the orders entered in the first two criminal proceedings is silent as to the appointment or the presence of counsel for the petitioner. The record in the proceeding in which the petitioner was tried for the principal offense of grand larceny shows that he was represented by counsel in that proceeding.
The petitioner contends that the sentence of life imprisonment is unconstitutional, null and void for the reason that the petitioner, an indigent person who was not financially able to employ counsel, was denied the assistance of counsel to defend him against the first two offenses of which he was convicted and for which he was sentenced, in violation of the Sixth Amendment and the Due Process Clause of the Fourteenth Amendment to the Constitution of the United States.
It does not appear from the record that the petitioner had the assistance of counsel or that he in any wise waived that right in either of the foregoing two criminal proceedings.
The decision in this proceeding is governed and controlled by the recent decision of this Court in State ex rel. Whytsell v. Boles, W.Va., 141 S.E.2d 70, and the decision of this Court this day announced *380 in State ex rel. Lovejoy v. Boles, W.Va., 142 S.E.2d 374. In the Whytsell case this Court held in point 1 of the syllabus that "The denial of the fundamental right of the defendant to the assistance of counsel in a criminal proceeding applies to and invalidates any prior conviction of an offense within the meaning of a recidivist statute, and such conviction and any sentence of imprisonment imposed upon it, being null and void because of such denial, can not justify or support the imposition of any additional punishment under such statute."; and in point 2 of the syllabus that "To justify the imposition, under the recidivist statute of this State, of a sentence in excess of the sentence provided for the principal offense, the previous conviction and sentence must be a valid conviction and sentence; and if such previous conviction and sentence are void they will not constitute the basis for the imposition of the punishment provided by such statute and, in that situation, such statute will be deemed to be wholly inapplicable."
As the conviction and sentence for each of the two prior felonies punishable by confinement in a penitentiary are null and void for the reason that the petitioner was denied the assistance of counsel in each of those proceedings, the Circuit Court of Calhoun County was without jurisdiction to impose the sentence of life imprisonment under the recidivist statute of this State, Sections 18 and 19, Article 11, Chapter 61, Code, 1931, as amended, and the enforcement of such sentence will be prevented in this habeas corpus proceeding. "A judgment which is wholly void, or is void in part, is subject to collateral attack and the enforcement of such judgment will be prevented in a habeas corpus proceeding." Point 5, syllabus, State ex rel. Beckett v. Boles, W.Va., 138 S.E.2d 851.
The petitioner also contends that as the two prior convictions and sentences are void and as he has served the valid portion of the sentence imposed upon his conviction of the principal offense he is entitled to release from his present confinement.
At his trial upon the indictment for the principal offense of grand larceny the petitioner had the assistance of counsel. He had a fair trial, no right of the petitioner was violated or denied, and the Circuit Court of Calhoun County had jurisdiction of that proceeding. The conviction of the principal offense for which the petitioner was tried in the Circuit Court of Calhoun County in August 1949 was regular and valid in all respects and subjected the petitioner to imprisonment in the penitentiary of this State for an indeterminate term of one year to ten years; and if such sentence had been imposed by the circuit court, instead of the invalid sentence of life imprisonment, it would have required his confinement in the penitentiary for the indeterminate term provided by law. It appears from the record, however, that the maximum period of such confinement terminated and did not in any event extend beyond August 22, 1959 and that the petitioner, who is still confined in the penitentiary, has fully served the maximum period of the sentence provided by law.
"A person imprisoned under the valid portion of a sentence imposed upon his conviction of a principal offense who has fully served the maximum sentence provided by law for such offense will be released from custody by a writ of habeas corpus." Point 4, syllabus, State ex rel. Lovejoy v. Boles, W.Va., 142 S.E.2d 374. State ex rel. Whytsell v. Boles, W.Va., 141 S.E. 2d 70.
As the petitioner has fully served the valid portion of the sentence imposed by the Circuit Court of Calhoun County, he is entitled to be released from his present confinement and the defendant is directed to release him forthwith from the confinement imposed by the judgment of that court.
Prisoner discharged.
