
224 P.3d 206 (2010)
The STATE of Arizona, Petitioner,
v.
Steven D. SZPYRKA, Respondent.
No. 2 CA-CR 2009-0275-PR.
Court of Appeals of Arizona, Division 2, Department B.
January 14, 2010.
*207 Barbara LaWall, Pima County Attorney by Jacob R. Lines, Tucson, Attorneys for Petitioner.
Isabel G. Garcia, Pima County Legal Defender by Scott A. Martin, Tucson, Attorneys for Respondent.

OPINION
VÁSQUEZ, Judge.
¶ 1 In January 2007, Steven Szpyrka was charged with eight counts of third-degree burglary, two counts of theft by control, and one count each of conspiracy to commit burglary, possession of a dangerous drug, and possession of drug paraphernalia. The state alleged Szpyrka had one historical prior felony conviction for theft by control in cause number CR-20063298. In November, Szpyrka entered into a plea agreement, pursuant to which he agreed to plead guilty to the conspiracy charge, admit the prior felony conviction, and be sentenced according to the enhanced range appropriate for a class three felony with one historical prior felony conviction. See A.R.S. § 13-703(B), (I).[1] The state agreed to dismiss all other charges. The trial court sentenced Szpyrka to an enhanced, presumptive prison term of 6.5 years. See id.
¶ 2 Szpyrka subsequently appealed his conviction in CR-20063298. In December 2008, this court vacated the conviction, finding Szpyrka's constitutional rights pursuant to Miranda v. Arizona, 384 U.S. 436, 86 S.Ct. 1602, 16 L.Ed.2d 694 (1966), had been violated. State v. Szpyrka, 220 Ariz. 59, 202 P.3d 524 (App.2008). In April 2008, Szpyrka filed a petition for post-conviction relief pursuant to Rule 32.1(c), Ariz. R.Crim. P.,[2] arguing his sentence in the present case is now unlawful because "it was enhanced by a prior conviction that ha[d] since been reversed on appeal." The trial court granted relief and ordered a new sentencing, finding the plea agreement "remain[ed] valid with the amended provision that the defendant no longer has a prior conviction for enhancement purposes." At the new sentencing hearing, however, the court granted the state's motion to stay the proceedings to permit the state to challenge its order pursuant to the petition for review we now consider.[3] We have jurisdiction pursuant to A.R.S. § 13-4239(c), and Rule 32.9(c), Ariz. R.Crim. P.
¶ 3 On review, the state argues the trial court erred in granting Szpyrka's petition for post-conviction relief and ordering a new sentencing hearing. We review a trial court's ruling on a petition for post-conviction relief for abuse of discretion. State v. Swoopes, 216 Ariz. 390, ¶ 4, 166 P.3d 945, 948 (App.2007). "But a trial court's erroneous ruling on a question of law ... constitutes an *208 abuse of discretion." Id. There must be a factual basis for a guilty plea, including a factual basis for any prior conviction used to enhance a defendant's punishment. State v. Draper, 123 Ariz. 399, 401, 599 P.2d 852, 854 (App.1979). Therefore, "a criminal defendant who pleads guilty and admits the existence of a prior conviction can, ... [in a petition for post-conviction relief], attack the sufficiency of the evidence used to prove its factual basis." State v. Johnson, 142 Ariz. 223, 224, 689 P.2d 166, 167 (1984) (reversing court of appeals' finding that admission of prior conviction in plea agreement constituted waiver of right to challenge factual basis).
¶ 4 Here, as noted above, Szpyrka entered into a plea agreement that provided his sentence would be enhanced with his conviction in CR-20063298. There was clearly no factual basis for that conviction once it was vacated by this court. The state nevertheless argues "the prior conviction now exists again" because Szpyrka subsequently pled guilty to the charge in CR-20063298. We disagree. To constitute a prior conviction for sentence enhancement purposes, "the conviction on the prior offense must precede the conviction on the present offense." State v. Thompson, 200 Ariz. 439, ¶ 6, 27 P.3d 796, 798 (2001). "One is convicted when there has been a determination of guilt by verdict, finding, or the acceptance of a plea." Id. ¶ 7. But following our reversal of the original conviction, Szpyrka's ultimate conviction on the same charge dates from the entry of his subsequent plea in August 2008. Because Szpyrka's conviction in CR-20063298 no longer precedes his conviction on the present offense, it is not a "prior conviction" pursuant to our supreme court's decision in Thompson. And, we have no authority to overrule a decision of the supreme court. See State v. Ofstedahl, 208 Ariz. 406, ¶ 8, 93 P.3d 1122, 1124 (App.2004).
¶ 5 The state alternatively argues the trial court should have remedied the lack of a factual basis for the prior conviction by vacating the plea agreement. And it contends the court erred in finding Szpyrka was entitled to be resentenced on the present conviction as a nonrepetitive offender. "Plea agreements are contractual in nature and subject to contract interpretation." Coy v. Fields, 200 Ariz. 442, ¶ 9, 27 P.3d 799, 802 (App.2001). Thus, where a plea agreement is materially altered by the nullification of one of its provisions, frustrating the agreement's purpose, rescission of that agreement may be warranted. Id. ¶ 8; see also United States v. Bunner, 134 F.3d 1000 (10th Cir.1998).
¶ 6 In granting Szpyrka's petition for post-conviction relief, the trial court relied primarily on this court's opinion in Coy. There, in accordance with the terms of a plea agreement, the trial court imposed a probationary term far in excess of the term statutorily authorized for the offenses to which the defendant had pled. Coy, 200 Ariz. 442, ¶ 3, 27 P.3d at 800. After sentencing, the defendant filed a motion to modify the probationary term. Id. The state responded by requesting permission to withdraw from the plea agreement and the trial court granted the state's request. Id. The defendant sought special action relief in this court. Applying contract principles, we found that the state, as the party "`in the better position to know the correct law,'" bore the risk of any mistake in the plea agreement. Id. ¶¶ 12-13, quoting State v. Patience, 944 P.2d 381, 388 (Utah App.1997). We also found that nullifying the probation provision would not materially alter the agreement, "which provided only for the possibility of up to lifetime probation" and did not require the imposition of any probationary term. Id. ¶ 10. We therefore concluded there was "no valid ground on which the state was entitled to withdraw from the plea agreement" and directed the trial court to impose an appropriate sentence. Id. ¶ 13.
¶ 7 By contrast, in Draper, the defendant "agreed to plead guilty to shoplifting with an unspecified prior conviction." 123 Ariz. at 401, 599 P.2d at 854. The state had filed an information charging him with shoplifting and alleging a specific prior conviction. Id. However, that conviction was too remote in time to support the enhanced sentence the trial court subsequently imposed. Id. On appeal, another department of this court noted that "[t]he usual disposition where there is no factual basis for a plea is vacation of the plea and remand with reinstatement of *209 charges." Id. Finding "the plea agreement, reasonably construed, contemplate[d] an integrated plea to [b]oth the substantive offense and a valid enhancing conviction," and that the defendant apparently had other prior convictions that appropriately could be used to enhance his sentence, it therefore vacated the plea. Id. Similarly, in State v. Quick, 167 Ariz. 318, 322, 806 P.2d 907, 911 (App.1991), this court vacated a plea where the sentence was enhanced erroneously by a factor for which no evidence had been presented. We found that "[n]o authority exists for this court to modify the sentence so as to deviate from the intent of both the state and the defendant." Id.
¶ 8 The present case is closer to Draper and Quick than to Coy. Here, there was no "mistake as to the law in effect at the time the parties entered into the plea agreement." See Coy, 200 Ariz. 442, ¶ 12, 27 P.3d at 803, quoting Patience, 944 P.2d at 388. The state was therefore in no better position than Szpyrka to know the prior conviction ultimately would be vacated, thereby rendering illegal the enhanced sentence provided for in the plea agreement. See Quick, 167 Ariz. at 322, 806 P.2d at 911 (vacating plea where "both attorneys were alerted to deficiencies" in factual basis for enhancing factor). And the agreement did not merely provide for the possibility of an enhanced sentence, but required that Szpyrka be sentenced to a term within the enhanced range.[4] The enhancement was therefore an integral part of the plea.
¶ 9 As the state contends, "the entire agreement was structured around the existence of the prior conviction." The state agreed to dismiss all but one of the thirteen counts filed against Szpyrka "[b]ecause [he] was willing to admit the prior conviction and be subject to the negotiated sentencing range." See Draper, 123 Ariz. at 401, 599 P.2d at 854 (vacating "integrated plea" where no factual basis for enhancement); see also Ofstedahl, 208 Ariz. 406, ¶ 7, 93 P.3d at 1124 (same). Thus, when this court vacated Szpyrka's prior conviction on appeal, the terms of the plea agreement were altered materially, frustrating its purpose. See Coy, 200 Ariz. 442, ¶ 8, 27 P.3d at 802. The trial court therefore erred in ordering that Szpyrka be resentenced pursuant to a modified plea agreement.
¶ 10 Szpyrka contended in his petition for post-conviction relief, and argues again in his response to the state's petition for review, that "double jeopardy considerations" preclude vacating the plea agreement, notwithstanding any contractual analysis.[5]See Coy, 200 Ariz. 442, ¶ 9, 27 P.3d at 802 (courts "not always obligated to apply a contract analysis to plea agreements because contract law may not provide a sufficient analogy"). However, to the extent the trial court based its ruling on double jeopardy principles, it apparently relied only on dicta in Coy.[6]See id. ¶ 5. And we are not otherwise persuaded that vacating the agreement is precluded on that basis.
¶ 11 The Double Jeopardy Clause "`protects against a second prosecution for *210 the same offense after acquittal. It protects against a second prosecution for the same offense after conviction. And it protects against multiple punishments for the same offense.'" Ohio v. Johnson, 467 U.S. 493, 498, 104 S.Ct. 2536, 81 L.Ed.2d 425 (1984), quoting Brown v. Ohio, 432 U.S. 161, 165, 97 S.Ct. 2221, 53 L.Ed.2d 187 (1977). The only protection relevant here is that against a second prosecution for the same offense after conviction. That protection is intended to shield defendants from acts of "governmental oppression." United States v. Scott, 437 U.S. 82, 91, 98 S.Ct. 2187, 57 L.Ed.2d 65 (1978). And, the protection is specifically intended to "ensure[] that the State does not make repeated attempts to convict an individual, thereby exposing him to continued embarrassment, anxiety, and expense, while increasing the risk of an erroneous conviction or an impermissibly enhanced sentence." Johnson, 467 U.S. at 498-99, 104 S.Ct. 2536.
¶ 12 Here, however, we find no affirmative government action, much less "government oppression." On the contrary, it is Szpyrka who, although not expressly seeking to withdraw from the plea agreement, has caused its validity to be compromised through his appeal of the prior conviction and his petition for post-conviction relief. Unlike cases cited by Szpyrka, see, e.g., Aragon v. Wilkinson, 209 Ariz. 61, ¶ 6, 97 P.3d 886, 889 (App.2004), the state here did not initiate proceedings to vacate the plea agreement, but merely responded to Szpyrka's attempt to have his sentence modified contrary to the terms of the agreement.[7] Viewing the plea agreement as "an integrated plea to [b]oth the substantive offense and a valid enhancing conviction," see Draper, 123 Ariz. at 401, 599 P.2d at 854, we find that under these circumstances vacating the agreement is analogous to permitting the retrial of a defendant who has successfully obtained the reversal of a conviction on appeal and is therefore not precluded by the Double Jeopardy Clause. See State v. Moody, 208 Ariz. 424, ¶ 26, 94 P.3d 1119, 1134 (2004); see also Scott, 437 U.S. at 90-91, 98 S.Ct. 2187 ("venerable principle of double jeopardy jurisprudence" that successful appeal of conviction, other than for insufficiency of evidence, poses no bar to further prosecution on same charge).
¶ 13 For the reasons stated above, we vacate the trial court's order that Szpyrka be resentenced and remand for proceedings consistent with this opinion.
CONCURRING: PETER J. ECKERSTROM, Presiding Judge, and J. WILLIAM BRAMMER, JR., Judge.
NOTES
[1]  Significant portions of the Arizona criminal sentencing code have been renumbered, effective December 31, 2008. See 2008 Ariz. Sess. Laws, ch. 301, §§ 1-120. For ease of reference and because the renumbering included no substantive changes, see id. § 119, we refer in this decision to the current section numbers rather than those in effect when the offenses were committed in this case.
[2]  Although Szpyrka had filed an earlier petition for post-conviction relief, his claim here was not precluded because it was not available until after this court had vacated his prior conviction. See Ariz. R.Crim. P. 32.1(c), 32.2(a).
[3]  The same day, Szpyrka entered a guilty plea to the charge in CR-20063298, which the state had apparently refiled.
[4]  We are not persuaded by Szpyrka's contention that, because the range for a nonrepetitive offense overlaps in part with the range contemplated by the agreement, "the reversal of the prior conviction did not make the negotiated sentence impossible to impose." The trial court imposed the presumptive sentence of 6.5 years for a class three felony with one prior conviction. See A.R.S. § 13-703(B), (I). Although the agreement contemplated, as a minimum, a mitigated sentence of 4.5 years, the presumptive sentence for a nonrepetitive offense would be 3.5 years. See A.R.S. § 13-702(D). And Szpyrka does not argue there is any basis for the trial court to increase his sentence above this presumptive level should we affirm its order granting a new sentencing.
[5]  Szpyrka suggests the state has conceded error on this issue by not addressing it in its petition for review. However, the issue was raised by Szpyrka more in the nature of a specific defense to the state's contract-based argument, and we consider it as part of our review of the trial court's decision. Even assuming the state's failure to address this issue could be construed as such, "we are not bound by the state's confession of error, particularly when applicable legal principles do not support it." Lopez v. Kearney, 222 Ariz. 133, ¶ 10, 213 P.3d 282, 285 (App.2009) (citation omitted).
[6]  We resolved Coy using contract principles and expressly declined to reach the defendant's double jeopardy claim. 200 Ariz. 442, ¶ 13, 27 P.3d at 803.
[7]  For this reason, we are not persuaded by Szpyrka's characterization of the state's petition for review as a cross-appeal requesting the plea be vacated. Rather, we view it as a response to the trial court's ruling granting a new sentencing on modified terms to which the parties never agreed. He cites no authority in support of his claim that we lack jurisdiction to vacate the trial court's ruling and set forth the principles it should follow on remand. See Draper, 123 Ariz. at 401, 599 P.2d at 854.
