
142 S.E.2d 773 (1965)
STATE ex rel. Hubert N. McCLURE
v.
Otto C. BOLES, Warden, West Virginia Penitentiary.
No. 12464.
Supreme Court of Appeals of West Virginia.
Submitted June 8, 1965.
Decided June 22, 1965.
*774 Donald E. Jarrell, Whitesville, for relator.
C. Donald Robertson, Atty. Gen., George H. Mitchell, Asst. Atty. Gen., Charleston, for respondent.
HAYMOND, Judge:
In this original habeas corpus proceeding instituted in this Court, the petitioner, Hubert N. McClure, who is presently confined in the penitentiary of this State by virtue of a sentence of life imprisonment as a habitual criminal imposed by the Circuit Court of Boone County, West Virginia, by its final judgment rendered February 3, 1961, seeks to prevent the enforcement of the sentence of life imprisonment *775 and a writ to require the defendant, Otto C. Boles, Warden of the West Virginia Penitentiary, to release him from confinement when he has served the valid portion of such sentence for the principal offense of which he was convicted on February 3, 1961, when the sentence of life imprisonment was imposed.
On May 10, 1965, this Court awarded a writ returnable June 8, 1965 and appointed an attorney to represent the petitioner. Upon the return day of the writ this proceeding was heard and submitted for decision upon the petition and its exhibits, the answer of the defendant and its exhibits, and the written brief and oral argument in behalf of the petitioner. No written brief was filed in behalf of the defendant, who produced the body of the petitioner as commanded by the writ and alleged in his answer that the petitioner was indicted by the grand jury of the Circuit Court of Boone County, West Virginia, on January 17, 1961, for the crime of forgery; that on January 31, 1961, the circuit court appointed an attorney to represent the petitioner; that the trial of the case resulted in a jury verdict of guilty on February 3, 1961; that on the same day the prosecuting attorney of Boone County filed an information, charging the petitioner with two previous felony convictions; and that upon the admission by the petitioner that he was the same person described in the information the circuit court imposed the sentence of imprisonment for life, which the petitioner challenges as a void sentence.
The information filed by the prosecuting attorney charged that the petitioner had been convicted in the Circuit Court of Lincoln County, West Virginia, on November 20, 1951, of the crime of forgery and had also been convicted in the Circuit Court of Wayne County, West Virginia, on March 19, 1954, of the crime of bigamy. The order of the circuit court sentencing the petitioner to life imprisonment contains no recital that the petitioner was duly cautioned concerning his identity with respect to the two prior convictions but merely states that the prosecuting attorney filed an information that the defendant had been twice before convicted of a felony and that the circuit court sentenced the petitioner to be confined in the penitentiary of this State for the remainder of his natural life with the recommendation that he be paroled at the expiration of fifteen years. The transcript of the proceedings which occurred upon the filing of the information shows that at the direction of the court the assistant prosecuting attorney read the information to the petitioner and that it was shown to his attorney. The court then required the petitioner to say whether he was the person named in the information and when he replied that he was the court said: "All right. It is the judgment of this Court that you be taken from the bar of this Court to the jail of this County to be therein confined until you can conveniently be taken to the penitentiary of this state where you will be confined for the remainder of your natural life."
Subsequently to the imposition of the foregoing sentence of life imprisonment the petitioner instituted a habeas corpus proceeding in the District Court of the United States for the Northern District of West Virginia and at the direction of the judge of the Circuit Court of Boone County, the attorney who represented the petitioner at his trial in that court prepared an affidavit which was filed in the habeas corpus proceeding in the United States District Court. The affidavit stated that the attorney for the petitioner at great length informed and cautioned the petitioner as to the nature and effect of the admission of his identity and previous convictions and explained to him that if he admitted those convictions he would be sentenced to life imprisonment in the penitentiary of this State. The attorney was reluctant to prepare such affidavit for the reason that it was his opinion that to do so and to incorporate the foregoing information in such affidavit would constitute a disclosure of privileged communications between the attorney and his client, *776 in violation of the duty of the attorney to consider such information as privileged and confidential. As the petitioner had not served the period required to be served for the principal offense, under the rule adhered to in the Federal Courts to deny relief in habeas corpus if the prisoner is not entitled to his immediate release, McNally v. Hill, 293 U.S. 131, 55 S.Ct. 24, 79 L.Ed. 238; Beckett v. Boles, 218 F.Supp. 692, the United States District Court, without considering or determining the validity of the life sentence or the admissibility of the affidavit, dismissed the proceeding as premature.
It clearly appears from the record in the proceeding in which the petitioner was convicted of the principal offense that he was not duly cautioned as required by Section 19, Article 11, Chapter 61, Code, 1931, as amended. That requirement can only be satisfied by the judge of the trial court who has no authority to undertake to delegate the performance of that duty to any other person. State ex rel. Beckett v. Boles, W.Va., 138 S.E.2d 851; Hooker v. Boles, 346 F.2d 285, fourth circuit, decided May 31, 1965; Mounts v. Boles, 326 F.2d 186, fourth circuit; Spry v. Boles, 299 F.2d 332, fourth circuit. See also Carroll v. Boles, 347 F.2d 96, fourth circuit, decided June 11, 1965. The provisions of Section 19, Article 11, Chapter 61, Code, 1931, as amended, which include the requirement that the defendant, in a criminal proceeding, before he acknowledges his identity as the person who has been previously convicted, must be duly cautioned, are mandatory and must be complied with fully for the imposition of a valid sentence of further confinement under the habitual criminal statute. When, as here, it affirmatively appears from the record in a 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 a sentence of life 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, when confronted with the charges in the information, to be fully 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. Albright v. Boles, ___ W.Va.___, 142 S.E.2d 725; State ex rel. Beckett v. Boles, W. Va., 138 S.E.2d 851, and the many cases cited in the opinion in the Beckett case.
As the Circuit Court of Boone County was without jurisdiction to impose the sentence of life imprisonment because of the noncompliance with the foregoing requirement that the petitioner be duly cautioned, that sentence is null and void and its enforcement will be prevented in a habeas corpus proceeding. A judgment which is wholly void, or is void in part, is subject to collateral attack and its enforcement will be prevented in a habeas corpus proceeding. State ex rel. Hall v. Boles, W.Va., 142 S.E.2d 377; State ex rel. Beckett v. Boles, W.Va., 138 S.E.2d 851, and the numerous cases cited in the opinion in the Beckett case.
It is likewise well established by the decisions of this Court that a petitioner in a habeas corpus proceeding, upon whom punishment for an invalid additional period has been improperly imposed under the habitual criminal statute, may be relieved of the void portion of the punishment but will not be discharged from serving the maximum term provided by statute for the principal offense. State ex rel. Reed v. Boles, W.Va., 142 S.E.2d 733; State ex rel. Carver v. Boles, W.Va., 137 S.E.2d 246; State ex rel. Albright v. Boles, W.Va., 142 S.E.2d 725; State ex rel. Howell v. Boles, W.Va., 140 S.E.2d 465; State ex rel. Beckett v. Boles, W.Va., 138 S.E.2d 851; State ex rel. Robb v. Boles, 148 W.Va. 641, 136 *777 S.E.2d 891; State ex rel. Bonnette v. Boles, 148 W.Va. 649, 136 S.E.2d 873; State ex rel. Foster v. Boles, 147 W.Va. 655, 130 S.E.2d 111; 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.Rep. 59. The sentence provided by statute for the crime of forgery at the time the petitioner committed that offense was an indeterminate term of two years to ten years; and inasmuch as the petitioner has not fully satisfied that sentence he is not entitled to be released from his present confinement until he has completely served the sentence provided by law for the principal offense of which he was duly convicted in the Circuit Court of Boone County.
The petitioner contends that the affidavit of his attorney which is filed as an exhibit can not be considered in the decision of this case because it violates the principle that communications between attorney and client are privileged and can not be used as evidence against the client unless waived by him, which was not done. As it is unnecessary to determine that question in the proper disposition of this proceeding it will not be further discussed, considered or decided.
As the petitioner is not entitled to release from confinement at this time, he is remanded to the custody of the defendant until he has served the valid sentence provided by law for the principal offense.
Prisoner remanded.
