OPINION
REID, Chief Justice.
This ease presents an appeal from the judgment of the Court of Criminal Appeals affirming the trial court's denial of a petition for post-conviction relief. The record supports the judgment of the Court of Criminal Appeals.
In 1975, the petitioner Rickie J. Wallen entered pleas of guilty to 17 charges of forgery, on which he was sentenced to serve 3 to 15 years in the State penitentiary. The effect of these convictions, which later were set aside, on sentences imposed on subsequent convictions, is the basis of the petitioner’s claim for relief.
After serving a portion of the sentences imposed on the 1975 forgery convictions, the petitioner was released on parole. On June 5, 1985, for acts committed while on parole, the petitioner was tried before a jury on a plea of not guilty and found guilty of armed robbery. He was found not guilty of being a habitual criminal. He was given a Range II sentence of 40 years as a persistent offender, based on the 1975 forgery convictions, and as an especially aggravated offender, based on the armed robbery having been committed while he was on parole from the 1975 forgery convictions.
On the same date that he was sentenced on the armed robbery conviction, July 12, 1985, the petitioner entered pleas of guilty to three additional charges of armed robbery. The terms of the plea agreement consisted of the dismissal of habitual criminal charges, and the imposition of three concurrent life sentences enhanced to Range II both as a persistent offender based on the 1975 forgery convictions, and as an especially aggravated offender based on the armed robberies having been committed while the petitioner was on parole for the 1975 forgery convictions. Prior to accepting the petitioner’s pleas of guilty, the trial court scrupulously advised the petitioner of his rights under Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969), and State v. Mackey, 553 S.W.2d 337 (Tenn.1977). No issue is made as to the validity of these pleas.
This petition for post-conviction relief, filed in 1988, attacks the 1975 convictions of forgery on the ground that the guilty pleas were not knowing and voluntary pursuant to Boy-kin v. Alabama. The petition does not attack the 1985 armed robbery conviction but asserts that the Range II sentence of 40 years should be set aside because the enhanced sentence was based on the 1975 forgery convictions. Likewise, the petition does not attack the convictions for armed robbery on which the petitioner entered pleas of guilty; it does, however, challenge the Range II status of the life sentences on the ground that the pleas were not made knowingly and voluntarily because he was under the “misconception” that the forgery convictions exposed him to habitual criminal charges.
The trial court set aside the 1975 forgery convictions on the finding that the petitioner’s pleas of guilty were not knowing and voluntary pursuant to Boykin v. Alabama, and resentenced the petitioner on the June 1985 armed robbery conviction. The court *36found that the petitioner’s status as a persistent offender, based on the prior forgery convictions, could not be sustained after the reversal of those convictions. However, the court reaffirmed the petitioner’s status as an especially aggravated offender based on the commission of the offenses, for which he was being sentenced, while on parole from the 1975 forgery convictions. The court found that the Range II sentence of 40 years was appropriate based only on the petitioner’s status as an especially aggravated offender. The trial court refused to vacate the Range II concurrent life sentences imposed upon the petitioner’s pleas of guilty to the charges of armed robbery in July 1985.
The Court of Appeals properly found that the petitioner has been granted all the relief to which he is entitled. The 1975 forgery convictions based on pleas not knowingly and voluntarily entered have been set aside and the persistent offender status with regard to the June 1985 armed robbery conviction has been vacated. The Range II sentence of 40 years based only on the especially aggravated offender status is not illegal and has not been appealed.
The only issue raised by the petitioner is the use of his parole status to enhance the sentences imposed on his pleas of guilty to the three charges of armed robbery. The petitioner claims that committing a crime while on parole is not grounds for the imposition of an enhanced punishment where the convictions subsequently are set aside. The point made by the petitioner is applicable to release on bail but not other forms of release. Section 40-35-107(3) of the 1982 Tennessee Code Annotated provides that an “especially aggravated offense” is:
A felony committed while on any of the following forms of release status if such release is from a prior felony conviction:
(A) Bail, if the defendant is ultimately convicted of such prior felony;
(B) Parole;
(C) Probation;
(D) Work release; or
(E) Any other type of release into the community under the direct or indirect supervision of the department of correction or local governmental authority.
The statute provides that an offense committed while the offender is on bail becomes an especially aggravated offense only if the offender “is ultimately convicted of such prior felony.” That condition is not attached to offenses committed while on parole, probation, work release, or other types of release from incarceration.
The Court of Appeals correctly held that the validity of the 1975 forgery convictions is “totally irrelevant” to the 1985 armed robbery sentences entered on the petitioner’s pleas of guilty. The Court of Criminal Appeals based its decision on State v. Mahler, 735 S.W.2d 226 (1987). In Mahler, the defendant was “in grave danger of receiving the death penalty or, almost at a minimum, a sentence of life imprisonment for murder in the first degree.” Id. at 227. Because of the influence of the victim’s family, the State agreed to a negotiated plea to second degree murder and a Range II sentence of 50 years. The defendant was advised of his constitutional and statutory rights. His plea was “knowingly, voluntarily and intelligently” entered. Id. However, he was not advised there was no statutory basis in his case for imposing a Range II sentence of 50 years. This Court held:
It is generally true, as pointed out in the dissenting opinion, that a judgment imposed by a trial court in direct contravention of express statutory provisions regarding sentencing is illegal and is subject to being set aside at any time, even if it has become final. See State v. Burkhart, 566 S.W.2d 871 (Tenn.1978). In that case, however, the trial judge had ordered a sentence for escape to be served concurrently with a previous sentence in direct contravention of a statute requiring the sentence to be consecutive.
There have been other cases where sentences were imposed which were higher or lower than that authorized by the statute designating the punishment for the erime. In those cases the sentences have been held subject to being later vacated or corrected.
*37As previously stated, that is not the situation here. The sentence imposed was clearly within statutory limits fixed for the offense of murder in the second degree. In our opinion any question as to the classification of appellant as a Range II offender or as to his release eligibility was waived by the guilty plea. It was not a constitutional error in and of itself and at most rendered the sentence subject to attack on direct review by appeal. Appellant waived any right of appeal in the guilty plea proceedings, and expressly agreed to be sentenced with the classification and parole eligibility imposed.
Id. at 228 (emphasis added) (citations omitted).
Other jurisdictions have held that where a petitioner knowingly and voluntarily pleads guilty to a charge that carries an enhanced punishment, the petitioner waives subsequent collateral attacks on the prior convictions.
In Johnson v. Puckett, 930 F.2d 445 (5th Cir.), cert. denied, — U.S.-, 112 S.Ct. 252, 116 L.Ed.2d 206 (1991), the petitioner appealed the dismissal of a habeas corpus petition. In the challenged sentence, he had pleaded guilty to burglary and was sentenced as a habitual criminal based on two prior convictions. On appeal, the petitioner claimed, among other things, that the lower court erred in denying him an evidentiary hearing on his habeas corpus claim that one of his prior convictions was unconstitutionally obtained. The district court held that he was not entitled to an evidentiary hearing on the alleged unconstitutionality of his prior conviction because he had waived any objection to the use of that conviction when he pleaded guilty.
On appeal, the court noted that before the petitioner pleaded guilty, the trial judge explained that he was charged with being a habitual criminal, identified the prior convictions, asked the petitioner whether he understood the charges of the prior convictions, and advised him of the range of sentencing as a habitual offender. The petitioner did not object to evidence of the prior convictions, and acknowledged the prior convictions.
The court, noting that the petitioner had alleged no facts casting doubt upon the validity of his plea of guilty to the habitual criminal allegations, stated:
[A] habeas corpus petitioner who pleaded guilty to enhancement charges in an habitual offender hearing “waived any complaints he may have had concerning the former offenses which were set out in the enhancement charge.” We deemed the guilty plea, in the context of an habitual offender trial, to be “both the alpha and the omega of our determination.”
Id. at 449 (quoting Zales v. Henderson, 433 F.2d 20, 22, 24 (5th Cir.1970).
In Alvey v. Kentucky, 648 S.W.2d 858 (Ky.1983), the petitioner had pleaded guilty to a “persistent felony offender” charge. At the time of this plea, he did not raise any issue about the validity of the prior conviction. Subsequently, it was found that the record in the prior conviction failed “to comply with federally imposed standards for determining whether they were voluntary.” Id. at 859. The court held that by failing to raise any issue about the validity of his prior pleas at the time he pleaded guilty to being a persistent felony offender, “he waived his right to contest them in any subsequent post-convietion proceeding.” Id. at 860.
In State v. Lane, 642 S.W.2d 935 (Mo.App.1982), the trial court imposed a sentence on a petitioner as a “second offender” even though the prior conviction had been set aside five days earlier. The court stated that “a prior conviction is final if the judgment is affirmed on appeal, if the appeal is dismissed or if no appeal is taken.” Id. at 937. The court found that when the petitioner was tried, his prior conviction was final and was available for use in prosecuting him as a second offender. The Court stated:
Irrespective of the outcome of subsequent appeals and subsequent motions for post-conviction relief, however, the trial court must act in conformity with final dispositions attained at the time and disregard contingencies dependent on proceedings which have not matured. Any other rule, particularly as to post-conviction proceedings in criminal cases, would virtually *38stalemate the process.... In so holding, we express no opinion as to relief [the petitioner] would otherwise be entitled to receive were the [prior] conviction to be finally reversed, a fact situation beyond the present ease.
Id.
In the case before the Court, the trial court advised the petitioner of his rights and those rights he would waive on a plea of guilty. He was not deceived nor misled. At the post-conviction hearing, the petitioner acknowledged that the pleas were freely and voluntarily entered. They also were, for constitutional purposes on a collateral attack, knowingly entered. The petitioner and his attorney were in the best position to have the most complete knowledge regarding all relevant circumstances, including the petitioner’s prior criminal record. When the pleas were entered in 1985, Boykin had been decided 16 years, Mackey had been decided 8 years, and Rule 11 of the Tennessee Rules of Criminal Procedure had been in effect for 7 years. The petitioner and his attorney reasonably were aware of all relevant facts and rules of law when his pleas of guilty were entered in 1985.
This Court, in the recent case of Blankenship v. State, 858 S.W.2d 897 (1993), discussed in depth the prerequisites of a valid guilty plea. The Court reviewed the federal constitutional requirements of Boykin and the additional requirements of Mackey and Rule 11 as set forth in State v. Neal, 810 S.W.2d 131 (Tenn.1991), Johnson v. State, 834 S.W.2d 922 (Tenn.1992), and other decisions. The Court stated several conclusions in Blankenship:
[T]he core requirement of Boykin is “that no guilty plea be accepted without an affirmative showing that it was intelligent and voluntary,” [Fontaine v. United States, 526 F.2d 514, 516 (6th Cir.1975) ]....
... “The standard was and remains whether the plea represents a voluntary and intelligent choice among the alternative courses of action open to the defendant.” [North Carolina v. Alford, 400 U.S. 25, 31, 91 S.Ct. 160, 164, 27 L.Ed.2d 162 (1970) ].
... [A] court charged with determining whether those pleas were “voluntary” and “intelligent” must look to various circumstantial factors, such as the relative intelligence of the defendant; the degree of his familiarity with criminal proceedings; whether he was represented by competent counsel and had the opportunity to confer with counsel about the options available to him; the extent of advice from counsel and the court concerning the charges against him; and the reasons for his decision to plead guilty, including a desire to avoid a greater penalty that might result from a jury trial. Caudill v. Jago, [747 F.2d 1046, 1052 (6th Cir.1984) ].
Finally, ... the defendant must be aware of the “direct consequences of his guilty plea.” [Brown v. Perini, 718 F.2d 784, 788 (6th Cir.1983) ]; .... It is, therefore, well-recognized that the defendant must be apprised of the sentence that he will be forced to serve as the result of his guilty plea and conviction.
Blankenship v. State, 858 S.W.2d at 904.
Nowhere in this careful review of circumstances necessary to a showing of “knowing” and “voluntary” is there found a requirement that all relevant facts upon which the plea was based be, upon later examination, found to be totally accurate. Undoubtedly, there are many considerations that are relevant to the decision to enter into a negotiated plea, including those discussed in Blankenship. If a sentence could be set aside upon a subsequent showing that all material facts were not as they were apprehended by the defendant, negotiated pleas would lose their usefulness as a means for resolving criminal prosecutions. The State will not be cast in the position of guaranteeing the literal accuracy of the defendant’s understanding of those circumstances relevant to his making that decision.
In this case, the petitioner, with full knowledge of his rights, voluntarily took the benefits of the plea bargain. In accepting those benefits, under the circumstances of this case, he waived any irregularity or defect in the proceedings, including the possi*39bility that the prior convictions used to enhance his punishment might be set aside.
The issues which could have been presented had the armed robbery convictions been based upon a trial rather than pleas of guilty are not before the Court.
The judgment of the Court of Criminal Appeals is affirmed. Costs are adjudged against the petitioner.
DROWOTA and O’BRIEN, JJ., concur.
DAUGHTREY and ANDERSON, JJ., dissents.
DAUGHTREY, Justice,
dissenting.
The majority bases its decision to uphold the petitioner’s three life sentences for armed robbery on our opinion in State v. Mahler, 735 S.W.2d 226 (Tenn.1987). Because I conclude that Mahler is distinguishable on its facts and, further, that this case raises a constitutional question that was not presented by Mahler, I respectfully dissent. I believe that the petitioner is entitled to resentencing in this case, not only as to the three life sentences but also as to a 40-year sentence he received on another armed robbery charge.
1. Procedural History
The genesis of this matter can be traced back to April 18, 1975, the date on which Rickie J. Wallen pleaded guilty to 17 counts of forgery. The record of the submission hearing, held two years prior to the release of State v. Mackey, 558 S.W.2d 837 (Tenn.1977), but six years after the United States Supreme Court decision in Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969), demonstrates that the trial judge did not advise Wallen of his constitutional right not to incriminate himself or secure an appropriate waiver of that right.
Subsequently, Wallen was paroled from the penitentiary but apparently failed to reform his ways. On July 12, 1985, he was convicted by a jury of armed robbery but found not to be an habitual offender. The trial court ruled that the 17 prior forgery convictions justified designating Wallen as a persistent offender, pursuant to T.C.A. § 40-35-106 (1984 Supp.). Moreover, the fact that Wallen committed the armed robberies while on parole on the forgery convictions was used to justify sentencing him as an especially aggravated offender, under T.C.A. § 40-35-107(3) (1984 Supp.). As a result, Wallen received a Range II sentence of 40 years incarceration.
That same day, the state offered to dismiss related habitual criminal charges in exchange for Wallen’s guilty pleas in three additional armed robbery cases. Wallen accepted the state’s offer and pleaded guilty, after being fully advised of his rights in accordance with the requirements of Mackey. Pursuant to the plea bargain, Wallen was sentenced as a persistent and especially aggravated offender to three concurrent life sentences.
In April 1988, Wallen filed a petition for post-conviction relief challenging the constitutionality of the guilty pleas to the 17 forgery charges, the voluntariness of his guilty pleas in the last three armed robbery eases, and the propriety of the sentences imposed for all four armed robbery convictions. On July 26,1989, the trial court ruled that the 17 forgery guilty pleas must be set aside as a result of the court’s failure to comply strictly with Boykin requirements in the taking of those guilty pleas. That ruling is not before us for review.
The trial court did not invalidate Wallen’s four armed robbery convictions but did agree to resentenee Wallen in the case in which he was found guilty by a jury and sentenced to 40 years as a Range II offender. The trial judge held that the finding of persistence in that case must be set aside, because it was based on the subsequently invalidated forgery convictions. The court refused, however, to set aside the finding of aggravation, on the ground that the offense was committed while Wallen was on parole, even though he was paroled at the time on the basis of sentences that were later set aside as invalid. The trial judge held that Wallen’s status as an aggravated offender made a 40-year sentence appropriate, and he declined to lower it.
The trial judge also let stand the three life sentences based on Wallen’s 1985 guilty *40pleas, finding that any defects in those sentences were waived when “the petitioner freely, voluntarily, and intelligently waived his rights to a jury trial and entered pleas of guilty to three counts of armed robbery.”
On appeal of the post-conviction judgment, the Court of Criminal Appeals dealt only with the issue of the propriety of the three life sentences, probably because Wallen’s court-appointed attorney raised no question about the 40-year sentence, even though his client had raised that issue in his pro se petition and the trial court had granted partial relief at the post-conviction hearing. The Court of Criminal Appeals held, relying on Mahler as authority, “that [Wallen’s] 1975 forgery convictions, whether valid or not, are totally irrelevant to the validity of his three armed robbery life sentences.” Indeed, the intermediate court held that Wallen had waived any complaint about these sentences by voluntarily pleading guilty, and that “[n]o constitutional error is involved, and thus no post-conviction remedy is available to Wal-len.”
Because I conclude that this ruling was wrong, both on the law and the facts, I cannot join my colleagues in affirming it.
As I see it, there are three separate issues presented by this appeal. One obvious question is whether the sentences imposed against Wallen in the four armed robbery cases are constitutionally invalid, given the fact that the underlying convictions used to enhance those sentences have now been set aside. If so, the next question is whether the petitioner has nevertheless waived the right to challenge the validity of the life sentences in three of those cases by pleading guilty to the charges that gave rise to them. Finally, there is the question of whether the 40-year sentence in the fourth and last of the armed robbery eases is subject to review, even though the petitioner’s court-appointed counsel failed to challenge the trial court’s limited ruling in that case on appeal.
2. Constitutional Validity of the Enhanced Sentences for Armed Robbery
In Johnson v. Mississippi, 486 U.S. 578, 108 S.Ct. 1981, 100 L.Ed.2d 575 (1988), the United States Supreme Court ruled that an invalid prior conviction may not be used as an aggravating circumstance to justify the imposition of a death sentence upon a defendant. See also Teague v. State, 772 S.W.2d 915, 930-32 (Tenn.Crim.App.1988), cert. denied 493 U.S. 874, 110 S.Ct. 210, 107 L.Ed.2d 163 (1989). As the Court stated in Johnson, “Since [the prior] conviction has been reversed, unless and until petitioner should be retried, he must be presumed innocent of that charge.” Johnson v. Mississippi, supra, 486 U.S. at 585, 108 S.Ct. at 1986. Moreover, the Court said, the fact “that petitioner was imprisoned is not proof that he was guilty of the offense; indeed, it would be perverse to treat the imposition of punishment pursuant to an invalid conviction as an aggravating circumstance.” Id. at 586, 108 S.Ct. at 19.
Although Johnson was a capital case, both federal and state courts have also applied the principles espoused in Johnson to cases not involving the threat of the death penalty. In Burgett v. Texas, 389 U.S. 109, 115, 88 S.Ct. 258, 262, 19 L.Ed.2d 319 (1967), for example, the United States Supreme Court ruled that it is impermissible “[t]o permit a conviction obtained in violation of [the right to counsel] to be used against a person either to support guilt or enhance punishment for another offense.” See also United States v. Tucker, 404 U.S. 443, 448-49, 92 S.Ct. 589, 592-93, 30 L.Ed.2d 592 (1972). The Tennessee Court of Criminal Appeals, in examining a challenge to a finding that the defendant was an habitual traffic offender, has also refused to allow an unconstitutional and invalid prior conviction to be used to enhance punishment upon conviction for a subsequent offense. State v. Ridley, 791 S.W.2d 32, 34 (Tenn.Crim.App.1990). Other jurisdictions, faced with the same issue, have followed the same rule. See, e.g., State ex rel. Martin v. State, 462 So.2d 637, 639 (La.1985) (“A guilty plea obtained in violation of an accused’s constitutional rights is invalid, and may not serve as a basis for enhancing punishment [upon a subsequent conviction for burglary].... ”).
In this case, the only justification for Wal-len’s classification as a “persistent offender” was the fact that, at the time of sentencing, he had 17 prior forgery convictions. T.C.A. *41§ 40-35-106 (1984 Supp.). Because all 17 of those convictions were later reversed for constitutional defects, Wallen “must be presumed innocent of [those] charge[s].” Johnson v. Mississippi supra, 486 U.S. at 585, 108 S.Ct. at 1986. As a result, the invalid convictions may not be used to enhance punishment upon a subsequent conviction. The trial judge properly deleted all reference to Wallen as a “persistent offender” with regard to the 40-year sentence. However, the trial judge refused to grant the same relief as to the life sentences.
Moreover, even after setting aside the finding of persistence, the trial judge resen-tenced Wallen to the same 40-year term, based on his conclusion that Wallen was an especially aggravated offender. Pursuant to T.C.A. § 40-35-107(3) (1984 Supp.), an “especially aggravated offense” is:
[a] felony committed while on any of the following forms of release status if such release is from a prior felony conviction:
(A) Bail, if the defendant is ultimately convicted of such prior felony;
(B) Parole;
(C) Probation;
(D) Work release; or
(E) Any other type of release into the community under the direct or indirect supervision of the department of correction or local governmental authority.
The trial judge reasoned that even though Wallen’s prior illegal convictions had been reversed and could not serve to enhance sentencing upon conviction for a subsequent offense, Wallen was, at the time of the armed robberies, on parole status from what was presumably a valid conviction. As a result, the trial court held, continued designation of the defendant as an especially aggravated offender was proper.
The reasoning of the trial judge is at least superficially persuasive. Clearly, an argument could be made that, regardless of subsequent rulings on the validity of the underlying offense, a defendant should be subject to enhanced punishment for commission of a crime while paroled from what is then believed to be a valid and proper prior conviction.
By creating both the persistent offender and the especially aggravated offender classifications in sentencing statutes, the legislature has chosen to recognize that criminals should receive additional punishment both for persistently resorting to criminal behavior and, separately, for violating the trust bestowed upon them through the grant of early release from prison. In situations in which individuals are placed on certain release statuses, those defendants are on notice that their actions will be closely monitored and that subsequent violations of the law may result in enhanced punishment. Moreover, the prior sentences of those defendants, even if later found to be invalid, are usually only voidable, not void. As a result, until the improper sentence or conviction is overturned, it would not seem unreasonable to charge the defendant with the responsibility of conforming his conduct to the dictates of the law applicable to any other individual on early release from a prior felony conviction.
But despite these sound policy reasons supporting the position that Wallen should be held responsible for the consequences of actions undertaken at a time when he believed he had been paroled from valid convictions, applicable statutory provisions and case law militate against adoption of such a policy. In Johnson v. Mississippi supra, 486 U.S. at 585, 108 S.Ct. at 1986, the United States Supreme Court emphasized that reversal of an invalid conviction restored to the defendant the presumption that he was innocent of the prior offense. Moreover, restoration of that presumption prevents the courts from using the fact that the defendant was imprisoned for that prior offense as an aggravating circumstance in the imposition of a sentence. Id. at 586, 108 S.Ct. at 1987. Similarly, unless the presumption of innocence in criminal cases is to apply to only some, and not all, aspects of a prosecution, restoration of that presumption should prevent the courts from enhancing punishment for a subsequent crime merely because the crime was perpetrated while the defendant was paroled from an improper conviction. In other words, if the fact of imprisonment for a prior offense *42cannot serve as an aggravating circumstance to enhance a subsequent sentence, the fact that the defendant had served what turned out to be an unnecessary sentence and had been released from that imprisonment at the time of the commission of a subsequent crime should also not serve to enhance the later sentence.
The position suggested by the Johnson decision is supported further by the espeeially-aggravated-offender statute at issue in this case. The unique situation presented by Wallen’s application can be analogized to a case in which a defendant is sentenced for a crime committed while on bail awaiting trial for an earlier offense. The invalidation of the guilty pleas entered by Wallen to the 17 prior forgery charges did not extinguish the forgery indictments returned against the defendant. Rather, as in a bail situation, the indictments remain in place pending trials on the charges raised in those instruments.
Pursuant to T.C.A. § 40-35-107(3)(A) (1984 Supp.), however, a sentence for a crime committed while the defendant is released on bail may be enhanced for that reason only “if the defendant is ultimately convicted of such prior felony.” Such a provision recognizes that the fact of release from imprisonment on a charge that has not and cannot be proven, together with subsequent commission of an additional offense, should not serve as the basis for penalty enhancement. If the prior crime or crimes ultimately cannot be proven by the state, the defendant’s freedom from incarceration on those charges should not have been granted with conditions, but rather, should have been unconditionally required. The defendant thus should not be expected to pay an additional penalty for commission of a subsequent crime solely because he or she was improperly incarcerated or placed on restricted release status in the past.
It follows from this analysis that the trial court should have granted full relief as to the 40-year armed robbery sentence, setting aside the finding of aggravation as well as that of persistence, and reducing the sentence to Range I once the convictions used to enhance it were set aside as invalid. Likewise, the enhanced life sentences in the other three armed robbery cases should also have been reduced to Range I sentences, on the same ground. The ostensible impediment to relief in both instances is procedural. The majority implies that Wallen has waived his right to relief on the 40-year sentence by failing to raise it on appeal. In addition, the majority holds that, like the petitioner in Mahler, Wallen has waived his right to relief by pleading guilty to the charges for which he is now serving the life sentences.
3. Applicability of Mahler
Close analysis of Mahler, however, reveals that Wallen’s situation is distinguishable from Mahler’s. Mahler apparently had no prior convictions but was willing to be treated as if he did, in order to get the benefit of a lower sentence to a lesser included offense. By contrast, Wallen’s bargaining position was negatively affected by prior convictions that later turned out to be invalid. Assuming that the state has not successfully reprose-cuted Wallen on the 1975 forgery charges, I am convinced that his three life sentences should be set aside and the case remanded for resentencing within Range I.
It seems to me that in finding a Mahler waiver in this case, the majority misapprehends the posture of Wallen’s challenges. Undoubtedly, Wallen’s armed robbery guilty pleas were “voluntarily” entered. The trial judge scrupulously advised Wallen of the rights he was waiving by entering the pleas of guilt. Wallen indicated he understood those rights and, based on the circumstances *43existing at the time of the entry of the pleas, felt his best interest would be served by agreeing to the plea bargain. Nevertheless, it is difficult to accept the majority’s conclusion that the pleas were the product of informed choice, given the dramatic shift in circumstances after the pleas were entered.
To the majority’s credit, it does not repeat the intermediate court’s error of relying on Mahler for the proposition that issues challenging the length of sentences imposed on a defendant can only be raised on direct appeal and are not reviewable in post-conviction proceedings. In Mahler, the post-conviction sentencing challenge could and should have been raised on direct appeal. In this case, Wallen could not challenge his facially valid sentencing as a persistent and especially aggravated offender until he successfully challenged the underlying convictions that provided the basis for those classifications. See State v. Prince, 781 S.W.2d 846, 851 (Tenn.1989); State v. McClintock, 732 S.W.2d 268, 272 (Tenn.1987). Moreover, at the time Wal-len could have subjected the armed robbery sentences to challenge on direct appeal, the underlying convictions had not yet been reversed and no grounds then existed on which to attack the validity of the enhanced sentences.
In order to subject the allegedly improper sentences to review, and because the sentencing issues raised by Wallen are collaterally connected to the constitutional deficiencies in the underlying forgery convictions, I believe Wallen’s challenges are cognizable in post-conviction relief proceedings. In fact, because habitual criminal status is not an actual offense in Tennessee but is merely a basis for enhancement of sentences, see, e.g., Evans v. State, 571 S.W.2d 283, 285 (Tenn.1978), Wallen’s situation is analogous to the classic post-conviction habitual-criminal challenge. It is, of course, well-accepted that a prisoner may challenge the propriety of his conviction as an habitual criminal in post-conviction proceedings after successfully challenging the predicates for the enhancement. Similarly, Wallen should now be able to challenge the legitimacy of the enhanced sentences imposed upon him after proving that the convictions which provided the basis for such enhancement are invalid. See Johnson v. Mississippi, supra, 486 U.S. at 587-89, 108 S.Ct. at 1987-88 (discussing analogous situation presented in Phillips v. State, 421 So.2d 476 (Miss.1982)).
An examination of cases from other jurisdictions does not support the majority’s ruling that a different analysis is applicable in situations involving defendants who have entered guilty pleas rather than proceed to trial and subsequent sentencing. Although well-established legal principles do recognize that entry of a guilty plea waives certain defects in the sentence, as Mahler makes clear, such cases involve situations in which the defendant could make an informed choice based upon full knowledge of the situation presented. In this case, by contrast, certain crucial facts were not known by Wallen, or by anyone else, at the time of the entry of the guilty plea. In accepting the guilty plea, therefore, the trial court considered evidence “that has been revealed to be materially inaccurate.” Johnson v. Mississippi, 486 U.S. at 590, 108 S.Ct. at 1988.
The response of courts faced with a request to modify a sentence enhanced by convictions later held invalid has been virtually uniform. See, e.g., State v. Petty, 596 So.2d 421 (La.App.1992); People v. Dozier, 78 N.Y.2d 242, 573 N.Y.S.2d 427, 577 N.E.2d 1019 (1991); United States v. Davis, 753 F.Supp. 529 (D.Vt.1990); United States v. Paleo, 738 F.Supp. 611 (D.Mass.1990); Domegan v. United States, 703 F.Supp. 166 (D.Mass 1989); State v. Gibson, 34 Ohio App.3d 146, 517 N.E.2d 990 (1986); State v. Stackhouse, 194 N.J.Super. 371, 476 A.2d 1268 (A.D.1984); Lee v. State, 673 P.2d 892 (Alaska App.1983); and People v. Dugger, 673 P.2d 351 (Colo.1983). In all these cases, regardless of the surrounding circumstances, the courts have recognized that principles of due process will not tolerate the continued enhancement of a sentence imposed at a time when the accused was unaware that the predicate convictions were invalid. Such a sentence, in the words of New Jersey’s Appellate Division, rests on “an insufficient factual basis,” Stackhouse 476 A.2d at 1269, and resentencing is constitutionally required. To hold otherwise “would only serve to com*44pound whatever constitutional wrong has already occurred.” Domegan at 169.
In People v. Dugger, supra, the prosecution made an argument similar to that advanced in the majority opinion in this case. In the Colorado case, the defendant entered a guilty plea to a forgery charge and received an enhanced sentence because of a previous forgery conviction. As part of the plea agreement, however, Dugger, like Wallen, received the added benefit of having certain habitual criminal counts dismissed. Subsequently, Dugger challenged the previous forgery conviction in a post-conviction proceeding and that previous conviction was invalidated. Dugger then claimed that the second forgery sentence must be reduced because the conviction upon which the enhanced sentence was predicated had been overturned. The government argued, however, that the defendant somehow “reaffirmed” his invalid prior conviction (or in Mahler terms, waived that invalidity) by agreeing to a guilty plea imposing an enhanced sentence for a subsequent conviction.
The Colorado Supreme Court summarily rejected that argument, based on federal and state constitutional grounds. The Dugger decision notes that the appellate court “has already declared the [previous forgery] conviction to be invalid, and its decision constitutes a final judgment which is binding on the [trial] court.” People v. Dugger, supra, 673 P.2d at 353. In a footnote, the court then explained, “[W]e are at a loss to understand the People’s claim that somehow the defendant could ‘reaffirm’ the validity of his [previous] conviction when the court of appeals has decreed by final judgment that the [previous] conviction was a nullity.'’ Id., 673 P.2d at 353 n. 5 (emphasis added).
For reasons of fundamental fairness, I believe that the holding in Dugger should be adopted and applied in this case, rather than the inapposite holding in Mahler. Put simply, Mahler involved a best interest guilty plea in which all the cards, so to speak, were on the table at the time the plea was entered. In order to avoid a looming first-degree murder conviction, Mahler entered a plea to the lesser included offense of second-degree murder and was sentenced in the high end of the upper range for that offense, even though there was no proof to show that he had a prior criminal record that would justify Range II sentencing.
It is true that no one told Mahler that a Range II sentencing would not have been applicable had he gone to trial and been found guilty of second degree murder, because the state had failed to file notice that the prosecution would seek enhanced punishment in the event of such a conviction. Because the indictment charged first-degree murder, the possible punishments for which were death or a life sentence, Range II sentencing was irrelevant, and statutory notice of intent to seek enhancement was not required. Moreover, the transcript of the submission hearing apparently showed that Mahler would have pleaded guilty in any event, in order to avoid conviction of the more serious offense. State v. Mahler, supra, 735 S.W.2d at 227.
Here, by contrast, the guilty pleas were entered in exchange for a promise by the state to drop the habitual criminal counts, which were ostensibly based on Wallen’s pri- or forgery convictions. But in Wallen’s case, the cards were not all on the table — indeed, they had not even been dealt. It is quite clear that if Wallen had known that the 17 forgery convictions were voidable and were eventually going to be invalidated, thus obliterating the legal basis for the habitual criminal charges, he would not have pleaded guilty in exchange for voluntary dismissal of the recidivist counts, even though he might have pleaded guilty for some other concession. Importantly, however, the only concession he was offered for his pleas in this ease involved dismissal of the habitual criminal counts. He thus settled for three concurrent life sentences, rather than three life sentences without possibility of parole, which conviction on the habitual criminal counts would have required.
Now that the underlying felony convictions have been invalidated, the basis for the negotiated pleas in this case has disappeared. Thus, the situation here is different from that in Mahler, where the factual predicate for the guilty plea was the same on post-conviction as it was at the time Mahler entered his *45plea. Mahler reaped considerable benefit from his bargain. Because of post-guilty plea developments, Wallen ends up with no benefit at all.
Wallen asks this Court to set aside his guilty pleas entirely, based on his contention that they were not voluntarily and knowingly entered. What “taints” the convictions however, is the impropriety of the sentence when viewed from hindsight, and not the lack of effective assistance of counsel, non-compliance with Boykin, or like constitutional defect that would invalidate the pleas. It thus appears that Wallen’s rights can be protected simply by correcting the error in sentencing that has come to light post hoc. Hence, the proper remedy is to remand the case for resentencing.
Jf. Failure to Challenge the kO-year Sentence
Wallen also challenged the propriety of his 40-year armed robbery sentence in his pro se complaint. The trial court recognized that his argument was meritorious but granted only partial relief. Because we are authorized by law to recognize “plain error” on appeal and take steps sua sponte to correct it, see Rule 52(b) Tennessee Rules of Criminal Procedure, I believe that we should grant the petitioner full relief on all four sentences. They suffer from a common constitutional deficiency; they should be equally subject to correction.
Conclusion
Because federal constitutional law prohibits the use of invalid convictions to enhance a subsequent sentence, I would set aside the sentences in all four of Wallen’s armed robbery cases and remand those cases for resen-tencing. I dissent from the majority’s conclusion that the constitutional error here has been waived by entry of pleas of guilty.’
I am authorized to say that ANDERSON, J., joins me in this dissent.