(dissenting).
I respectfully dissent. I disagree with the majority’s conclusion that this court cannot consider respondent State of Minnesota’s appeal in this case. In my view, jeopardy did not attach when the district court accepted appellant Victor Martinez-Mendoza’s guilty plea to second-degree criminal sexual conduct because there was a material defect with the plea, based on the parties’ and the district court’s mutual mistake regarding the presumptive sentence Martinez-Mendoza would receive for the offense to which he pleaded guilty. Because of this material defect with the plea, jeopardy also did not attach from any conviction that may have resulted when the district court recorded this guilty plea. Once the district court learned of this mutual mistake, it had the authority, pursuant to Minn. R.Crim. P. 15.04, to withdraw its acceptance of Martinez-Mendoza’s guilty plea.
I.
As a threshold matter, we must decide whether the State’s pretrial appeal of the district court’s denial of its motion to withdraw from the plea agreement should be heard. In Minnesota, pretrial appeals by the State are permitted, but with restrictions. State v. Barrett, 694 N.W.2d 783, 787 & n. 3 (Minn.2005). Our rule allows the prosecutor to “appeal as of right ... in any case, from any pretrial order.” Minn. R.Crim. P. 28.04, subd. 1(1). The State’s right to appeal is limited by Minn. R.Crim. P. 28.04, subd. 2(8), which states that “[n]o appeal of a pretrial order by the prosecutor can be taken after jeopardy has attached.”
At the plea hearing on September 30, 2009, the district court accepted Martinez-Mendoza’s guilty plea to count II, which charged him with second-degree criminal sexual conduct, on the terms of the parties’ plea agreement. The plea agreement called for Martinez-Mendoza to receive a sentence of “middle of the box or 90 months commit to prison” on count II, and for count I, which charged Martinez-Mendoza with first-degree criminal sexual conduct, to be dismissed at sentencing. The assumptions underlying the plea agree*10ment were that: count II had a severity level of Level B under the Sentencing Guidelines; a 90-month sentence was the applicable presumptive fixed sentence for count II; and that a 90-month sentence for count II was a legal sentence the district court could impose on Martinez-Mendoza. See Minn. Sent. Guidelines II.D. and cmt. II.D.01 (stating that presumptive sentence must be imposed unless aggravating or mitigating factors are present).
After Martinez-Mendoza pleaded guilty, the prosecutor learned that the severity level for count II was actually Level D and that the applicable presumptive sentence was a 36-month, stayed sentence, and not 90 months, executed. The State then made a motion to withdraw from the plea agreement or, in the alternative, to allow the State to continue to prosecute Martinez-Mendoza for first-degree criminal sexual conduct. At a hearing on November 24, 2009, the State expressly asked the district court not to sentence Martinez-Mendoza and to stay the proceedings if the court denied the State’s motion to withdraw from the plea agreement so that the State could pursue a pretrial appeal. The State made its oral request for a stay prior to the district court dismissing count I and prior to the district court sentencing Martinez-Mendoza on count II.
The district court refused to grant this stay. Instead, it denied the State’s motion to withdraw from the plea agreement, dismissed count I, and sentenced Martinez-Mendoza to a 36-month, stayed sentence at the November 24 hearing. The district court indicated that the State’s ability to appeal its ruling on the State’s motion to withdraw from the plea agreement would not be affected by the imposition of sentence.
The district court did not have the authority to deny the State’s request for a stay. Instead, “[u]pon oral notice that the prosecutor intends to appeal a pretrial order, the district court must stay the proceedings for 5 days to allow time to perfect the appeal.” Minn. R.Crim. P. 28.04, subd. 2(1) (emphasis added). We used the mandatory language of “must” in our rule. See Minn.Stat. § 645.44, subd. 15a (2010). The court therefore was required, under our rule, to grant the State’s motion for a stay.
I would hold that the district court’s failure to comply with the mandatory-stay provision of Rule 28.04 does not deprive the State of its right to file a pretrial appeal, especially when the State complied with its obligations under the rule and requested the stay. And the issue on appeal should be whether jeopardy had attached when the district court denied the State’s motion to withdraw from the plea agreement. At that point in time, the district court had accepted Martinez-Mendoza’s guilty plea to count II, but the district court had not sentenced Martinez-Mendoza, nor had it dismissed count I. The question, then, is whether jeopardy attached when the district court accepted Martinez-Mendoza’s guilty plea to second-degree criminal sexual conduct but prior to sentencing him on that offense and prior to dismissing the remaining charges against him. I turn to that question next.
II.
Neither the Supreme Court nor our court has expressly decided when jeopardy attaches in a criminal proceeding when there is no trial and the defendant pleads guilty. See Ricketts v. Adamson, 483 U.S. 1, 8, 107 S.Ct. 2680, 97 L.Ed.2d 1 (1987) (stating that the Court “may assume that jeopardy attached at least when respondent was sentenced ... on his plea of guilty”). But the Supreme Court has spoken on what factors should be considered *11in determining whether jeopardy has attached.
In Crist v. Bretz, the Supreme Court held that the federal rule that jeopardy attaches in a jury trial when the jury is empaneled and sworn is an integral part of the Fifth Amendment guarantee against double jeopardy and is applicable to the states. 437 U.S. 28, 38, 98 S.Ct. 2156, 57 L.Ed.2d 24 (1978). The Court explained that “[t]he basic reason for holding that a defendant is put in jeopardy” before a verdict is rendered, id. at 35, 98 S.Ct. 2156, is to protect against certain concerns, namely “the finality of judgments, the minimization of harassing exposure to the harrowing experience of a criminal trial, and the valued right to continue with the chosen jury,” id. at 38, 98 S.Ct. 2156. Protection against these concerns is based on the
underlying idea ... that the State with all its resources and power should not be allowed to make repeated attempts to convict an individual for an alleged offense, thereby subjecting him to embarrassment, expense and ordeal and compelling him to live in a continuing state of anxiety and insecurity, as well as enhancing the possibility that even though innocent he may be found guilty.
Id. at 35, 98 S.Ct. 2156 (quoting Green v. United States, 355 U.S. 184, 187-88, 78 S.Ct. 221, 2 L.Ed.2d 199 (1957)). The Court concluded that “[tjhose concerns ... have combined to produce the federal law that in a jury trial jeopardy attaches when the jury is empaneled and sworn.” Id. at 38, 98 S.Ct. 2156.
The Supreme Court has also indicated that when a defendant pleads guilty, the Double Jeopardy Clause’s concerns regarding finality and government overreaching are not always at issue. In Ohio v. Johnson, the Supreme Court ruled that if the defendant pleaded guilty only to the lesser-included offenses he was charged with, over the State’s objection, it did not violate double jeopardy to allow the State to continue its prosecution of the greater offenses. 467 U.S. 493, 501-02, 104 S.Ct. 2536, 81 L.Ed.2d 425 (1984). The Court concluded that “[n]o interest of [the defendant] protected by the Double Jeopardy Clause is implicated by continuing prosecution on the remaining charges brought in the indictment.” Id. at 501, 104 S.Ct. 2536. In such a circumstance, “[t]here simply has been none of the governmental overreaching that double jeopardy is supposed to prevent.” Id. at 502, 104 S.Ct. 2536. Moreover, the defendant had “not been exposed to conviction on the charges to which he pleaded not guilty,” and the “acceptance of a guilty plea to lesser included offenses while charges on the greater offenses remain pending ... has none of the implications of an ‘implied acquittal’ which results from a verdict convicting a defendant on lesser included offenses rendered by a jury charged to consider both greater and lesser included offenses.” Id.
Several courts have concluded that jeopardy does not automatically attach when a district court accepts a guilty plea but before the court sentences the defendant. United States v. Santiago Soto, 825 F.2d 616, 618 (1st Cir.1987) (noting that when there is no trial, the First Circuit had held that jeopardy attaches upon acceptance of a guilty plea but “not irrevocably nor automatically”); State v. Angel, 132 N.M. 501, 51 P.3d 1155, 1157 (2002) (“We do not believe jeopardy attached to Defendant’s plea prior to being sentenced on the misdemeanor charges.”); State v. Duval, 156 Vt. 122, 589 A.2d 321, 324 (1991) (“The attachment of jeopardy upon the court’s acceptance of a guilty plea is neither automatic nor irrevocable.”).
The First Circuit held that jeopardy did not attach when a district court accepted a guilty plea but then sua sponte vacated the *12plea prior to sentencing because of concerns about the factual basis for the plea. Santiago Soto, 825 F.2d at 620 (holding that the Double Jeopardy Clause did not prohibit the State from prosecuting the defendant for felony theft of mail after he was charged with misdemeanor theft of mail, pleaded guilty to that offense, and the district court vacated his plea and dismissed the misdemeanor charges before sentencing). Similarly, the Third Circuit held that the Double Jeopardy Clause did not bar the district court, which had accepted the defendant’s guilty plea to manslaughter, from sua sponte striking his guilty plea at a later hearing out of concerns about the factual basis for the plea and then ordering the defendant to stand trial for murder. Gilmore v. Zimmerman, 793 F.2d 564, 569-70 (3d Cir.1986).
Several courts have also held that jeopardy does not attach when a district court accepts a guilty plea based upon inaccurate information and the district court then vacates the guilty plea or withdraws its acceptance of the guilty plea after learning of the inaccurate information. The New Mexico Supreme Court held that jeopardy did not attach when the defendant’s no-contest plea to misdemeanor DWI was accepted but then dismissed pri- or to sentencing after the magistrate judge learned that the offense should have been charged as felony DWI because of the defendant’s prior record. Angel, 51 P.3d at 1157. The Vermont Supreme Court ruled that jeopardy did not attach when a district court accepted a guilty plea to DWI based on an agreed-to sentence that would not involve any jail time when the defendant had misinformed the court about his prior convictions. Duval, 589 A.2d at 324-25. Finally, the Tennessee Court of Criminal Appeals ruled that jeopardy did not attach when a district court accepted a guilty plea based upon a misunderstanding of the terms of a plea agreement and the district court later withdrew its acceptance of the guilty plea when it learned of this misunderstanding. State v. Burris, 40 S.W.3d 520, 526-27 (Tenn.Crim. App.2000).
These courts concluded that jeopardy had not attached when the district court accepted the defendants’ guilty pleas because the facts of those cases demonstrated that the concerns the Double Jeopardy Clause was intended to protect against were not implicated. They explained that when the defendant pleaded guilty prior to being sentenced, concerns about finality were not at issue. Santiago Soto, 825 F.2d at 619-20; Angel, 51 P.3d at 1159; Burris, 40 S.W.3d at 525. They further concluded that when the district court either sua sponte vacates a guilty plea or withdraws its acceptance of the guilty plea after learning of an inherent problem with the plea, concerns about government overreaching and subjecting a defendant to multiple trials are not at issue. Gilmore, 793 F.2d at 569-70; Angel, 51 P.3d at 1159; Burris, 40 S.W.3d at 525. The reasoning of these cases is consistent with the Supreme Court’s decisions in Crist and Johnson, and I would adopt it.
These cases also support the conclusion that “jeopardy will not attach upon acceptance of a guilty plea if the plea itself suffers from a material defect.” 6 Wayne R. LaFave et al., Criminal Procedure § 25.1(d) (3d ed.2007). When a guilty plea suffers from a material defect and the district court then takes action to remedy that defect, by sua sponte vacating the defendant’s guilty plea or withdrawing its acceptance of the guilty plea, jeopardy does not attach to the acceptance of the guilty plea because the concerns the Double Jeopardy Clause protects against are not threatened.1
*13Applying that reasoning and analysis to the facts of this case, I conclude that jeopardy did not attach when the district court accepted Martinez-Mendoza’s guilty plea because there was a material defect with respect to the guilty plea. The material defect with respect to Martinez-Mendoza’s guilty plea was the underlying, flawed presumption that Martinez-Mendoza could receive a 90-month sentence by pleading guilty to count II. Both parties relied on this mutual mistake about the resulting sentence when they entered into the plea agreement, and the district court’s consideration and acceptance of Martinez-Mendoza’s guilty plea to only count II was based on this inaccurate belief as well. See State v. Robledo-Kinney, 615 N.W.2d 25, 32 (Minn.2000) (holding that the State could withdraw from plea agreement that was entered into based on mutual mistake about the defendant’s participation in the underlying crime after the State learned of this mistake).
In this situation, the concerns the Double Jeopardy Clause protects against — the finality of judgments, the minimization of harassing exposure to the harrowing experience of a criminal trial, and the valued right to continue with the chosen jury— are not at issue. The constitutional policy of finality is not threatened by a district court’s acceptance of a guilty plea to only a lesser charge because there is not the same expectation of finality that comes with a jury’s verdict, and no criminal judgment has been entered on the charge to which Martinez-Mendoza pleaded not guilty. See Johnson, 467 U.S. at 502, 104 S.Ct. 2536 (explaining that defendant was not subject to conviction on charges to which he did not plead guilty and that there was not an implied acquittal on greater charges when defendant pled guilty to lesser charges). There also was no government overreaching because Martinez-Mendoza did not experience the expense, strain, and embarrassment of a trial. In fact, Martinez-Mendoza has not been subject to one trial, let alone multiple trials. See Crist, 437 U.S. at 38, 98 S.Ct. 2156. And since no trial has occurred, the valued right to continue with a chosen jury is not threatened. Id. Consequently, I conclude that jeopardy did not attach when the district court accepted Martinez-Mendoza’s guilty plea to second-degree criminal sexual conduct.2
*14III.
Because I believe the court can consider the State’s appeal, the final question that must be addressed is whether the district court had the authority to grant the State’s motion to withdraw from the plea agreement. I would hold that the court had the authority to and should have withdrawn its acceptance of Martinez-Mendoza’s guilty plea.
We have recognized that “there is no constitutional right to specific performance of a plea agreement.” State v. Garcia, 582 N.W.2d 879, 882 (Minn.1998). Moreover, “[n]either the constitution nor our Rules of Criminal Procedure give to a criminal defendant an absolute right to have his plea of guilty accepted.” State v. Goulette, 258 N.W.2d 758, 762 (Minn.1977). And a defendant does not have the right to plead guilty to less than all of the charges brought against him. State v. Linehan, 276 Minn. 349, 353, 150 N.W.2d 203, 207 (1967); Minn. R.Crim. P. 15.07.
A district court “must reject or accept the plea of guilty on the terms of the plea agreement.” Minn. R.Crim. P. 15.04, subd. 3(1). The district court has broad discretion whether to accept a plea agreement. The court “may accept a plea agreement of the parties when the interest of justice would be served.” Id., subd. 3(2). The authority given the district court to determine whether a plea agreement promotes the interests of justice continues even after the district court has told the parties that it has accepted the plea agreement. If the district court learns of something after initially accepting a plea agreement, but prior to sentencing, that causes the court to believe that the interests of justice are not served by the plea agreement, the court has the discretion to withdraw its acceptance of the plea agreement. Cf. Robledo-Kinney, 615 N.W.2d at 32 (holding that State could withdraw from plea agreement that was entered into based on mutual mistake about the defendant’s participation in the underlying crime after the State learned of this mistake).
The record in this case compels the conclusion that the district court’s continued acceptance of Martinez-Mendoza’s guilty plea was not in the interests of justice. Neither party nor the district court verified what severity level count II had under the guidelines. The parties affirmatively represented to the court that the presumptive sentence for count II was 90 months in prison. The parties’ plea agreement was based on the mistaken belief that count II was a severity level B offense, when it was actually a severity level D offense, and that a 90-month prison sen*15tence was a legal sentence for this offense. The court initially accepted the plea agreement based on this mistaken belief. The court stated it would not have accepted the guilty plea, which provided for the dismissal of a first-degree criminal-sexual-conduct charge and its corresponding presumptive sentence of at least 144 months in prison, if it had known that the presumptive sentence for count II was a 36-month, stayed sentence.
In addition, there does not appear to be any government overreaching in this case. While the State’s mistaken belief about the severity level of the offense it charged Martinez-Mendoza with in count II is inexcusable, the record establishes that the State made a genuine mistake in this case. Several types of second-degree criminal sexual conduct are level B offenses under the guidelines. While the complaint charged Martinez-Mendoza with a type of criminal sexual conduct that was a level D offense, the facts alleged in the complaint and the conduct Martinez-Mendoza admitted to at the plea hearing established a violation of Minn.Stat. § 609.342, subd. 1(h) (2010), which is a type of second-degree criminal sexual conduct that is a severity level B offense. The State, which had originally charged first-degree criminal sexual conduct in count I, was not attempting to subject Martinez-Mendoza to a more serious charge only after he pleaded guilty, nor was it attempting to subject Martinez-Mendoza to multiple trials for the same offense.
Finally, our recognition of the interrelationship in a plea agreement between a guilty plea to a lesser charge and the resulting sentence supports the conclusion that the district court should have granted the State’s motion. See State v. Lewis, 656 N.W.2d 535 (Minn.2003). In Lewis, the parties agreed the defendant would plead guilty to a reduced charge but his resulting sentence would include an upward departure that was based only on the terms of the plea agreement. 656 N.W.2d at 536. After the defendant pleaded guilty and was sentenced pursuant to the terms of the plea agreement, we ruled that an upward departure could not be based only on the terms of a plea agreement, and the defendant challenged his sentence on appeal. Id. We questioned whether the defendant should be able to retain the benefit of a reduced charge if he obtained a reduction of the sentence component of the same plea agreement. Id. at 538-39. We held that on remand, the district court “should be free to consider the effect that changes in the sentence have on the entire plea agreement.” Id. at 539.
Lewis provides a district court with the authority to consider vacating a plea agreement that involved a reduced charge if an appellate court determines the agreed-to sentence in the plea agreement was illegal. The rationale behind Lewis applies with equal force if a court learns it unknowingly accepted a plea agreement in which the defendant received the benefit of a reduced charge but also agreed to a sentence that is too high and cannot be legally imposed. In this situation, a court should be able to consider the effect that changes in the sentence have on the entire plea agreement and withdraw its acceptance of the plea agreement.
I would hold that the district court erred in denying the State’s motion to withdraw the plea agreement. When the court learned that it had accepted Martinez-Mendoza’s guilty plea based on a fundamental misunderstanding about the legal sentence that could be imposed for the offense to which he pleaded guilty, the interests of justice dictate that the court reject the plea agreement.
. The majority does not address whether jeopardy attaches when a district court accepts a guilty plea. Instead, it concludes that jeopardy attached when the district court accepted and recorded Martinez-Mendoza’s guilty plea because this resulted in a conviction under Minnesota law. Minnesota law does define a conviction as the acceptance and recording of a guilty plea by the district court. Minn.Stat. § 609.02, subd. 5 (2010). But "[t]he exaltation of form over substance is to be avoided. ... [I]n the double jeopardy context it is the substance of the action that is controlling, and not the label given that action.” United States v. DiFrancesco, 449 U.S. 117, 142, 101 S.Ct. 426, 66 L.Ed.2d 328 (1980). The majority is putting form over substance by concluding that jeopardy attached when the district court accepted and recorded Martinez-Mendoza's guilty plea. Because there was a material defect with Martinez-Mendoza’s plea, jeopardy did not attach even if the district court technically accepted and recorded its flawed acceptance of Martinez-Mendoza’s guilty plea.
. The majority concludes that granting the State’s motion to withdraw from the plea agreement "would allow Martinez-Mendoza to be twice placed in jeopardy in violation of the Double Jeopardy Clause.” Relying on State v. Large, 607 N.W.2d 774, 779-80 (Minn.2000), the majority explains that when a district court’s dismissal of a criminal complaint amounts to a judgment of acquittal on the merits, the State cannot appeal the dismissal because the Double Jeopardy Clause would bar retrial of the defendant. The majority concludes that "it would be anomalous to treat a conviction on the merits differently *14than an acquittal on the merits.” While I believe jeopardy has not yet attached in this case, I also believe this conclusion is flawed for three reasons. First, the Double Jeopardy Clause does not bar all appeals by the State after an acquittal. For example, the State can appeal from a judgment of acquittal that the district court enters after the jury returns a guilty verdict. Minn. R.Crim. P. 28.04, subd. 1(5). Second, for purposes of the Double Jeopardy Clause, the effect of a conviction versus an acquittal is different. See DiFrancesco, 449 U.S. at 129-30, 101 S.Ct. 426 (stating that under double jeopardy law "[a]n acquittal is accorded special weight” and explaining how a conviction is treated differently than an acquittal under the Double Jeopardy Clause). Third, the Double Jeopardy Clause does not preclude an appellate court from considering the government's appeal when a defendant has been convicted, over the government’s objection, of only some of the charges brought against him or her. See Johnson, 467 U.S. at 501-02, 104 S.Ct. 2536 (considering appeal brought by the government and ruling that if a defendant pleads guilty to some of the charges against him or her, over the State’s objection, it does not violate double jeopardy to allow the State to continue to prosecute the defendant on the remaining charges).