
69 P.3d 407 (2003)
2003 WY 65
Johnny Lee FORD, Appellant (Defendant),
v.
The STATE of Wyoming, Appellee (Plaintiff).
No. 01-226.
Supreme Court of Wyoming.
May 23, 2003.
*408 Kenneth M. Koski, State Public Defender; and Donna D. Domonkos, Appellate Counsel. Argument by Ms. Domonkos, Representing Appellant.
Hoke MacMillan, Attorney General; Paul S. Rehurek, Deputy Attorney General; D. Michael Pauling, Senior Assistant Attorney General; Theodore E. Lauer, Faculty Director, Prosecution Assistance Program; and M. Rick Erickson, Student Intern. Argument by Mr. Erickson, Representing Appellee.
Before HILL, C.J., and GOLDEN, LEHMAN, KITE, and VOIGT, JJ.
LEHMAN, Justice.
[¶ 1] Johnny Lee Ford (Ford) appeals the judgment and sentence entered against him upon conviction of first-degree sexual assault. Ford pled guilty to one count of first-degree sexual assault pursuant to a plea agreement. Ford claims that the prosecutor breached the plea agreement and he therefore should have been allowed to withdraw his guilty plea. We agree and reverse and remand.

ISSUES
[¶ 2] Ford presents the following two issues:
I. Whether Mr. Ford should be allowed to withdraw his guilty plea?
II. Whether the sentence reflected in Mr. Ford's written order of sentence is illegal as it is inconsistent with the oral sentence *409 given in open court and was not approved by defense counsel before being signed by the court?
The State phrases the issues in the following manner:
I. Did the State breach its plea agreement with appellant, and did the district court abuse its discretion in denying appellant's request to withdraw his plea of guilty?
II. Was there a discrepancy between the district court's oral pronouncement of appellant's sentence and the written judgment and sentence entered by the court?

FACTS
[¶ 3] Ford was charged with first-degree sexual assault in violation of Wyo. Stat. Ann. § 6-2-302(a)(i) (LexisNexis 2001). Ford initially pled not guilty to this charge and was released on signature bond. A short time later, the State filed a petition to revoke Ford's bond on the ground that he had violated his bond conditions when he was arrested for battery.
[¶ 4] On March 8, 2001, Ford appeared in district court and entered a guilty plea to the first-degree sexual assault charge. The guilty plea was made pursuant to a plea agreement under which the State agreed to recommend "a 5-to-10-year sentence in prison suspended with placement at either ISP or in the Adult Community Corrections program with a requirement of sex-offender treatment and all standard conditions of probation."
[¶ 5] Following Ford's guilty plea, he was referred to Community Alternatives of Casper, to the Intensive Supervision Program, and to Frontier Correctional Systems. All three programs denied Ford admittance, having determined that he would not be suitable for placement. Ford was sentenced on August 24, 2001. At the sentencing hearing the following exchange took place:
[Prosecutor]: Well, Your Honor, as the record indicates, this is somewhat of an unusual situation because the original plea agreement was for a term in the Wyoming State Penitentiary of not less than 5 nor more than 10 years with a referral to the ISP or CAC programs.
Well, all of those referrals were made, and [Ford], unfortunately, was rejected by all of them, partly because, as you can also tell by the record, [Ford] was originally released on a bond, but then was re-incarcerated after having committed and pled to a battery domestic violence situation, and then we entered into the plea agreement. He agreed to stay in jail pending sentencing on the first-degree sexual assault.
[Defense Counsel]: Your honor, I hate to interrupt again.
It would be our positionI would object to any further comments from the district attorney's office. It's our position that they have made a recommendation as to sentencing, and that there really is no further appropriate comment in terms of why thatwhy he wasn'tunless there's evidence as to that, which I don't believe there is, I don't believe it's appropriate for them to comment on why he was not accepted at ISP or CAC.
. . .
[Prosecutor]: I was simply reciting what the substance of the record is thus far, Your Honor.
I believe the reason [Defense Counsel] is objecting, although I've never had anybody object to making sentencingmy making sentencing arguments when there's no agreement to stand silent at sentencing. That's never been contemplated.
In any event, what I was about to say was [Ford] remained incarcerated, and has demonstrated through his behavior that's documented at the jail that he is a bad risk to go to an ISP or CAC program.
He's had numerous write-ups for things such as property destruction at the jail. He's made threats to other inmates. He's engaged in odd, unexplained behavior that has put him under maximum security and
[Defense Counsel]: We would have a continuing objection.
[Prosecutor]:and put in jail, that he needs to be monitored closely. Those are the kind of things that, as indicated, make *410 him a bad risk for anything other than the term as stipulated of 5 to 10 at the penitentiary.
[¶ 6] Following the above discussion, Ford's mother addressed the court. Defense counsel then indicated that Ford believed that the district attorney had violated the terms of the plea agreement and he wished to withdraw his plea. The court stated that it did not believe the plea agreement was violated and denied the motion. The trial court further indicated that it believed that the prosecutor made the recommendation that she agreed to make, but that it was an inappropriate recommendation that the court would not accept.
[¶ 7] Ford was then sentenced to a term of six to ten years in the penitentiary. During the oral pronouncement of the judgment and sentence the trial court stated that Ford is "entitled to credit for time served against that minimum and maximum time." The written judgment and sentence provided that Ford "shall be given credit against the minimum and maximum sentence for time served in the Laramie County Detention Facility awaiting disposition of this matter which equals ten (10) days (October 24, 2000 to November 2, 2000), [Ford] shall not receive credit for time served for his bond revocation (January 31, 2001 to August 24, 2001)." This appeal followed.

