
170 S.W.3d 107 (2005)
Henry Tom GARLAND, Appellant,
v.
The STATE of Texas.
No. PD-1231-04.
Court of Criminal Appeals of Texas.
June 29, 2005.
Rehearing Denied September 14, 2005.
Suzanne Kramer, San Antonio, for appellant.
Alan E. Battaglia, Assist. DA, San Antonio, Matthew Paul, State's Attorney, Austin, for state.
HOLCOMB, J., delivered the opinion of the unanimous Court.
The court of appeals held that appellant's negotiated plea of nolo contendere was involuntary and that his sentence was illegal. We reverse.
Our discussion begins with a review of the relevant facts. On December 19, 2001, a Bexar County grand jury presented an indictment that charged appellant with two second-degree felonies, to wit: sexual assault (Count I) and indecency with a child (Count II). See Tex. Pen.Code §§ 21.11(a)(1) & 22.011(a)(2)(A). For purposes of punishment enhancement, the indictment also alleged, in three separate paragraphs, that appellant had three prior felony convictions. See generally Tex. Pen.Code § 12.42. Of particular importance, it later turned out, was the second enhancement paragraph, which read:
Before the commission of the offense[s] alleged above, on the 12TH day of AUGUST, A.D.1992, in GENERAL COURT-MARTIAL ORDER NUMBER 55, in FORT POLK, LOUISIANA, the Defendant was convicted of the offense of RAPE AN OFFENSE WHOSE ELEMENTS ARE SUBSTANTIALLY SIMILAR TO THE ELEMENTS OF THE OFFENSE OF SEXUAL ASSAULT UNDER SECTION 22.011 OF THE TEXAS PENAL *108 CODE.[[1]]
(All capitalization in original.)
On August 21, 2002, at a pretrial hearing, appellant pled, pursuant to a plea bargain, nolo contendere to Count I of the indictment. In accordance with the terms of the plea bargain, appellant also pled "true" to the second enhancement paragraph, and agreed to register as a sex offender and to have no further contact with the complainant. As its part of the plea bargain, the State agreed to abandon Count II of the indictment and to recommend a fine of $1,000 and "a cap of 45 years" on appellant's prison sentence. The State also agreed to abandon four misdemeanor prosecutions then pending against appellant.
The August 21, 2002, pretrial hearing proceeded, in relevant part, as follows:
The Court: Now, I understand that what he wants to do is, he wants to change his plea [of not guilty] to nolo contendere. Is that correct?
Defense Counsel: Yes, Your Honor.
The Court: No contest. Is that what you want to do, Mr. Garland?
Appellant: Yes, Your Honor, it is.
* * *
The Court: All right. Now, he is pleading to an enhanced count. That is the third  the third enhanced count on there?
Prosecutor # 1: No. Actually, Your Honor, we are proceeding on the  the rape, the second one.
The Court: The second?
Prosecutor # 1: Uh-huh.
The Court: He is pleading to Count Number II, right?
Prosecutor # 1: He is pleading to Count I, but with the second enhancement.
Defense Counsel: Let me just make sure I understand. The way you are  you are presenting that is that the judge is going to make a finding that  that the enhancement paragraph is not sufficient, because how are we going to get out of the automatic life [sentence]?[[2]]
Prosecutor # 1: No. Just  rather than using it for purposes of automatic life, it is just being used as a regular repeater paragraph. That makes it a first-degree felony as opposed to a second-degree felony.
Prosecutor # 2: The judge would have to make an affirmative finding that it is the same or similar in elements to the  to the prior.
Prosecutor # 1: In order for it to qualify for automatic life.
* * *
Defense Counsel: I am just concerned, if he  if he pleads  I understand your thought process on that, but I don't know if it is legally  if we can legally do it that way.
* * *

