
146 S.E.2d 524 (1966)
STATE ex rel. James Stanley WRIGHT
v.
Otto C. BOLES, Warden, West Virginia Penitentiary.
No. 12535.
Supreme Court of Appeals of West Virginia.
Submitted January 12, 1966.
Decided February 1, 1966.
*526 Frank Thomas Graff, Jr., Charleston, for relator.
C. Donald Robertson, Atty. Gen., George H. Mitchell, Asst. Atty. Gen., Charleston, for respondent.
CAPLAN, President:
In this original habeas corpus proceeding instituted in this Court the petitioner, James Stanley Wright, who is presently confined in the penitentiary of this State by virtue of a sentence of life imprisonment as a recidivist imposed by the Circuit Court of Mason County, West Virginia, by its final judgment rendered May 13, 1950, seeks to prevent the enforcement of said life sentence. He further alleges that since he has served the minimum sentence that could be imposed under the statute for armed robbery, he is entitled to be released from custody.
On December 6, 1965, this Court awarded a writ returnable January 12, 1966, and appointed counsel to represent the petitioner in this proceeding. Upon the return day this matter was heard and submitted for decision upon the petition and its exhibits, upon the return of the defendant and its exhibits, upon stipulation of counsel, upon the brief of the petitioner and upon oral argument of counsel for the petitioner and defendant.
The petitioner, on May 1, 1950, was indicted by the grand jury of the Circuit Court of Mason County, West Virginia, for the crime of armed robbery. Counsel was appointed to represent the petitioner and he subsequently entered a plea of not guilty. Upon trial therefor the jury returned a verdict of guilty as charged in the indictment. Thereupon the prosecuting attorney filed an information wherein it was charged that the petitioner twice before had been convicted of felonies, to-wit: in the Circuit Court of Mason County, West Virginia, on May 5, 1927, where he entered a plea of guilty to the theft of a horse, for which he was sentenced to two years in the penitentiary; and in the Circuit Court of Marshall County, West Virginia, in June, 1932 for the crime of escape, for which he was sentenced to the penitentiary for the term of one year.
Upon admission by the petitioner that he was the same person named in the information, the court, in accordance with the provisions of Code, 1931, 61-11-18 and 19, as amended, sentenced the petitioner to life imprisonment in the penitentiary.
It is the contention of the petitioner that in the proceedings wherein he was convicted of two prior felonies he did not have counsel, was not informed of his right to the assistance of counsel and did not waive his right to counsel. He says, therefore, that such convictions are void and can not be used as a basis for the imposition of a life sentence under the recidivist statute. The respondent does not refute this contention and in fact admits that the records relative to the two prior convictions are silent on the matter of assistance of counsel.
It is well established that a state conviction can not stand when founded on a guilty plea by a defendant unaware of his right to counsel or on a record silent as to the matter of the assistance of counsel. State ex rel. May v. Boles, 149 W.Va. 155, 139 S.E.2d 177; State ex rel. Pettery v. Boles, W.Va., 141 S.E.2d 80; State ex rel. Walls v. Boles, W.Va., 142 S.E.2d 767. Also firmly established is the proposition related in Point 1 of the syllabus in State ex rel. Whytsell v. Boles, W.Va. 141 S.E.2d 70, as follows: "The denial of the fundamental right of the defendant to the assistance *527 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."
The record being silent on the matter of the assistance of counsel in each of the two prior proceedings wherein the petitioner entered a guilty plea to a felony indictment and was convicted in each instance, we hold that such convictions can not serve as a basis for the life sentence imposed under the habitual criminal statute. Such life sentence is therefore declared to be void and of no force or effect.
The life sentence imposed on the petitioner having been declared void, it becomes necessary to consider the petitioner's contention that he is entitled to be released from custody. He was convicted of the principal offense, armed robbery, on May 13, 1950 and has been an inmate in the penitentiary since that time. His claim that he is entitled to release from custody is based on the fact that he has served more than the minimum sentence provided for armed robbery under the provisions of Code, 1931, 61-2-12, as amended; that since that statute provides only a minimum sentence, discretion of the court is required to impose a proper sentence of a definite number of years; that the judge who presided at his trial is now deceased and no transcript of the record of the trial is available; and that in these circumstances no valid sentence in excess of the minimum prescribed by statute can be imposed.
Under prior decisions of this Court it has been consistently held that a petitioner in a habeas corpus proceeding will be relieved of any sentence declared to be void, but he must serve the sentence for any valid conviction which may remain. State ex rel. Widmyer v. Boles, W.Va., 144 S.E.2d 322; State ex rel. Curtis v. Boles, W.Va., 143 S.E.2d 824; State ex rel. Holstein v. Boles, W.Va., 143 S.E.2d 821; State ex rel. Truman v. Boles, W.Va., 143 S.E.2d 820. The sentence for the remaining valid conviction must be one provided by law and must be readily ascertainable from the statute itself. For example, where one is convicted as a recidivist and the prior felony convictions are void but the conviction for the principal offense is valid, the statutory sentence therefor being one to ten years, the petitioner can not, by habeas corpus, be discharged from custody until he has served the maximum of such statutory sentence.
In the instant case the principal offense is armed robbery, the statutory sentence for which is confinement in the penitentiary for "not less than ten years". Code, 1931, 61-2-12, as amended. The validity of the conviction for this offense has not been questioned. Therefore, in accordance with the settled law in this jurisdiction, it would appear that the petitioner can not be released from custody until he has served the statutory sentence for the principal offense. However, unlike the statutory indeterminate sentence, which leaves the court no discretion, the armed robbery statute contemplates the imposition of a sentence for a definite number of years. This may be for any definite term from ten years to life imprisonment. State ex rel. Vascovich v. Skeen, 138 W.Va. 417, 76 S.E.2d 283.
This petitioner, having been convicted as a recidivist, was sentenced by the court, under its mandatory duty, to life imprisonment. While a valid conviction remains the sentence therefor is not readily ascertainable from the statute. A sentence, to be valid, must be so definite and certain that the prisoner and the officer charged with the execution of the sentence may ascertain the term of imprisonment from the judgment. State ex rel. Nicholson v. Boles, 148 W.Va. 229, 134 S.E.2d 576. A definite *528 sentence not being so ascertainable in this case, no valid sentence remains to be served. This, of course, does not affect the validity of the conviction for the principal offense.
For the reasons stated in this opinion the petitioner is entitled to a writ requiring his discharge forthwith from confinement under the void sentence rendered by the Circuit Court of Mason County; but the award of the writ is without prejudice to the right of the State of West Virginia to invoke any lawful means available to it to proceed further against the petitioner in the manner provided by law.
Writ awarded; prisoner discharged from present confinement, subject to the right of the State to proceed against him further as provided by law.