STANDARD OF REVIEW
[¶ 8] "When a plea of guilty rests to any significant degree on a promise or agreement by the State, that promise must be fulfilled. Whether the prosecutor has violated the plea agreement is a question that is reviewed de novo." Herrera v. State, 2003 WY 25, ¶ 8, 64 P.3d 724, ¶ 8 (Wyo.2003) (citing Clingman v. State, 2001 WY 46, ¶ 4, 23 P.3d 27, ¶ 4 (Wyo.2001); Santobello v. New York, 404 U.S. 257, 262, 92 S.Ct. 495, 499, 30 L.Ed.2d 427 (1971); Clouse v. State, 809 P.2d 791, 795 (Wyo.1991); and United States v. Robertson, 45 F.3d 1423, 1442 (10th Cir.1995)). See also Browning v. State, 2001 WY 93, ¶ 32, 32 P.3d 1061, ¶ 32 (Wyo.2001). W.R.Cr.P. 32(d) governs the withdrawal of a guilty plea prior to sentencing. "If a motion for withdrawal of a plea of guilty ... is made before sentence is imposed, the court may permit withdrawal of the plea upon a showing by the defendant of any fair and just reason." See Herrera at ¶ 9.
[¶ 9] Whether the trial court properly denied a motion for withdrawal of a guilty plea is reviewed under an abuse of discretion standard. In making this determination we must "determine whether the trial court could reasonably conclude as it did and whether any facet of its ruling was arbitrary or capricious." Herrera at ¶ 10 (citing Burton v. State, 2002 WY 71, ¶ 44, 46 P.3d 309, ¶ 44 (Wyo.2002); Cook v. State, 7 P.3d 53, 58-59 (Wyo.2000); Vaughn v. State, 962 P.2d 149, 152 (Wyo.1998)).

DISCUSSION

