
61 So.3d 156 (2011)
Albert JOINER, Jr.
v.
STATE of Mississippi.
No. 2009-CT-00222-SCT.
Supreme Court of Mississippi.
May 19, 2011.
*157 James D. Minor, Oxford, attorney for appellant.
Office of the Attorney General by Lisa L. Blount, Attorney for Appellee.
EN BANC.

ON WRIT OF CERTIORARI
LAMAR, Justice, for the Court:
¶ 1. In September 2007, a Lafayette County grand jury returned a two-count indictment against Albert Joiner. Count I charged Joiner with felony flight, and Count II charged Joiner with being a felon in possession of a deadly weapon. Although Count II listed several prior felonies by Joiner, the indictment did not charge him as a habitual offender. In a separate case in Lafayette County, Joiner had a pending indictment for armed robbery as a habitual offender under Mississippi Code Section 99-19-83, an enhancement which carries a sentence of life without parole.
¶ 2. Pursuant to a plea agreement, the State agreed to dismiss Count II in the second indictment, the felon-in-possession charge, and reduce the armed-robbery charge to strong-armed robbery if Joiner would plead guilty to felony flight and strong-armed robbery as a "lesser habitual offender" under Mississippi Code Section 99-19-81.[1] Pursuant to this negotiated *158 plea agreement, Joiner pleaded guilty to felony flight and strong-armed robbery and was sentenced to a total of nineteen years as a Section 99-19-81 habitual offender.
¶ 3. Joiner subsequently filed a motion for post-conviction relief in the Lafayette County Circuit Court, arguing that the trial judge had erred in sentencing him as a habitual offender for the felony-flight charge, because the indictment failed to charge him as a habitual offender.[2] Joiner also argued that the State had failed to prove that he had been "convicted twice previously" of any felony. He requested that the trial judge vacate his sentence for the felony-flight charge and set a hearing date for resentencing. The trial judge summarily denied his petitions,[3] and Joiner appealed.
¶ 4. The case was assigned to the Court of Appeals, which affirmed the trial-court judge. See Joiner v. State, 61 So.3d 171 (Miss.Ct.App.2010). The Court of Appeals held that, because Joiner voluntarily had pleaded guilty to the reduced charge of "felony fleeing lesser habitual," he was "aware of his eligibility for sentencing as a habitual offender." Joiner, 61 So.3d at 173. The Court of Appeals also held that Joiner was not denied effective assistance of counsel, pointing out that his attorney had negotiated a reduced sentence of nineteen years as a habitual offender under Section 99-19-81, rather than a life sentence as a habitual offender under Section 99-19-83. Id. at 173.
¶ 5. Joiner filed a petition for writ of certiorari, which we granted, arguing the same issues that he argued before the trial court and the Court of Appeals. Although we agree with the Court of Appeals' disposition, we granted certiorari to examine Joiner's claim that his sentence as a habitual offender for felony flight is invalid because the indictment failed to charge him as a habitual offender. We limit our discussion to that issue. See Miss. R.App. P. 17(h).
¶ 6. Joiner is correct that a defendant has a right to be indicted as a habitual offender before he properly may be convicted and sentenced as a habitual offender. But the right to be indicted as a habitual offender is a right that can be waived, along with many others, by a knowing and voluntary guilty plea. Because we find that Joiner's knowing and voluntary guilty plea waived his right to contest this deficiency in the indictment, we agree with the Court of Appeals and affirm the trial court's denial of his petition for post-conviction relief.
¶ 7. It is well-settled that a knowing and voluntary guilty plea waives certain constitutional rights, among them the privilege against self-incrimination, the right to confront and cross-examine the State's witnesses, the right to a jury trial, and the right to have the State prove each element of the offense beyond a reasonable doubt. Jefferson v. State, 556 So.2d 1016, 1019 (Miss.1989) (citations omitted). And beyond the constitutional rights that may *159 be waived, "the law is settled that with only two exceptions, the entry of a knowing and voluntary guilty plea waives all other defects or insufficiencies in the indictment." Conerly v. State, 607 So.2d 1153, 1156 (Miss.1992) (citation omitted) (emphasis added). A guilty plea does not waive an indictment's failure to charge an essential element of the crime, and it does not waive lack of subject matter jurisdiction, but neither of these exceptions is at issue here. Id.
¶ 8. The plea colloquy reveals that Joiner's guilty plea was knowing and voluntary. The trial judge questioned Joiner thoroughly as to the voluntariness of his plea, asking Joiner if his signature appeared on the plea petitions, if he had been given an opportunity to discuss the petitions with his attorney, if his attorney had explained the petitions to him, if he was satisfied with his attorney, and if he understood all the rights he was giving up by pleading guilty. Joiner answered affirmatively to all of the judge's questions. Joiner also denied being under the influence of anything that would impair him, having any type of disability, or being threatened or promised anything in exchange for his guilty pleas.
¶ 9. The plea colloquy also reveals that Joiner was well aware that he was pleading as a habitual offender:
Court: Mr. Joiner, in Cause Number LK07-133, the Court has before it a petition to enter a plea of guilty as a lesser habitual offender to the crime of strong armed robbery. Is that correct?
Joiner: Yes, sir.
Court: And in Cause Number LK07-399, which is, of course, also the State of Mississippi versus Albert Joiner, Jr., I have a petition to enter plea of guilty to the crime of felony fleeing of a law enforcement officer as a lesser habitual offender. Is that also correct?
Joiner: Yes, sir.
. . .
Court: And in each of these two cases also are you telling me that you realize and understand that you qualify for habitual offender status and that you're going to be sentenced, if the Court accepts your guilty plea, as what we call a lesser habitual offender which will mean that the time that you receive you will have to serve day-for-day? Do you understand that?
Joiner: Yes, sir.
. . .
Court: Now, if the Court accepts your guilty plea in these two cases, they will go on your record and they will be added to the felonies you already have on your record. You already qualify as a habitual offender, and you will continue to qualify as a habitual offender. Once you get out of the penitentiary, any other felon[ies] you're charged with, you can take these charges as well as your other prior felonies, and use them against you to make your punishment worse, to enhance it. Do you understand what I'm telling you?
Joiner: Yes, sir.
Court: I expect to receive a recommendation in your case, and that's going to be that the court sentence ... you to habitual time. It's 15 years to serve in one case and 4 years to serve in the other case consecutive habitual offender day-for-day. Do you understand that recommendation?
Joiner: Yes, sir.
Court: And you will be required to serve all 19 of those years?
Joiner: Yes, sir.
(Emphasis added.)
¶ 10. We find that Joiner knowingly and voluntarily pleaded guilty to the *160 charge of felony flight as a Section 99-19-81 habitual offender. We further find that a knowing and voluntary guilty plea waives an indictment's failure to include habitual offender status, and we therefore affirm the trial court's denial of Joiner's petition for post-conviction relief as well as the Court of Appeals' affirmance of that judgment.
¶ 11. AFFIRMED.
WALLER, C.J., CARLSON AND DICKINSON, P.JJ., RANDOLPH AND PIERCE, JJ., CONCUR. CHANDLER, J., DISSENTS WITH SEPARATE WRITTEN OPINION JOINED BY KITCHENS, J. KING, J., NOT PARTICIPATING.
CHANDLER, Justice, dissenting:
¶ 12. The majority's decision eliminates the requirement under Uniform Rule of Circuit and County Court Practice 7.09 that the State obtain an amendment to the indictment before a defendant may be sentenced as a habitual offender, depriving Joiner and future defendants of due process of law. Therefore, I respectfully dissent.
¶ 13. Rule 7.09 provides:
All indictments may be amended as to form but not as to the substance of the offense charged. Indictments may also be amended to charge the defendant as an habitual offender or to elevate the level of the offense where the offense is one which is subject to enhanced punishment for subsequent offenses and the amendment is to assert prior offenses justifying such enhancement (e.g., driving under the influence, Miss.Code Ann. § 63-11-30). Amendment shall be allowed only if the defendant is afforded a fair opportunity to present a defense and is not unfairly surprised.

