Paul Gronnert pleaded guilty to possession of ephedrine with intent to manufacture. He faced a standard range of 21 to 27 months. To obtain release from jail between his plea hearing and sentencing, Gronnert agreed to accept an exceptional sentence of 60 months if he violated the conditions of release. Soon after release, he violated the conditions and was later sentenced to 60 months. He *218appeals his sentence on several grounds, including a claim that the sentence is not consistent with the purposes of the Sentencing Reform Act of 1981 (SRA).1 We agree and remand for sentencing within the standard sentencing range.
I
The police captured Paul Gronnert inside a camper soon after the owner had called to complain someone had broken into his camper. The camper contained items necessary to manufacture methamphetamine. Gronnert was charged with manufacture of methamphetamine and residential burglary.
Gronnert entered a plea agreement to reduce the charge to possession of ephedrine with intent to manufacture. The plea agreement also included an agreement to release Gronnert temporarily with the stipulation that if he failed to “return from the [temporary release] or should he test positive for any controlled substance that he will agree to a 60 month exceptional sentence . .. .” Gronnert agreed to the stipulation in writing and orally at the plea hearing. The trial court questioned the wisdom of Gronnert’s entering into the stipulation but accepted the plea agreement. The court did not consider whether the plea was consistent with the interests of justice.
Gronnert was released and in less than a week he was arrested for possession of drug paraphernalia. He tested positive for methamphetamine in violation of his conditions of release.
At his sentencing, Gronnert did not challenge the plea agreement. To the contrary, through his attorney, he agreed with the stipulation to the exceptional sentence. He signed the sentencing order that stated, “Substantial and compelling reasons exist which justify an exceptional sentence .. . .” But he did request a drug offender sentencing alternative (DOSA).
*219The sentencing court did not grant the DOSA, stating that, “I do not at this point in time impose drug offender sentencing alternatives.” The court also commented that the DOSA program was a “scam” and a “sham” that was not an effective way to deal with drug offender behavior. The court told Gronnert, “I’m not imposing [the DOSA] in your case.”
At no point during the plea hearing or the sentencing did the trial court consider whether the sentence was consistent with the purposes of the SRA, nor did the trial court’s findings of fact and conclusions of law for an exceptional sentence mention the purposes of the SRA.
II
Gronnert argues that the trial court lacked authority to impose the exceptional sentence because the sentence is inconsistent with the purposes of the SRA. A defendant cannot agree to a sentence “in excess of that which the Legislature has established.”2 But the SRA “governs plea agreements in Washington”3 and “specifically authorizes agreements which recommend sentences outside the standard sentencing range.”4
A sentencing judge is not bound to accept an exceptional sentence recommended in a plea agreement.5 Our Supreme Court, in In re Personal Restraint of Breedlove,6 held that a trial court first must complete two stages of analysis.
*220First, the court must approve the plea agreement. Before approving the plea agreement, the court must find that the defendant is entering the plea agreement “intelligently, voluntarily and with an understanding of the consequences.”7 The court must also find the plea agreement is “consistent with the interests of justice and in conformance with this state’s prosecuting standards.”8
Second, the court must find that the plea agreement itself is a substantial and compelling reason to justify an exceptional sentence.9 In Breedlove, the court noted that “substantial and compelling reason” was not defined in the statutes.10 The court then considered whether the plea agreement was a substantial and compelling reason by analyzing whether the purposes of the SRA were “served by accepting the agreement as a substantial and compelling reason for imposing an exceptional sentence.”11 Thus, to determine if a plea agreement is a justifiable reason for imposing an exceptional sentence, the court must analyze whether the purposes of the SRA are served by sentencing in accordance with the agreement.
The SRA has the following purposes:
The purpose of this chapter is to make the criminal justice system accountable to the public by developing a system for the sentencing of felony offenders which structures, but does not eliminate, discretionary decisions affecting sentences, and to:
(1) Ensure that the punishment for a criminal offense is proportionate to the seriousness of the offense and the offender’s criminal history;
(2) Promote respect for the law by providing punishment which is just;
(3) Be commensurate with the punishment imposed on others committing similar offenses;
*221(4) Protect the public;
(5) Offer the offender an opportunity to improve him or herself;
(6) Make frugal use of the state’s and local governments’ resources; and
(7) Reduce the risk of reoffending by offenders in the community.[12]
Gronnert argues that the court did not perforin the second step of the analysis and thus failed to find that the sentence was consistent with the purposes of the SRA. Gronnert further argues that the sentence is inconsistent with the purposes of the SRA because it is not proportionate, does not promote respect for the law, is not commensurate with the punishment of others, does not protect the public, and does not make frugal use of state resources. Because Gronnert is challenging the reasons justifying the exceptional sentence, we apply a de novo review.13
In Breedlove, the Supreme Court concluded that “a stipulation to an exceptional sentence, made as part of a valid plea agreement, may be a substantial and compelling reason that justifies the imposition of a sentence outside the standard range.”14 The Supreme Court also concluded that “where the parties agree that an exceptional sentence is justified, the purposes of the SRA are generally served by accepting the agreement as a substantial and compelling reason for imposing an exceptional sentence.”15 We interpret the Supreme Court’s choice of permissive language in Breedlove, i.e., “may” and “generally,” to indicate that a plea agreement may not be a substantial and compelling reason, where the purposes of the SRA are not served by sentencing in accordance with the agreement.
*222Recently, in State v. Gaines,16 we noted that “[s]entencing as a matter of individual contract between the State and a particular defendant inevitably leads to disparity in sentencing from county to county,. . . court to court. . ., and . . . case to case . . . .”17 Because of this disparity, sentencing by contract “appears incompatible with a statutory sentencing scheme designed to ensure that punishment in a particular case is ‘commensurate with the punishment imposed on others committing similar offenses.’ ”18
In Gaines, we questioned whether a sentence below the standard range could be imposed “merely because the parties agree that a lesser sentence will be an appropriate punishment.”19 We further questioned whether the SRA “permits a prosecutor to create disparity in sentencing [by contracting with the defendant for a sentence below the standard range] when the Act has been consistently, and appropriately, construed as denying the trial courts the authority to do so.”20 But although we questioned some of the language in Breedlove and its progeny, we decided Gaines on other grounds.21
While the facts in Gaines caused us to question whether prosecutors have the power to create disparity in sentencing, the facts in this case raise a darker possibility within the shadow of Breedlove. A drug-addicted defendant may well promise anything to gain a temporary release. This case demonstrates the folly of accepting such an arrangement without adequately considering whether the agreement is one which properly furthers the interests of the criminal justice system.
*223Nevertheless, similar to our decision in Gaines, we need not squarely challenge the broader concept of contract sentencing in order to decide Gronnert’s appeal, despite our continued concerns. Instead, we conclude that Gronnert’s sentence is factually distinguishable from the sentences of defendants such as Breedlove.
In cases like Breedlove’s, the defendant enters a plea agreement reducing the charges and accepts a recommendation for a sentence above the standard range in exchange for the lower charge.22 In addition to avoiding the risk of conviction under the higher charge, the defendant also avoids “the possibility that a . . . conviction would result in a ‘most serious offense’ classification for purposes of the ‘three strikes law.’ ”23
But Gronnert was not faced with the possibility of a strike under the persistent offender statute.24 This point is worth mentioning because we must consider the context of the plea bargain when considering whether the sentence is consistent with the purposes of the SRA. A defendant that is avoiding a strike is receiving a substantially greater benefit than a defendant such as Gronnert.
The benefit of Gronnert’s bargain was to reduce his charge, with an accompanying reduction in standard range for the sentence, and to secure a temporary release. The State argues that Gronnert got what he bargained for, that he understood the conditions of release and the penalty to which he agreed. But the difference between Breedlove and Gronnert is that the exceptional sentence Breedlove received was related to the crime he committed.25
When Gronnert pleaded guilty to possession of ephedrine with the intent to manufacture, he faced a standard range *224sentence of 21 to 27 months. When he violated conditions of a release order, he potentially faced a bail jumping charge, which for a defendant with an offender score of 1 means a standard range of one to three months.26 Thus, even if Gronnert were sentenced for each of these charges consecutively, he would face only 22 to 30 months instead of the 60 months to which he was sentenced.
In State v. Pennington,27 our Supreme Court ruled that “[a]n exceptional sentence is appropriate only when the circumstances of the crime distinguish it from other crimes of the same statutory category.”28 Whether or not the circumstances under which Gronnert committed possession of ephedrine might have distinguished his crime from others of the same statutory category, the sequence of events make it clear that the trial court did not base its decision to sentence Gronnert outside the standard range because of the circumstances related to his underlying crime. Instead, the catalyst for the trial court’s decision was Gronnert’s violation of conditions of release.
Moreover, looking at the purposes of the SRA, a 60-month sentence cannot be justified as proportionate for a defendant with an offender score of zero who is guilty of possession of ephedrine with intent to manufacture methamphetamine and a violation of a release order. Nor is a 60-month sentence commensurate with the punishment imposed on others committing similar offenses.
The State argues that Gronnert invited error by agreeing to the exceptional sentence. But in State v. Phelps,29 the court noted that “ ‘a defendant cannot empower a sentencing court to exceed its statutory authoriza*225tion.’ ”30 The court further noted that to the extent a defendant “can show the sentencing court exceeded its statutory authority, the invited error doctrine will not preclude appellate review.”31
At Gronnert’s sentencing, the trial court exceeded its authority by accepting the plea agreement as a substantial and compelling reason justifying an exceptional sentence. Therefore, the invited error doctrine does not apply.
Gronnert also argues that the court committed error by not exercising its discretion in rejecting the DOSA. Ordinarily, a DOSA, as an alternate form of a standard range sentence, may not be appealed.32 But “[t]his prohibition does not... bar a party from challenging legal errors or abuses of discretion. . . .”33 For example, a defendant may appeal a sentence if the sentencing court refuses to exercise its discretion,34 or if the defendant alleges a constitutional violation.35 Gronnert argues both that the court did not exercise discretion and that he was a victim of a constitutional violation.
Gronnert argues that the court’s refusal to impose a DOSA based on its belief that the program was a “scam” and a “sham” was an abuse of its discretion. RCW 9.94A.660(2) allows a sentencing court to impose a DOSA if the court determines that “the offender and the community will benefit from the . . .” program.36 Although the court’s statement that it does not “at this point in time impose drug offender sentencing alternatives” appears to be a categori*226cal denial of DOSA, the court also commented that DOSA “simply is an ineffective way of dealing with drug offender behavior.” The court further stated to Gronnert that “because [DOSA] provides very little if any” benefit other than cutting the sentence in half, it was “not imposing [DOSA] in your case.” The court exercised its discretion, determined that the program would not benefit either the defendant or the community, and denied the request for DOSA.
Gronnert also argues that by questioning the wisdom of imposing a DOSA, the court violated the separation of powers doctrine. Our Supreme Court has noted that “[t]he doctrine of separation of powers comes from the constitutional distribution of the government’s authority into three branches.”37 The court has also commented that “[t]he purpose of the doctrine is to prevent one branch of government from aggrandizing itself or encroaching upon the ‘fundamental functions’ of another.”38
Although the legislature has the authority to establish the penalties for crimes, it “may grant the trial court discretion in sentencing.”39 Under RCW 9.94A.660, the legislature granted trial courts the discretion to impose a DOSA.40 The trial court exercised its discretion and did not violate the separation of powers doctrine.
The trial court erred by sentencing Gronnert to an exceptional sentence that was inconsistent with the purposes of the SRA. We reverse and remand for resentencing within the standard sentencing range.
Reversed and remanded.
Grosse and Becker, JJ., concur.
Ch. 9.94ARCW.
In re Pers. Restraint of Goodwin, 146 Wn.2d 861, 873-74, 50 P.3d 618 (2002).
In re Pers. Restraint of Breedlove, 138 Wn.2d 298, 308, 979 P.2d 417 (1999) (citing former RCW 9.94A.080-.103, recodified as RCW 9.94A.421-.475) (Laws of 2001, ch. 10, § 6)).
Breedlove, 138 Wn.2d at 309 (citing former RCW 9.94A.080(3), recodified as RCW 9.94A.421(3) (Laws of 2001, ch. 10, § 6)).
Breedlove, 138 Wn.2d at 309 (citing RCW 9.94A.090(2), recodified as 9.94A.43K2) (Laws of 2001, ch. 10, § 6)).
138 Wn.2d 298, 979 P.2d 417 (1999).
State v. Perkins, 108 Wn.2d 212, 217-18, 737 P.2d 250 (1987).
Breedlove, 138 Wn.2d at 310.
Breedlove, 138 Wn.2d at 310.
Breedlove, 138 Wn.2d at 306.
Breedlove, 138 Wn.2d at 309.
RCW 9.94A.010.
State v. Borg, 145 Wn.2d 329, 336, 36 P.3d 546 (2001).
Breedlove, 138 Wn.2d at 300 (emphasis added).
Breedlove, 138 Wn.2d at 309 (emphasis added).
121 Wn. App. 687, 90 P.3d 1095 (2004).
Gaines, 121 Wn. App. at 696-97.
Gaines, 121 Wn. App. at 697 (quoting RCW 9.94A.010(3)).
Gaines, 121 Wn. App. at 700.
Gaines, 121 Wn. App. at 701.
Gaines, 121 Wn. App. at 702-06.
See, e.g., Breedlove, 138 Wn.2d at 301-02 (where defendant agreed to plea bargain reducing charge from first degree murder to first degree manslaughter and stipulated to an exceptional sentence).
Breedlove, 138 Wn.2d at 310.
ROW 9.94A.030(28), (32).
Breedlove, 138 Wn.2d at 310 (where the trial court held that the exceptional sentence was appropriate considering the circumstances of the crime).
RCW 9.94A.515, .510.
112 Wn.2d 606, 772 P.2d 1009 (1989).
Pennington, 112 Wn.2d at 610.
113 Wn. App. 347, 57 P.3d 624 (2002).
Phelps, 113 Wn. App. at 354 (quoting State v. Eilts, 94 Wn.2d 489,495-96, 617 P.2d 993 (1980), overruled by statute on other grounds as stated in State v. Barr, 99 Wn.2d 75, 78, 658 P.2d 1247 (1983)).
Phelps, 113 Wn. App. at 354.
State v. Smith, 118 Wn. App. 288, 292, 75 P.3d 986 (2003) (citing RCW 9.94A.585G); RAP 2.2(b)(6); State v. Williams, 149 Wn.2d 143, 146, 65 P.3d 1214 (2003)).
Smith, 118 Wn. App. at 292.
State v. Garcia-Martinez, 88 Wn. App. 322, 330, 944 P.2d 1104 (1997).
State v. Mail, 121 Wn.2d 707, 713, 854 P.2d 1042 (1993).
RCW 9.94A.660(2).
State V. Moreno, 147 Wn.2d 500, 505, 58 P.3d 265 (2002).
Moreno, 147 Wn.2d at 505 (quoting Carrick v. Locke, 125 Wn.2d 129,135, 882 P.2d 173 (1994)).
State v. Hunter, 102 Wn. App. 630, 636, 9 P.3d 872 (2000).
State v. Conners, 90 Wn. App. 48, 53, 950 P.2d 519 (1998).