Withdrawal of Plea
[¶ 10] A plea agreement is a contract between the State and a defendant. As such, both parties must adhere to the terms of the contract, and each party is entitled to the benefit of the bargain entered. The type of plea agreement in this case is that described by W.R.Cr.P. 11(e)(1)(B), "the attorney for the state will... make a recommendation, or agree not to oppose the defendant's request, for a particular sentence, with the understanding that such recommendation or request shall not be binding upon the court." In this type of plea agreement the defendant provides consideration by pleading guilty. In return, the State supplies consideration by making the promised recommendation or by not opposing the defendant's request for a particular sentence.
[¶ 11] When determining whether a breach of the plea agreement has occurred we: "(1) examine the nature of the promise; and (2) evaluate the promise in light of the defendant's reasonable understanding of the promise at the time the plea was entered." Schade v. State, 2002 WY 133, ¶ 5, 53 P.3d 551, ¶ 5 (Wyo.2002) (quoting Browning, at ¶ 32). Our analysis is guided by the principles of general contract law. Schade, at ¶ 5. Just as in contract law, a party is not released from its obligation unless the other *411 party has materially or substantially breached that agreement. Browning, at ¶ 32. "A material or substantial breach is one that goes to the whole consideration of the agreement." Schade, at ¶ 5 (quoting Browning at ¶ 32).
[¶ 12] Because the plea agreement in this case was not reduced to a specific written document, we must look to the recitation of the plea agreement given at the change of plea hearing to determine the terms of the agreement. In doing so, we see that the terms of the agreement provided that in exchange for a guilty plea, the State would recommend "a 5-to-10-year sentence in prison suspended with placement at either ISP or in the Adult Community Corrections program with a requirement of sex-offender treatment and all standard conditions of probation."
[¶ 13] We begin our analysis with the nature of the promise. At the time the plea was entered, the State agreed to recommend not only a five-to-ten-year prison sentence but also the suspension of that sentence with placement in an alternative program. The nature of the promise was not just a recommendation for a certain prison term but also a recommendation for suspension of that term. In that sense, the nature of the promise here is a recommendation for a probation-type sentence not a stipulated prison term. See State v. Brooke, 134 Idaho 807, 10 P.3d 756, 758 (Idaho App.2000) (holding that a suspended sentence implicitly contemplates probation).
[¶ 14] Next, we turn to the defendant's reasonable understanding of that promise at the time the plea was entered. When we look at Ford's understanding of the plea agreement in his own words we see:
The district attorney has offered me the following plea agreement. I plead guilty to the first degree sexual assault, the D.A. recommends 5-10 years in prison, suspended, with me to be placed at ISP or CAC with requirement of sex offender treatment and all other standard terms and conditions of probation. As to the battery, I would plead guilty, I would receive an additional 90-120 days suspended on that case (when I am sentenced on the felony), with no contact with the victim and successful counseling through Frontier Corrections. This plea agreement would allow me to get suspended sentences as to both charges. I am aware, that if I screw up on these, I would be looking at serving 5-10 in the pen.

