
862 S.W.2d 179 (1993)
Robert William HERN, Appellant,
v.
The STATE of Texas, Appellee.
No. 01-92-00928-CR.
Court of Appeals of Texas, Houston (1st Dist.).
September 16, 1993.
Ming Roschke, College Station, for appellant.
Bill Turner, Kyle Davis, Asst. Dist. Atty., College Station, for appellee.
Before O'CONNOR, DUGGAN and HEDGES, JJ.

OPINION ON MOTION FOR REHEARING
O'CONNOR, Justice.
We grant the State's motion for rehearing, withdraw our earlier opinion,[1] and substitute the following opinion in its stead. The appellant, *180 Robert William Hern, appeals the trial court's denial of habeas corpus relief.
On May 14, 1992, the State charged the appellant, Robert William Hern, by indictment with the offense of theft of a firearm over $400. We shall refer to this as the first indictment.
On July 2, 1992, the appellant signed a plea agreement in which he agreed to plead guilty to the offense of "theft of firearm over $400 w/ one enh." The State agreed to recommend punishment of 22-years confinement. To conform the plea agreement, the parties expected the State to amend the indictment to include an enhancement paragraph.
On July 8, 1992, the appellant signed a plea of guilty, waiver, stipulation, and judicial confession. This document reflects that the appellant was charged with a "felony of the 2nd degree w/ 1 enh paragraph." The range of punishment for a second-degree felony is not less than two years and not more than 20. Tex.Penal Code Ann. § 12.33(a) (Vernon 1974).
On July 9, 1992, the State re-indicted the appellant. The second indictment bore the same cause number as the first indictment, included the offense of theft of a firearm and, as the parties anticipated, added an enhancement paragraph. The State filed the second indictment with the clerk, but it was not included in the court's file and was not served on the appellant.
On July 10, 1992, the trial court accepted the appellant's plea of guilty. On that date, the court's file contained only the first indictment, dated May 14, 1992, which did not include an enhancement paragraph. At the hearing, the parties, by agreement, amended the appellant's plea documents by crossing out the reference to the enhancement paragraph and by the changing recommended punishment from 22 to 20 years. The trial court, in admonishing the appellant about the punishment range for the offense, told him it was a second-degree felony with a range of punishment of two to 20 years. The offense on the amended first indictment was actually a third-degree felony. The court assessed punishment and sentenced the appellant to the recommended 20 years.
The State admits that the trial court's admonishment regarding the range of punishment for the offense was erroneous. Both parties acknowledge that the trial court's sentence of 20 years exceeds the range allowed by statute for a third-degree felony.
Theft of a firearm over $400, without an enhancement paragraph, is a third-degree felony, not, as the trial court admonished, a second-degree felony. Tex.Penal Code Ann. § 31.03(e)(4)(C) (Vernon Supp.1993). The punishment range for a third-degree felony is not less than two years and not more than 10 years. Tex.Penal Code Ann. § 12.34(a)(1) (Vernon Supp.1993). With the enhancement paragraph, theft of a firearm would have been a second-degree felony. The recidivist statute provides, in part, "If it be shown on the trial of a third-degree felony that the defendant has been once before convicted of any felony, on conviction he shall be punished for a second-degree felony." Tex.Penal Code Ann. § 12.42(a) (Vernon 1974).
On July 24, 1992, the trial court, on its own motion and over the objections of the appellant, granted a new trial. On August 11, 1992, the State re-indicted the appellant for the third time, this time with four enhancement paragraphs. The third indictment also bore the same cause number as the original indictment.
The appellant filed a special plea of double jeopardy, and the trial court conducted a hearing. At the hearing, the appellant testified he had been tried for the theft of a firearm over $400 and pled guilty to the charge; he stated that he did not want to be retried for the offense. The trial judge denied his application, stating:
The Court takes judicial notice that the range of punishment was improper. The Court takes judicial notice that [neither] defense counsel nor State said anything to the Court at that time. Therefore, the Court finds that judgment is void from the *181 very moment, and therefore, the reason the Court ordered a new trial was based on a void judgment. The Court denies your special plea of double jeopardy.
The appellant then filed this appeal.
In his sole point of error, the appellant alleges that the trial court erred in "denying application for writ of habeas corpus and allowing [the] State to re-prosecute the same theft for which appellant had already been convicted, sentenced and served part of the sentence in violation of the double jeopardy clause." The appellant contends that the mistake concerning the offense for which he was charged and the appropriate range of punishment pertains to punishment only and that he should not again be placed in jeopardy because of an inadvertent mistake for which he was not responsible. He asks this Court to reverse the trial court's order denying his application for habeas corpus relief, issue an order dismissing further prosecution of the same theft under the third indictment, and either reform the sentence or remand the cause for reassessment of punishment under the appropriate statute.
The State, in its motion for rehearing, contends that the only permissible remedy in this case is to permit the trial court to withdraw the appellant's plea of guilt and return both partiesthe appellant and the State to their original positions, as if no plea of guilt had been entered. The State asserts that this case is controlled by Shannon v. State, 708 S.W.2d 850 (Tex.Crim.App.1986). We agree. In Shannon, the Court of Criminal Appeals distinguished "negotiated guilty" pleas from "not guilty" pleas and "guilty" pleas without a recommendation. The court stated, "When a defendant attacks the sentence he received, and for which he bargained, he is attacking the entire judgment of conviction. To permit resentencing in this situation is to bind only one party to the agreement. This is neither fair nor logical." Id. at 852. The court went on to hold:
[W]hen a defendant, who has entered a negotiated plea of guilty, challenges the conviction and is successful, the appropriate remedy is specific performance of the plea, if possible, or, if not, withdrawal of the plea, with both parties, including the State, returned to their original positions.
Id; see also Heath v. State, 817 S.W.2d 335, 340 (Tex.Crim.App.1991) (in plea bargain situations where specific performance is not an alternative, the only remedy is to order the plea withdrawn and to return the parties, including the State, to their original positions).
The appellant's original sentence of 20 years exceeded the maximum allowable punishment for a third-degree felony; the sentence is void. Heath, 817 S.W.2d at 336 (if a punishment is not authorized by law, the portion of the sentence imposing punishment is void). Specific performance was, therefore, impossible. Because specific performance of the plea bargain was impossible, the trial court's only alternative was to withdraw the appellant's plea of guilty, thus returning both parties to their original positions. See id. at 340. The trial court accomplished this by ordering a new trial. See Tex.R.App.P. 32.
We do not agree with the appellant that a later prosecution for this theft will subject him to double jeopardy. When a defendant successfully repudiates a plea bargain, either by withdrawing the plea or by successfully challenging his conviction on appeal, there is no double jeopardy obstacle to restoring the defendant and the State to the relationship that existed prior to the defunct bargain. United States v. Kim, 884 F.2d 189, 191 (5th Cir.1989); Nassar v. State, 797 S.W.2d 318, 319-20 (Tex.App.Corpus Christi 1990, pet. ref'd). The appellant asked this Court to reform his sentence or remand for reassessment of his sentence. This position amounts to a repudiation of his plea agreement. See Kim, 884 F.2d at 192.
We affirm the trial court's denial of habeas corpus relief.
NOTES
[1]  Hern v. State, 849 S.W.2d 924 (Tex.App. Houston [1st Dist.] 1993).