*109 Prosecutor # 1: Well, it is  it is my understanding that as long as we are  the State intends to use it as just a prior felony conviction rather than under the auspices of the automatic life provision, that it just enhances it to a first-degree felony.
The Court: All right. Are we all agreed on that?
Defense Counsel: As long as everybody understands that, if he pleads to it, then, there is not 
The Court: It is a first.
Defense Counsel:  it is not 
The Court: It is a first 
Defense counsel:  it is just a first 
The Court:  first-degree felony.
Defense Counsel:  but it is not an automatic life 
The Court: All right.
Defense Counsel:  then I don't have a problem with that.
The Court: Now, they have alleged that he is pleading to the second count of the enhancement. What is your  do you understand what the second count of the enhancement alleges?
* * *
Appellant: Yes, Your Honor.
The Court: Okay. Is that allegation true or untrue?
Appellant: Yes, I was convicted, Your Honor.
* * *
The Court: Okay. What you are charged with is a second-degree felony, and enhanced it becomes a first-degree felony. The punishment is a minimum of five years, a maximum of 99 years or life imprisonment. In addition, you can be fined not to exceed $10,000.
There is a state law that says that, whenever I take any kind of plea, I have to tell the person that is pleading the whole punishment range that is affixed to whatever you are pleading to.
* * *
The Court: All right. I am going to show, based upon the [stipulated] evidence that has been offered against you, that the proof is sufficient to find that you are guilty of this offense.
I am going to find you guilty of the offense on your plea. I am going to refer your case to the probation division for a presentence report. When I get the presentence report, I will decide what to do with setting the punishment on his case.
On September 26, 2002, the trial court, acting within the terms of the plea bargain, assessed appellant's punishment at imprisonment for 25 years and no fine. The trial court also granted appellant an unqualified right to appeal. See Tex.R.App. Proc. 25.2.
On direct appeal, appellant brought a single point of error, under which he made two arguments in support of his request for a new trial. Appellant argued first that his 25-year prison sentence was "void" because "he was sentenced outside the mandatory ... punishment." More specifically, appellant argued that, given his plea of nolo contendere to Count I of the indictment, which alleged a sexual assault, and given his plea of "true" to the second enhancement paragraph, which alleged a prior conviction for an out-of-state offense whose elements were substantially similar to sexual assault, the trial court was required by Texas Penal Code § 12.42(c)(2) to sentence him to imprisonment for life. See footnote one, supra. Appellant also argued that his "plea of `no contest' was involuntary [because] he was erroneously admonished [with respect to the mandatory] punishment."
*110 The State argued in response that appellant's 25-year prison sentence was not void because it was a lawful sentence for the second-degree felony, enhanced to a first-degree felony, to which he pled nolo contendere and of which he was found guilty. According to the State, Texas Penal Code § 12.42(c)(2) was inapplicable to this case because, at the August 21, 2002, pretrial hearing, "the State waiv[ed] and abandon[ed] that portion of the second enhancement paragraph that would have required proof of, and a finding by the trial court that, the rape [in Louisiana] constituted `an offense whose elements are substantially similar to the elements of the offense of sexual assault under section 22.011 of the Texas Penal Code.'" The State further argued that appellant's plea of nolo contendere was not involuntary because "[t]he trial court properly admonished [him on] the range of punishment for a first-degree felony after [he] and the State, with the approval of the court, entered the agreement that the State would not seek a finding on the second [enhancement] paragraph that the offense charged therein contained elements substantially similar to the elements of the charged primary offense."
On May 26, 2004, the Fourth Court of Appeals, in an unpublished opinion, accepted appellant's arguments in toto, sustained his point of error, and remanded the case to the trial court for further proceedings. Garland v. State, No. 04-02-00812-CR, 2004 WL 1159126 (Tex.App.-San Antonio 2004). "Defendant's sentence of twenty-five years' confinement," the court of appeals explained, "was less than [the life sentence] required by section 12.42(c)(2)," and, "therefore, his sentence is void." Id., slip op. at 2. "Our review of the record," the court continued, "also leads us to conclude defendant would not have pled nolo contendere if a life sentence was to be imposed. Therefore, the appropriate remedy is to return the parties to the positions occupied prior to the plea bargain agreement." Id., slip op. at 3. Significantly, the court of appeals rejected the State's interpretation of the record. According to the court of appeals, "[t]he prosecutor [at the August 21, 2002, pretrial hearing] did not explicitly or implicitly waive any portion of the second enhancement paragraph." Id., slip op. at 2.
On November 17, 2004, we granted the State's petition for discretionary review to determine whether the court of appeals erred. See Tex.R.App. Proc. 66.3(c). The State, in its brief to this Court, continues to argue, as it did below, that, "[a]lthough the enhancement provision to which [appellant] pleaded contained the allegation that he had previously been convicted [in Louisiana] of rape, `an offense whose elements are substantially similar to the elements of sexual assault under section 22.011' of the Texas Penal Code, which would require an automatic life sentence if found true under Texas Penal Code Ann. § 12.42(c)(2) . . ., the record is perfectly clear that the State, [appellant], and the trial court all agreed that that particular provision would not apply. The result being that the enhancement would be treated as a prior felony that would raise the punishment level to a first-degree [felony] but not an automatic life."[3]
*111 We have recognized before that the State may, with the permission of the trial court, "dismiss, waive or abandon a portion of the indictment." Ex parte Preston, 833 S.W.2d 515, 517 (Tex.Crim.App.1992). See generally G. Dix & R. Dawson, Texas Practice: Criminal Practice and Procedure § 30.41 (2d ed.2001). After reviewing the record, we conclude that that is exactly what happened in this case. That is, at the August 21, 2002, pretrial hearing, the State abandoned, with the trial court's permission, that portion of the indictment's second enhancement paragraph that exposed appellant to the possibility of an automatic life sentence. The court reporter's record of the hearing, quoted previously, makes it abundantly clear that everyone in the courtroom understood what the State was doing. Indeed, the record makes it abundantly clear that appellant would not have pled "true" to the second enhancement paragraph if the State had not abandoned the portion of that paragraph that exposed him to the possibility of an automatic life sentence.
In light of the State's abandonment, appellant's 25-year prison sentence was not unlawful. Furthermore, in light of the State's abandonment, the trial court's admonishment concerning the range of punishment was not incorrect, and, therefore, appellant's plea was not involuntary.
We reverse the judgment of the court of appeals and affirm the judgment of the trial court.
NOTES
[1]  Texas Penal Code § 12.42(b) provides that, "[i]f it is shown on the trial of a second-degree felony that the defendant has been once before convicted of a felony, on conviction he shall be punished for a first-degree felony." Texas Penal Code § 12.32 provides, in turn, that punishment for a first-degree felony is imprisonment "for life or for any term of not more than 99 or less than 5 years" and a fine "not to exceed $10,000." Finally, Texas Penal Code § 12.42(c)(2) provides, in relevant part, that "[a] defendant shall be punished by imprisonment ... for life if the defendant is convicted of [sexual assault] and the defendant has been previously convicted of an offense under the laws of another state containing elements that are substantially similar to the elements of [sexual assault]."
[2]  See footnote one, supra.
[3]  The State also argues that appellant "should be estopped from complaining that his 25-year sentence was void because he plea bargained for that sentence." See Ex parte Williams, 65 S.W.3d 656, 658-660 (Tex.Crim.App.2001) (Keller, P.J., concurring) (one who accepts the benefits of a plea bargain should be estopped from challenging its validity). The State made no such estoppel argument in the court of appeals, however, so we will not consider it. See Smith v. State, 70 S.W.3d 848, 850 (Tex.Crim.App.2002); Monreal v. State, 947 S.W.2d 559, 564 n. 7 (Tex.Crim.App.1997); Holland v. State, 802 S.W.2d 696, 700 (Tex.Crim.App.1991); G. Dix & R. Dawson, Texas Practice: Criminal Practice and Procedure § 44.24 (2d ed.2001).