(Emphasis added.) Ford's recitation indicates that at the time of the agreement he understood that there would be a recommendation for a suspended sentence and placement at an alternative program. Ford's understanding appears to be that he would only go to prison if he were unsuccessful in an alternative program. Granted, the defendant is bargaining for a recommendation not a result, but Ford's recitation makes it clear that Ford did not understand that he was stipulating to five to ten years in the penitentiary without a recommendation for a suspended sentence. The suspended sentence provision was in the same agreement, and Ford understood it to be an integral part of the plea agreement.
[¶ 15] When it came time for sentencing, the State did recommend the agreed upon prison sentence but it did not recommend the suspension thereof. Instead, the State argued that the agreement was a stipulated five to ten years in the penitentiary. In light of the nature of the government's promise and the defendant's reasonable understanding, we hold that the State breached the plea agreement. The State argued against one of the very things they had agreed to recommend by stating Ford was "a bad risk to go to an ISP or CAC program," and "those are the kind of things that, as indicated, make him a bad risk for anything other than the term as stipulated of 5 to 10 at the penitentiary." At no time during sentencing did the State make a complete recommendation like that bargained for, i.e., a suspended sentence. As such, the State breached its duty to comply strictly with the terms of the plea agreement.
[¶ 16] Furthermore, we determine that the breach was material or substantial. Several factors are relevant to whether a breach is material or substantial, including the extent to which the non-breaching party will be deprived of the benefit it reasonably *412 expected and the extent to which the breaching party's conduct comports with the standards of good faith and fair dealing. Schade, at ¶ 5. As just discussed, Ford reasonably expected a recommendation for a suspended sentence with placement at an alternative program. A recommendation for a particular sentence and the suspension thereof was the direct inducement for the guilty plea. Ford pled guilty on the assumption that he would receive a recommendation for a suspended sentence with alternative placement, not a recommendation for prison time. Because a suspended sentence is much different than a stipulated prison term, the breach went to the whole consideration of the agreement. Therefore, the recommendation for the suspension of the sentence was a material and substantial part of the agreement.
[¶ 17] In fairness to the State, Ford could not be admitted to any of the programs in which it had agreed to recommend placement. The State claims that Ford's enrollment was an essential part of the agreement and "it would be unreasonable and unrealistic to require the State to adhere to its original recommendation as though nothing had happened to make that recommendation impossible of fruition." The State essentially asks us to excuse its failure to strictly comply with the agreement because Ford was not accepted to any of the alternative programs. The State seems to claim that the agreement for a five-to-ten-year prison term was unconditional but the recommendation for suspension was conditioned upon Ford's acceptance into one of the alternative programs. If that was the case, such terms were not stated in the recitation of the plea agreement. Without an express agreement indicating what would happen should Ford not be admitted to the alternative programs, we are reluctant to place the risk and consequence of such an eventuality on the defendant alone. In the absence of an agreement to the contrary, both parties should bear the risk of such an event occurring. See Downing v. Stiles, 635 P.2d 808, 813-15 (Wyo.1981) (discussing the contract principles of frustration of purpose and impossibility).
[¶ 18] Furthermore, we have said that the prosecutor may not play fast and loose with the established terms of a plea agreement and must explicitly stand by those terms agreed upon. Herrera, at ¶ 18. If the prosecutor's performance of the terms of a plea agreement is not possible, a withdrawal of the plea is the correct remedy. The prosecutor's remedy was not to violate or mischaracterize the agreement but rather move to withdraw the plea agreement if she did not wish to be bound to its terms. Neither the principles of fairness nor the principles of contract law allow the State to retain the benefit of the agreement while avoiding its obligation. See State v. Rardon, 2002 MT 345, ¶ 18, 313 Mont. 321, 61 P.3d 132, ¶ 18 (Mt.2002). "[I]t would be unfair to accept a guilty plea where part of the bargain, upon which the plea was based, was breached. The defendant had not agreed to plead guilty to charges under terms other than those set forth in the agreement." Cardenas v. Meacham, 545 P.2d 632, 638 (Wyo.1976) (explaining the rationale behind the Santobello decision.)
[¶ 19] Beyond just failing to recommend the suspended sentence, the prosecutor further characterized information in the presentence investigation report. As noted in Clingman, ¶ 21 (Golden, J., concurring):
A prosecutor who drafts a plea agreement containing the terms found in the one we review today should pay particular attention to two principles of this standard: (1) the court looks to the express terms of the plea agreement and construes any ambiguities against the government as the drafter of the agreement; and (2) the government breaches such an agreement when it provides a legal characterization of facts found in the presentence report or argues the effect of those facts to the sentencing judge.
Here, the prosecutor not only failed to make the recommendation to which she agreed but she argued that Ford would not be fit for anything but a prison stay. The State clearly argued facts found in the presentence report when it argued that his behavior made him a bad risk for anything other than prison time. As such, the prosecution's remarks certainly violated the spirit of the agreement.
*413 [¶ 20] Lastly, as noted in our standard of review, the decision to withdraw must be based on a fair and just reason.
Before sentencing, the inconvenience to court and prosecution resulting from a change of plea is ordinarily slight as compared with the public interest in protecting the right of the accused to trial by jury. But if a plea of guilty could be retracted with ease after sentence, the accused might be encouraged to plead guilty to test the weight of potential punishment, and withdraw the plea if the sentence were unexpectedly severe. The result would be to undermine respect for the courts and fritter away the time and painstaking effort devoted to the sentencing process.
Browning, at ¶ 27 (quoting State v. McDermott, 962 P.2d 136, 138 (Wyo.1998)). This was not an instance of Ford trying to test the weight of potential punishment. Ford moved to withdraw his guilty plea before sentence was imposed. Because the plea agreement was breached, Ford established a fair and just reason for withdrawal of his guilty plea, and the trial court abused its discretion by not allowing Ford to withdraw his plea.
Discrepancy Between the Oral and Written Judgment and Sentence
[¶ 21] Because we reverse and remand on the first issue, we need not address the second issue. Should such a question arise again, the trial court can simply clarify exactly how much time should be credited for the time served.

CONCLUSION
[¶ 22] For the reasons provided above, the judgment and sentence is reversed, and this matter is remanded with the direction that Ford be allowed to withdraw his guilty plea.