URCCC 7.09 (emphasis added). Under this rule, "an indictment maybe [sic] amended to include the charge of habitual offender only if the offender is given `a fair opportunity to present a defense and is not unfairly surprised.'" Smith v. State, 835 So.2d 927, 948-49 (Miss.2002) (quoting Adams v. State, 772 So.2d 1010, 1020 (Miss.2000) (quoting URCCC 7.09)). "This means that the defendant must be afforded due process of law and be given fair notice of `the nature and cause of the accusation.'" Gowdy v. State, 56 So.3d 540, 545 (Miss.2011); see U.S. Const. amends. VI, XIV; Miss. Const. art. 3, §§ 14, 26. An "indictment against an habitual offender must include a charge of habitual offender status sufficient to satisfy notice/due process requirements and double jeopardy concerns." Hentz v. State, 542 So.2d 914, 918 (Miss.1989) (citations omitted). This Court has held that if a defendant is not indicted as a habitual offender, the defendant cannot be convicted and sentenced as a habitual offender. Feazell v. State, 761 So.2d 140, 142-43 (Miss.2000) (citing Keyes v. State, 549 So.2d 949, 951 (Miss.1989)). This Court recently has held that, consistent with Rule 7.09, the State may not be permitted to amend the indictment to charge habitual-offender status after the defendant has been convicted. Gowdy, 56 So.3d at 546.
¶ 14. Because the State failed to seek and obtain an amendment to Joiner's indictment under Rule 7.09, Joiner presently stands before this Court having been sentenced, but never indicted, as a habitual offender. No precedent cited by the State or identified by the majority addresses a total failure by the State either to indict the defendant as a habitual offender, or to obtain an amendment, prior to the defendant's sentencing as a habitual offender. I would find that Joiner's guilty plea did not waive this error. Rule 7.09 clearly requires that an indictment must be amended *161 before the State may seek habitual-offender sentencing. The amendment must be made in such time as to permit the defendant a fair opportunity to present a defense and to prevent unfair surprise. URCCC 7.09. These are due-process considerations, none of which were met in this case.
¶ 15. Only a voluntary guilty plea functions as a waiver. Brooks v. State, 573 So.2d 1350, 1353 (Miss.1990). A guilty plea is voluntary if it "represents a voluntary and intelligent choice among the alternative courses of action open to the defendant." Hill v. Lockhart, 474 U.S. 52, 56, 106 S.Ct. 366, 88 L.Ed.2d 203 (1985). The accused's ignorance or incomprehension impacts the constitutionality of a guilty plea. Boykin v. Alabama, 395 U.S. 238, 242-43, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969).
¶ 16. The trial court may not accept a guilty plea without determining that the plea is voluntarily and intelligently made. URCCC 8.04. Uniform Rule of Circuit and County Court 8.04 provides that, before accepting a guilty plea, the trial court must inquire as to the voluntariness of the plea. URCCC 8.04. The trial court must ascertain that the defendant is competent to understand the nature of the charge, and understands that the guilty plea operates as a waiver of certain constitutional rights. URCCC 8.04. The trial court must inform the defendant of the nature and consequences of the plea, and the maximum and minimum sentences that may be imposed for the crime charged. URCCC 8.04. This Court has held that, under Rule 8.04, "notice of the charge includes notice of the applicable minimum and maximum penalties," including habitual-offender status. Gowdy, 56 So.3d at 546.
¶ 17. In this case, an "Agreed Motion and Order to Reduce Charges," entered by the circuit court stated that Joiner and the district attorney had agreed to reduce the charge from "lifetime habitual" to "felony fleeing-maximum habitual." Thus, the "Agreed Motion and Order" reflects Joiner's understanding that he was "pleading down" from sentencing eligibility under Mississippi Code Section 99-19-83 to sentencing eligibility under Mississippi Code Section 99-19-81. While Joiner's guilty plea had other requisites of voluntariness, the record reflects that neither the prosecutor, nor Joiner's defense counsel, nor the court, informed Joiner that his indictment actually had not charged him as a habitual offender. Without proper notice of this fact, Joiner could not knowingly, intelligently, and voluntarily have waived the State's failure to charge him as a habitual offender.[4] A guilty plea entered under the mistaken belief that one has been charged as a habitual offender cannot be said to be voluntary. Therefore, Joiner's guilty plea did not function as a waiver of his right to be indicted as a habitual offender. Because Joiner was not indicted as a habitual offender, and he did not knowingly, intelligently, and voluntarily waive the right to be indicted as a habitual offender, I would *162 reverse the Court of Appeals and the circuit court, grant the petition for post-conviction relief to vacate the habitual-offender portion of Joiner's sentence for Count I, felony flight, and remand for resentencing as to Count I as a nonhabitual offender.
KITCHENS, J., JOINS THIS OPINION.
NOTES
[1]  Section 99-19-81 mandates that a defendant who has been twice previously convicted of a felony and sentenced to separate terms of one year or more be sentenced to the maximum term of imprisonment for any subsequent felonies. It differs from Section 99-19-83 in that it does not mandate life in prison for any subsequent felony. Compare Miss. Code Ann. § 99-19-81 (Rev.2007) with Miss. Code Ann. § 99-19-83 (Rev.2007).
[2]  Joiner's conviction for strong-armed robbery is not before us. That conviction was the subject of a separate motion for post-conviction relief which was denied by the trial court and affirmed on appeal by the Court of Appeals in Joiner v. State, 32 So.3d 542 (Miss. Ct.App.2010).
[3]  Joiner also filed an amended motion for post-conviction relief, adding a claim of ineffective assistance of counsel.
[4]  The facts of this case are distinguishable from those in Elliott v. State, 993 So.2d 397 (Miss.Ct.App.2008), and Smith v. State, 965 So.2d 732 (Miss.Ct.App.2007). In both cases, the defendant had agreed to habitual-offender sentencing as part of a plea bargain, although neither defendant's original indictment had charged habitual-offender status. Elliott, 993 So.2d at 399; Smith, 965 So.2d at 736. In both cases, prior to the plea colloquy, the trial court granted the State's motion to amend the indictment to charge the defendant as a habitual offender under Rule 7.09 after fully explaining the process to the defendant. Elliott, 993 So.2d at 399; Smith, 965 So.2d at 735-36. Thus, unlike this case, in Elliott and Smith, it was shown that the defendant voluntarily had pleaded guilty upon a proper indictment amended in compliance with Rule 7.09.
