
317 S.E.2d 812 (1984)
STATE ex rel. John Lewis YOUNG
v.
Damon B. MORGAN, Jr., as Prosecuting Attorney of Mason County, et al., etc.
No. 16256.
Supreme Court of Appeals of West Virginia.
June 27, 1984.
*813 Stephen C. Littlepage, Point Pleasant, for appellant.
Damon B. Morgan, Jr., P.A., Point Pleasant, for appellee.
MILLER, Justice:
John Lewis Young instituted this original proceeding seeking a writ of habeas corpus ad subjiciendum and a writ of prohibition to prevent the imposition of an additional five-year penalty under our habitual criminal statutes. W.Va.Code, 61-11-18 & 19. Young's main contention is that the State has not complied with the provisions of W.Va.Code, 61-11-19, because it failed to file a written information of his prior felony conviction during the same term of court as his principal felony conviction. We disagree.
The facts are not in dispute. Young was convicted of second degree murder in the Circuit Court of Wood County in 1977. Upon a jury finding that Young had been previously convicted of a felony in Mason County in 1970, a five-year sentence was added to the maximum term of imprisonment for second degree murder, resulting in a sentence of five to twenty-three years. We denied his petition for appeal and subsequently denied his petition for a writ of habeas corpus.
Young then sought federal habeas corpus relief under 28 U.S.C. § 2254, and in March, 1981, the United States District Court for the Northern District of West Virginia set aside Young's second degree murder conviction. He was then retried in the Circuit Court of Mason County in December, 1981. The jury found Young guilty of first degree murder without a recommendation of mercy, and he was thereafter sentenced on that verdict. In view of the jury's verdict, the prosecuting attorney did not file a new recidivist information.
Thereafter, Young appealed his first degree murder conviction. We accepted the appeal, and in State v. Young, W.Va., 311 S.E.2d 118 (1983), we vacated his first degree murder sentence and remanded the case back to the circuit court for resentencing on second degree murder. Our ruling was based upon well established double jeopardy principles that preclude a higher conviction on retrial where the defendant has been implicitly acquitted of such higher offense by his conviction of a lesser included offense at the original trial.
In January, 1984, Young was returned from the penitentiary to Mason County where he was lodged in the county jail awaiting a resentencing hearing. Prior to the hearing, the prosecuting attorney filed a written information, just as he had done following Young's initial conviction of second degree murder, alleging that Young had previously been convicted of a felony. Young filed a motion to dismiss contending that the recidivist information was not timely filed as required by W.Va.Code, 61-11-19,[1] because no written information was filed during the same term of court in which he was sentenced for first degree *814 murder. He cites Syllabus Point 3 of State ex rel. Beckett v. Boles, 149 W.Va. 112, 138 S.E.2d 851 (1964):
"`A person convicted of a felony cannot be sentenced under the habitual criminal statute, Code 61-11-19, unless there is filed by the prosecuting attorney with the court at the same term, and before sentencing, an information as to the prior conviction or convictions and for the purpose of identification the defendant is confronted with the facts charged in the information and cautioned as required by the statute.' Point 3, syllabus, State ex rel. Housden v. Adams, 143 W.Va. 601 [103 S.E.2d 873 (1958) ]."
The circuit court denied Young's motion to dismiss the recidivist proceedings and this action followed.
The respondent prosecutor asserts as an affirmative defense that the federal district court's reversal of Young's initial conviction of second degree murder did not affect the additional five-year sentence imposed under the recidivist statute. The respondent contends that the recidivist penalty that was added to Young's sentence for second degree murder remains valid and enforceable and can be added to the sentence for second degree murder at resentencing. As a second ground, the respondent argues that with the change in sentence on appeal, he is not foreclosed from filing a recidivist petition because this merely conforms to the original sentence. Any delay in bringing the recidivist proceeding is chargeable to the appeals filed by Young which altered his sentence.
We find no merit in the respondent's argument that the recidivist penalty added to Young's sentence on his initial conviction of second degree murder survived the setting aside of that conviction by the federal district court. The recidivist penalty cannot survive the vacating of the principal felony offense. We have consistently held under the habitual criminal statutes that the recidivist penalty authorized for a second felony conviction must be added to and incorporated in the underlying sentence to form a single sentence. Syllabus Point 2, Martin v. Leverette, W.Va., 244 S.E.2d 39 (1978); State ex rel. Holstein v. Boles, 150 W.Va. 83, 143 S.E.2d 821 (1965); State ex rel. Curtis v. Boles, 150 W.Va. 79, 143 S.E.2d 824 (1965); State ex rel. Hill v. Boles, 149 W.Va. 779, 143 S.E.2d 467 (1965). The recidivist penalty is not a separate sentence. Consequently, when Young's second degree murder conviction was set aside, he was no longer a habitual offender. The legal predicate for the penalty was removed and it fell along with the conviction.
The only remaining question is whether the State has complied with the habitual offender statute by filing a recidivist information before the resentencing hearing we ordered on remand. We believe it did. Although the habitual criminal statute, W.Va. Code, 61-11-19, does not expressly address the right of the State to reinvoke the statute on remand of a case to a circuit court for resentencing,[2] we spoke to this issue in a similar factual setting in State ex rel. McMannis v. Mohn, 163 W.Va. 129, 254 S.E.2d 805 (1979). There, we held that a life sentence imposed under the recidivist statute was void. On rehearing, we discussed the options available to the State upon remand and determined that the prisoner could be sentenced either on the underlying felony conviction that remained valid, or the State could "reinvoke the recidivist proceeding to enhance the underlying sentence either by five years or to life." Id. at 142, 254 S.E.2d at 812.
The rationale for allowing further recidivist proceedings in this case is that the defendant at resentencing stands in essentially the same position he was in prior to his initial appeal. His conviction for second degree murder has been affirmed and he has a prior felony which permits the recidivist proceedings. The delays in finally arriving *815 at a correct and final conviction have been the result of his appeals.
We do not believe the passage of several terms of court precludes application of the recidivist statute in this situation. We have traditionally held in cases involving the right to be tried for a criminal offense within three terms of court following indictment that the terms of court which expire while a writ of error is pending are not counted against the State, as indicated by this statement from State v. Holland, 149 W.Va. 731, 738-39, 143 S.E.2d 148, 153 (1965):
"The statute in question has never been applicable where a defendant appeals his conviction and sentence to an appellate court and it is set aside and remanded for a new trial, either because there was reversible error in the trial or the trial was void. State v. McIntosh, 82 W.Va. 483, 96 S.E. 79; State v. Wiseman, 141 W.Va. 726, 92 S.E.2d 910; State v. Loveless, 142 W.Va. 809, 98 S.E.2d 773.
"When the defendant instituted the proceedings and had his conviction and sentence held void he waived the provisions of the statute to be tried within three terms of the finding of the indictment and made it inapplicable to the case at bar; and by accepting the benefit of having his conviction and sentence set aside and held for naught he must also accept any disadvantage which may accrue therefrom."
This rationale applies here. Young, by successfully challenging his conviction and sentence, has placed himself in the same position he would have been in had the circuit court initially entered a verdict of second degree murder as required by law.
We, therefore, conclude that when a defendant who has been convicted of second degree murder and has had a five-year enhancement of his sentence imposed under the recidivist statutes, W.Va. Code, 61-11-18 and 19, and who appeals his conviction, which is subsequently reversed, his recidivist conviction is also vacated. However, this does not foreclose the State from seeking another recidivist enhancement after retrial, even though there has been imposed an erroneous sentence at the retrial. The recidivist proceedings must be initiated prior to the time that the correct sentence is imposed.
For the foregoing reasons, the writs of prohibition and habeas corpus prayed for are denied, and the rule heretofore issued is dismissed.
Writs denied.
NOTES
[1]  W.Va.Code, 61-11-19, provides as pertinent here:

"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 county 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." (Emphasis added)
[2]  We do not deal in this case with the question of whether the prosecutor could invoke a recidivist proceeding on a retrial when no such proceeding had been invoked at the first trial. The first degree murder sentence on retrial was not a valid sentence and consequently the failure to invoke the recidivist proceeding at this point is not fatal.
