
179 Ariz. 151 (1994)
876 P.2d 1186
STATE of Arizona, Appellant,
v.
David Gene CORNO, Appellee.
No. 1 CA-CR 91-1863.
Court of Appeals of Arizona, Division 1, Department A.
June 28, 1994.
*152 Richard M. Romley, Maricopa County Atty. by Gerald R. Grant, Deputy County Atty., Phoenix, for appellant.
Killian, Nicholas, Fischer, Wirken, Cook & Pew, P.L.C. by Charles W. Wirken, Mesa, for appellee.
OPINION
VOSS, Judge.
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 undesignated 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.
*153 The state filed a timely notice of appeal and now contends that the trial court erred in denying its motion to withdraw from the plea agreement.
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, 125 Ariz. 575, 578, 611 P.2d 928, 931 (1980); State v. Oatley, 174 Ariz. 124, 125, 847 P.2d 625, 626 (App. 1993); cf. Rule 17.4(e), Arizona Rules of Criminal Procedure (Rule(s)) (providing that defendant has right to withdraw from plea agreement if court rejects it). See also State v. Rutherford, 154 Ariz. 486, 487, 744 P.2d 13, 14 (App. 1987) (noting jurisdiction under A.R.S. section 13-4032(5) over state's appeal from trial court order modifying probationary term in contravention of plea agreement). Thus, we have jurisdiction over this appeal.
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 *154 Ariz. at 578, 611 P.2d at 931. However, he argues that matters of procedure are subject to A.R.S. section 13-102(A) (1989), which states: "Except as otherwise provided by law, the procedure governing the accusation, prosecution, conviction and punishment of offenders and offenses is not regulated by this title but by the rules of criminal procedure." (Emphasis added.) He contends that such a limitation on the criminal rules is found in the initial language of A.R.S. section 13-702(H), which states: "Notwithstanding any other provision of this title...." The effect of this introductory passage, defendant argues, is to override A.R.S. section 13-102(A) and preclude the application of the criminal rules, including Rule 17.4, to the designation of class 6 felony offenses. As a result, he contends that the parties were not free to stipulate that the offense be designated as a felony. We disagree.
The phrase "[n]otwithstanding 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, 174 Ariz. at 125, 847 P.2d at 626.
The premise of the trial court in this case  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, 173 Ariz. 270, 842 P.2d 617 (1992). In that case, the supreme court considered whether a defendant should be permitted to withdraw from a plea to a class 6 "open," offense when the sentencing judge announced his intention to designate the offense as a felony. The supreme court held that the fact the plea was to an "open" offense did not preclude the trial court from making a felony designation. The court stated:

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 undesignated 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, 842 P.2d at 620 (emphasis added). The supreme court's recognition that parties may agree to the deferral of designation of a class 6 offense necessarily implies that the parties may otherwise bargain with regard to that determination. In this respect, the agreement in this case was no different than the one at issue in Diaz.
This court has recognized that the language of Rule 17.4 is "broad." Rutherford, 154 Ariz. at 488, 744 P.2d at 15; see also Rule 17.4(a), Comment ("Plea bargaining and plea agreements may cover any and all aspects of the disposition of the case."). No case has stated that the parties are limited to bargaining only "substantive" matters, as the sentencing judge ruled in this case. The *155 sentencing judge relied on State v. Winton, 153 Ariz. 302, 736 P.2d 386 (App. 1987). Winton considered whether the language permitting deferral of designation of class 6 offenses, which was added to the statute by a 1984 amendment, could be applied to a defendant whose crime occurred prior to that amendment. This court held that the authority of the trial court to defer designation was "procedural" and, as a result, did not impermissibly alter the penalty for the class 6 offense. Id. at 305, 736 P.2d at 389. Winton did not address the issue in this case: whether the authority of the trial court regarding designation of class 6 offenses could be limited by agreement of the parties.
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, 174 Ariz. at 125, 847 P.2d at 626. While the trial judge indicated that he found the stipulated felony designation unduly harsh, he also stated that, if that term were legally enforceable, he would impose sentence in accordance with the parties' agreement. The appropriate remedy is a remand to permit the trial court to accept or reject the sentencing stipulation. If the judge accepts the stipulation, he must designate the offense as a felony. If the judge rejects the stipulation, the State and defendant must be permitted to withdraw from the plea agreement.
GRANT, P.J., and EHRLICH, J., concur.
NOTES
[1]  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."
