In this original habeas corpus proceeding the petitioner, Warren V. Nicholson, a prisoner in the West Virginia Penitentiary, seeks a writ to require the defendant, Otto C. Boles, Warden of the Penitentiary, to release the petitioner from the custody of the defendant under an indeterminate sentence of not less than ten years nor more than twenty years, entered by the Circuit Court of Wood County on September 17, 1958, which sentence the petitioner asserts is null and void and of no force or effect.
Upon the filing of the petition and its exhibits,. this Court, by order entered March 5, 1963, refused to issue the writ prayed for by the petitioner.
*231Upon petition for a writ of certiorari to this Court, the Supreme Court of the United States, by order entered October 14, 1963, one Justice dissenting, vacated the March 5, 1963 judgment of this Court and remanded this proceeding to this Court for further consideration. Nicholson v. Boles, 375 U. S. 25, 84 S. Ct. 89, 11 L. Ed. 2d 43.
Upon the remand of this proceeding it was submitted for decision January 8, 1964, upon the petition and its exhibits, the answer to the petition and the return of the defendant, and the written briefs of the attorneys for the respective parties.
The material facts are not disputed and the question presented for decision is a question of law.
On July 16, 1958, the grand jury of Wood county returned a felony indictment against the petitioner which charged that the petitioner, being armed with a dangerous and deadly weapon, in Wood County, feloniously assaulted one Johnny Milanese and took from him the sum of $5,384.50, lawful money, currency of the United States of America, then in the lawful custody, care, management and control of Milanese, but which belonged to the Community Savings and Loan Company. On September 16, 1958, the petitioner entered a plea of guilty to the foregoing indictment and on September 17, 1958 he was sentenced by the Circuit Court of Wood County to confinement in the West Virginia Penitentiary for an indeterminate term of not less than ten years nor more than twenty-years.
The petitioner contends that as the indictment returned against him charged him with the offense of armed robbery the only valid sentence that could have been imposed by the circuit court was a sentence of a definite term of not less than ten years, as provided by the first paragraph of Section 12, Article 2, Chapter 61, Code, 1931, as amended, upon his conviction of that crime; that the circuit court was without jurisdiction to impose the indeterminate sentence of not less than ten years nor more than twenty years which is the sentence prescribed by the second paragraph of the same Section, Article and Chap*232ter, Code, 1931, as amended, for the crime of armed robbery of a bank, a separate and distinct offense from that for which the petitioner was indicted and to which he pleaded guilty; and that the imposition of the indeterminate sentence, instead of a sentence for a definite term of not less than ten years, by the circuit court was beyond its jurisdiction and for that reason is void and of no force or effect.
The defendant admits that the petitioner should have been sentenced to a definite term of not less than ten years, as prescribed by the first paragraph of Section 12, Article 2, Chapter 61, Code, 1931, as amended, but insists that the imposition of the indeterminate sentence in lieu of the definite sentence, though improper, is a mere error or irregularity which renders the sentence erroneous and voidable but not void and does not entitle the petitioner in this proceeding to a writ discharging him from his present confinement.
The controlling question for decision in this proceeding is whether the indeterminate sentence, improperly imposed by the circuit court, instead of the prescribed sentence of a definite term of years, is merely erroneous and voidable and not controllable by habeas corpus or is void and as such may be reached and controlled in a habeas corpus proceeding.
The action of the Supreme Court of the United States, in reversing the judgment of this Court denying the writ, indicates that it considered the indeterminate sentence imposed by the circuit court to be not an error or irregularity which rendered that sentence merely erroneous and voidable but that it was a defect which could be considered and controlled in a habeas corpus proceeding.
This Court has consistently held in many cases that a habeas corpus proceeding is not a substitute for a writ of error or other appellate process, and that error in a final judgment in a criminal case, which renders such judgment merely voidable but not void, can not be considered or corrected in such proceeding; but that if a sentence of imprisonment under which a person is confined is void, *233in whole or in part, it may be reached and controlled in a habeas corpus proceeding. State ex rel. Clark v. Adams, 144 W. Va. 771, 111 S. E. 2d 336, 89 A.L.R. 2d 528, certiorari denied, 363 U. S. 807, 80 S. Ct. 1242, 4 L. Ed. 2d 1149; State ex rel. Burkhamer v. Adams, 143 W. Va. 557, 103 S. E. 2d 777, certiorari denied, 358 U. S. 869, 79 S. Ct. 102, 3 L. Ed. 2d 101; State ex rel. Browning v. Tucker, 142 W. Va. 830, 98 S. E. 2d 740; State ex rel. Lovejoy v. Skeen, 138 W. Va. 901, 78 S. E. 2d 456, certiorari denied, 349 U. S. 940, 75 S. Ct. 786, 99 L. Ed. 1268; State ex rel. Vascovich v. Skeen, 138 W. Va. 417, 76 S. E. 2d 283, certiorari denied, 346 U. S. 916, 74 S. Ct. 277, 98 L. Ed. 411; Dye v. Skeen, 135 W. Va. 90, 62 S. E. 2d 681, 24 A.L.R. 2d 1234; State ex rel. Nutter v. Mace, 130 W. Va. 676, 44 S. E. 2d 851; Slater v. Melton, 119 W. Va. 259, 193 S. E. 185; Scott v. Harshbarger, 116 W. Va. 300, 180 S. E. 187; Ex Parte Veltri, 83 W. Va. 226, 98 S. E. 146; Ex Parte Barr, 79 W. Va. 681, 91 S. E. 655; Ex Parte Mylius, 61 W. Va. 405, 56 S. E. 602, 11 Ann. Cas. 812, 10 L.R.A., N.S., 1098; Ex Parte Evans, 42 W. Va. 242, 24 S. E. 888; Ex Parte Mooney, 26 W. Va. 36, 53 Am. Rep. 59.
A person imprisoned under a void sentence will be released from such imprisonment by a writ of habeas corpus. State ex rel. Browning v. Boles, 147 W. Va. 878, 132 S. E. 2d 505; State ex rel. Taylor v. Boles, 147 W. Va. 701, 130 S. E. 2d 693; State ex rel. Slatton v. Boles, 147 W. Va. 674, 130 S. E. 2d 192; State ex rel. Soto v. Adams, 145 W. Va. 591, 115 S. E. 2d 497; State ex rel. Gerst v. Adams, 145 W. Va. 580, 115 S. E. 2d 496; State ex rel. Vandal v. Adams, 145 W. Va. 566, 115 S. E. 2d 489; State ex rel. Firestone v. Adams, 145 W. Va. 194, 113 S. E. 2d 830; State ex rel. Browning v. Tucker, 142 W. Va. 830, 98 S. E. 2d 740; State ex rel. Vascovich v. Skeen, 138 W. Va. 417, 76 S. E. 2d 283, certiorari denied, 346 U. S. 916, 74 S. Ct. 277, 98 L. Ed. 411; Scott v. Harshbarger, 116 W. Va. 300, 180 S. E. 187; Ex Parte Brinkman, 93 W. Va. 351, 116 S. E. 757; Ex Parte Veltri, 83 W. Va. 226, 98 S. E. 146; Ex Parte Barr, 79 W. Va. 681, 91 S. E. 655; Ex Parte Bornee, 76 W. Va. 360, 85 S. E. 529, L.R.A. 1915 F, 1093; Ex Parte Mylius, 61 W. Va. 405, 56 S. E. 602, 11 Ann. Cas. 812, 10 L.R.A., N.S., 1098; Ex Parte Evans, 42 W. Va. 242, 24 S. E. 888; Ex Parte Mooney, 26 W. Va. 36, 53 Am. Rep. 59.
*234The general rule supported by the weight of authority is that a judgment rendered by a court in a criminal case must conform strictly to the statute which prescribes the punishment to be imposed and that any variation from its provisions, either in the character or the extent of punishment inflicted, renders the judgment absolutely void. 15 Am. Jur., Criminal Law, Section 443; 41 C.J.S., Homicide, Section 433; State ex rel. Chafin v. Bailey, 106 W. Va. 32, 144 S. E. 574; Anderson v. Rives, 66 App. D. C. 174, 85 F. 2d 673; Lee Lim v. Davis, 75 Utah 245, 284 P. 323, 76 A.L.R. 460. It has also been held that a sentence in a criminal case which is not imposed in strict conformity to the penalty prescribed by statute is not merely voidable but is void for the reason that such sentence is in excess of the jurisdiction of the court. De Benque v. United States, 66 App. D. C. 36, 85 F. 2d 202, 106 A.L.R. 839, certiorari denied, 298 U. S. 681, 56 S. Ct. 960, 80 L. Ed. 1402, rehearing denied, 299 U. S. 620, 57 S. Ct. 6, 81 L. Ed. 457.
In State ex rel. Chafin v. Bailey, 106 W. Va. 32, 144 S. E. 574, in which the validity of a sentence of life imprisonment upon a jury verdict of guilty of murder of the first degree without recommendation was involved and as to which it appeared that the trial judge, instead of fixing a new date for the execution of a previously imposed sentence of death, sentenced the defendant to confinement in the penitentiary for life, this Court, in the opinion, used this language: “When there has been a conviction for crime in the manner prescribed by law, it is the duty of the judge sitting in the case to pronounce the sentence which is imposed by law. He is simply the mouthpiece for the penalty fixed by the law makers. As far back as Blackstone’s time this has been the law; and that eminent jurist says, ‘The Court must pronounce that judgment which the law hath annexed to the crime.’ Blackstone’s Commentaries, Vol. 4, page 376. And it has been consistently held that the sentence must be responsive to the verdict and in conformity with the provisions of the governing statutes. 30 C. J. 452, sec. 724. And it is stated by Mr. Justice Field in Graham v. Weeks, 34 L. Ed. U. S. Supreme Court Reports, 1051: ‘It is undoubtedly the gen*235eral rule that a judgment rendered by a court in a criminal case, must conform strictly to the statute, and that any variation from its ¡provisions, either in the character or extent of the punishment inflicted, renders the judgment absolutely void.’ ”
In Ex Parte Page, 77 W. Va. 467, 87 S. E. 849, a habeas corpus proceeding, this Court held in point 3 of the syllabus that “A sentence of fine and imprisonment, on conviction, for an offense for which the punishment prescribed is a fine or imprisonment, is unauthorized and void; and the person detained thereunder may be discharged therefrom by such writ.” In that case this Court stated in the opinion that the petitioner should be discharged from the operation of the judgment and the imprisonment based upon such judgment but should not be discharged from the warrant which charged the offense of which the prisoner had been convicted.
In the later case of Mount v. Quinlan, 104 W. Va. 118, 139 S. E. 474, also a habeas corpus proceeding, a sentence of a fine and imprisonment upon a conviction of an offense for which a city ordinance provided a penalty of a fine or imprisonment was held, to be a void sentence and the prisoner was discharged from the effect and operation of the sentence but not from proper prosecution of the offense for which he had been arrested. In that case this Court approved and applied point 3 of the syllabus in Ex Parte Page, 77 W. Va. 467, 87 S. E. 849.
In Ex Parte Barr, 79 W. Va. 681, 91 S. E. 655, also a ha-beas corpus proceeding, this Court held that an attempt to commit voluntary manslaughter was a misdemeanor and that a judgment, upon a conviction of that offense, of imprisonment in the penitentiary was a void sentence and discharged the prisoner from such sentence but remanded him to the custody of the sheriff to be further proceeded against and for the entry of a proper judgment upon the verdict of the jury.
In State v. Rollins and Boggess, 142 W. Va. 118, 94 S. E. 2d 527, an indeterminate sentence, instead of a definite sentence within statutory limits, was imposed upon the *236defendant. In that case this Court said in the opinion: “This is not a case calling for an indeterminate sentence, but must carry a definite sentence within the statutory limits.” The judgment was considered on writ of error in that case and this Court, in reversing the case for other errors, said that in the absence of reversible error the case would have been remanded for proper sentence by the trial court because of the improper sentence imposed by that court.
It is well settled by the decisions of this Court that when a judgment in a criminal case is subjected to direct attack by writ of error, as distinguished from a collateral attack in a habeas corpus proceeding, and there is no error in the case other than in the judgment imposing sentence, upon the writ of error involving a direct attack, the judgment should be reversed and the case remanded for entry of a proper judgment of sentence by the trial court. State v. Fisher, 126 W. Va. 117, 27 S. E. 2d 581; State v. Bail, 140 W. Va. 680, 88 S. E. 2d 634; State v. Blankenship, 137 W. Va. 1, 69 S. E. 2d 398; State v. Justice, 130 W. Va. 662, 44 S. E. 2d 859, certiorari denied, 333 U. S. 844, 68 S. Ct. 662, 92 L. Ed. 1128; State v. McKown, 116 W. Va. 253, 180 S. E. 93; State v. Coontz, 94 W. Va. 59, 117 S. E. 701. In a habeas corpus proceeding, however, in which the attack on a judgment is a collateral attack and not a direct attack, and such proceedings not being a substitute for a writ of error or other appellate process, the judgment can not be reversed, vacated, annulled, set aside or modified. In a habeas corpus proceeding such judgment can only be held to be unenforceable to the extent it is wholly or partly void and of no force or effect.
The distinction between a direct attack upon a judgment in a criminal case by writ of error or other appellate process and a collateral attack upon such judgment in a habeas corpus proceeding is well stated by the Supreme Court of Utah in the habeas corpus proceeding of Frankey v. Patten, 75 Utah 231, 284 P. 318, in this language: “This proceeding is not like an appeal or other writ of review of the cause in which the judgment was rendered, and where in such case by the appeal or writ of review juris*237diction of the cause is conferred on us, and upon reversing or annulling the judgment and remanding the cause to the court below jurisdiction of it is again conferred on that court to proceed as directed by us. While in this proceeding the challenged validity of the judgment is before us, nevertheless only as a jurisdictional question pertinent and incidental to the essential issue of the alleged unlawful detention and imprisonment of the petitioner by the sheriff from which petitioner seeks release. But the judgment is not, nor is the cause in which it was rendered, before us in the sense that we may properly annul or vacate the judgment, or direct the rendition of a different judgment, as might be done oh appeal or writ of review. The question we are called on to decide in this proceeding is whether the petitioner is unlawfully detained and imprisoned in the county jail by the sheriff, and not under what kind of a judgment he may still lawfully be imprisoned or detained elsewhere.”
In the leading case of Lee Lim v. Davis, 75 Utah 245, 284 P. 323, 76 A.L.R. 460, the court held that a sentence of imprisonment for an indeterminate term between ten years and life for the crime of murder, for which the law required a definite sentence for a term of not less than ten years and which may be for life, was not a valid sentence for a minimum term of ten years and could not operate to preclude the discharge of the prisoner in a habeas corpus proceeding until after the expiration of a term of ten years. The indeterminate sentence was held to be invalid in that case because it did not conform to the statute which imposes a definite term of not less than ten years. The court in that case also recognized and applied the general rule that where a statute prescribes a definite term of imprisonment the judgment of imprisonment, to be valid, must be so definite and certain in its terms that the prisoner and the officer charged with the execution of the sentence may ascertain the term .of imprisonment from the judgment. It can not be determined from the indeterminate sentence of not less than ten years nor more than twenty years, imposed upon the petitioner by the Circuit Court of Wood County, whether the court in*238tended a definite term of imprisonment to be ten years or twenty years or some other period of time within those limits; and for that additional reason the sentence, which should have been for a definite term, is void for indefiniteness and entitles the prisoner to a discharge from such sentence. See Mount v. Quinlan, 104 W. Va. 118, 139 S. E. 474; United States v. Daugherty, 269 U. S. 360, 46 S. Ct. 156, 70 L. Ed. 309; Ex Parte Murray, 43 Cal. 455; People ex rel. Hinckley v. Pirfenbrink, 96 Ill. 68; State v. Jackson, 251 Iowa 537, 101 N.W. 2d 731; In re Howard, 72 Kan. 273, 83 P. 1032; State ex rel. Petcoff v. Reed, 138 Minn. 465, 163 N.W. 984; Sinner v. State, 128 Neb. 759, 260 N.W. 275; Picket v. State, 22 Ohio St. 405; Benge v. State, 168 Texas Cr. Rep. 515, 330 S. W. 2d 195; Ex Parte Webb, 168 Texas Cr. Rep. 495, 329 S. W. 2d 435; Kemp v. State, 159 Texas Cr. Rep. 110, 261 S. W. 2d 573; Ex Parte East, 154 Texas Cr. Rep. 123, 225 S. W. 2d 833; Edwards v. State, 153 Texas Cr. Rep. 301, 219 S. W. 2d 1022; Ex Parte Traxler, 147 Texas Cr. Rep. 661, 184 S. W. 2d 286; Rasmussen v. Zundel, 67 Utah 456, 248 P. 135; 15 Am. Jur., Criminal Law, Section 443.
In a criminal case a judgment which imposes an indeterminate sentence for an offense for which by statute a sentence for a definite term is prescribed and as to which offense the statute authorizing an indeterminate sentence does not apply, is a void judgment; and in a habeas corpus proceeding a person serving such an indeterminate sentence will be released from confinement under such void judgment.
For the reasons stated in this opinion the petitioner is entitled to a writ requiring his discharge forthwith from confinement under the void judgment rendered by the Circuit Court of Wood County imposing the foregoing indeterminate sentence, and such writ is hereby awarded; but the award of the writ is without prejudice to the right of the State of West Virginia to invoke any lawful means that may be available to it to proceed further against the petitioner in the manner provided by law.
The question whether the petitioner after his discharge from his present confinement may be proceeded against in the Circuit Court of Wood County for the imposition of *239a valid sentence is not presently before this Court and is not discussed or considered in this proceeding.
Writ awarded; prisoner discharged from present confinement, subject to the right of the State to proceed against him further as provided by law.