OPINION
The State of Arizona appeals from an order denying its motion to withdraw from a plea agreement after the court rejected a stipulation that defendant’s conviction for possession of drug paraphernalia be designated a class 6 felony at sentencing. Because the sentencing judge erred in denying the motion, we remand for further proceedings consistent with this decision.
FACTUAL AND PROCEDURAL BACKGROUND
Appellee David Gene Corno (defendant) was charged by information with one count of possession of narcotic drugs (cocaine), a class 4 felony and one count of possession of drug paraphernalia, a class 6 felony. Defendant agreed to plead guilty to the latter charge. The written agreement stated:
The parties stipulate to the following additional terms: (These stipulations are subject to court approval at the time of sentencing as set forth in paragraph 7.) The offense shall be designated a felony at time of sentencing. Defendant shall be placed on probation and pay $2000 fine to Arizona Drug Enforcement Fund. No other agreements.
(Emphasis added.) The parties also agreed that the cocaine possession charge would be dismissed.
At the change of plea proceeding, the trial judge found the plea was knowingly, voluntarily, and intelligently entered and was supported by a factual basis. He deferred acceptance of the plea until the time of sentencing.
Prior to sentencing, the judge announced his acceptance of the plea and pronounced judgment on the possession of drug paraphernalia charge. However, the judge then stated that, in light of defendant’s drug addiction and lack of a criminal record, he found the parties’ stipulated designation of the offense “unduly harsh.” The judge stated that the matter should remain undesig-nated pending a probationary term. He said that “the parties do not have the discretion to tell the Court whether or not [the offense] should or should not be designated a felony. And I believe that that’s something, as a matter of law, the parties are not free to bargain for.” The state moved to withdraw from the plea. The judge denied the motion. He left the offense undesignated and placed defendant on three years probation.
DISCUSSION
1. Jurisdiction
Defendant challenges this court’s jurisdiction to consider the state’s appeal. He argues that Ariz.Rev.Stat.Ann. (A.R.S.) section 13-4032(6) (1989), which allows the state to appeal from “[a] sentence on the grounds that it is illegal,” does not apply. The state, however, has not sought review of the sentence at all, but rather has challenged the trial judge’s denial of its motion to withdraw from the plea agreement.
1
That ruling is appealable as “[a]n order made after judgment affecting the substantial rights of the state....” A.R.S. § 13-4032(4) (Supp.1993). The state’s motion to withdraw from the plea agreement and the court’s denial of that motion, followed the oral pronouncement of judgment of defendant’s guilt. A “substantial right” is implicated because the state ordinarily may withdraw from a plea agreement when the trial court rejects a sentencing stipulation.
State v. Superior Court in and for County of Maricopa,
2. Stipulation of Felony Designation
The sentencing judge’s determination that the parties could not bargain regarding the designation of a class 6 offense rested upon his interpretation of A.R.S. section 13-702(H) (1989), which states in pertinent part:
Notwithstanding any other provision of this title, if a person is convicted of any class 6 felony not involving the intentional or knowing infliction of serious physical injury or the use of a deadly weapon or dangerous instrument and if the court, having regard to the nature and circumstances of the crime and to the history and character of the defendant, is of the opinion that it would be unduly harsh to sentence the defendant for a felony, the court may enter judgment of conviction for a class 1 misdemeanor and make disposition accordingly or may place the defendant on probation in accordance with chapter 9 of this title and refrain from designating the offense as a felony or misdemeanor.
(Footnote omitted.) The judge stated that the parties were precluded from bargaining about the designation of the class 6 offense because the authority of the court regarding designation was “procedural” rather than “substantive.” He indicated that the distinction was crucial:
I believe that it’s not a substantive provision subject to the bargaining powers of the State. The State makes the decision whether or not to charge a particular offense and can allow a plea to a lesser-included offense. But a class six felony is a class six felony.
It’s up to the discretion of the Court in weighing the character and background of the defendant. And I believe because of the fact that the courts have held it is not a penal statute but is a procedural statute, I believe that procedural [sic] is something that cannot be bargained for____
On appeal, defendant acknowledges Rule 17.4(a), which provides that “the parties may negotiate concerning, and reach an agreement on, any aspect of the disposition of the case.” He does not dispute that, as a general proposition, the state may withdraw from a plea agreement when the judge indicates an intention to deviate from a sentencing stipulation.
State v. Superior Court,
125
The phrase “[notwithstanding any other provision of this title” does not preclude bargaining regarding the designation of a class 6 felony. Such an interpretation would be at odds with the immediately following statutory language in A.R.S. section 13-702(H), which states: “if a person is convicted of any class 6 felony____” That language makes it clear that the paragraph applies to the trial court’s exercise of sentencing authority—which necessarily follows a “conviction”—not to the negotiation of a plea agreement, which necessarily precedes it.
Thus, “notwithstanding” more general sentencing provisions, the paragraph at issue expands the sentencing options otherwise available for a class 6 felony without limiting the scope of negotiable terms available to the parties. The fact that the paragraph gives the judge broadened sentencing discretion has no effect on the rules applicable to plea bargaining. Rule 17.4(d) prohibits the parties from precluding the exercise of that discretion by agreement, stating: “The court shall not be bound by any provision in the plea agreement regarding the sentence or the term and conditions of probation to be imposed, if, after accepting the agreement and reviewing a presentence report, it rejects the provision as inappropriate.” However, the trial judge may not exercise that discretion by imposing a sentence at variance with the plea agreement unless the State agrees.
Oatley,
The premise of the trial court in this ease—that the designation of an offense is not subject to the agreement of the parties— was implicitly rejected by our supreme court in
State v. Diaz,
The plea agreement contains no language that limits the trial court’s ability to designate the offense a felony. Although plea agreements may, and sometimes do, stipulate that the offense will remain un-designated at the time of original sentencing or that the defendant will be placed on probation (subject, of course, to court approval), this one did not. The dialogue between the commissioner and defendant at the change of plea hearing clearly establishes that the plea agreement was not intended to and did not take away any of the trial court’s options at the time of sentencing.
Id.
at 273,
This court has recognized that the language of Rule 17.4 is “broad.”
Rutherford,
CONCLUSION
As we have noted, the trial court is not bound by any sentencing provision in a plea agreement it finds inappropriate. Rule 17.4(d);
Oatley,
Notes
. The notice of appeal states: “The State of Arizona ... hereby gives'notice that it appeals from the trial court’s order of December 2, 1991, denying the State's motion to withdraw from the plea agreement."
