
165 P.3d 105 (2007)
2007 WY 131
Edward Allen HOLCOMB, Appellant (Defendant),
v.
The STATE of Wyoming, Appellee (Plaintiff).
No. 06-288.
Supreme Court of Wyoming.
August 16, 2007.
*107 Representing Appellant: Nicholas H. Carter and Kurt A. Infanger of Carter Law Office, P.C., Gillette, Wyoming.
Representing Appellee: Patrick J. Crank, Attorney General; Terry L. Armitage, Deputy Attorney General; D. Michael Pauling, Senior Assistant Attorney General; and Paul S. Rehurek, Senior Assistant Attorney General.
Before VOIGT, C.J., and GOLDEN, HILL, KITE, and BURKE, JJ.
VOIGT, Chief Justice.
[¶ 1] This is an appeal from the sentence imposed upon the appellant after he pled guilty to felony stalking pursuant to a plea agreement. The issue presented is whether the district court abused its discretion or erred as a matter of law when, prior to sentencing, it denied the appellant's motion to withdraw his plea. We reverse.

FACTS
[¶ 2] At a change-of-plea hearing in district court, the appellant pled guilty to felony stalking. He did so pursuant to a plea agreement, the primary term of which was that "we have agreed to propose to the sentencing judge that he be considered for deferral under 7-13-301."[1] The district court accepted the guilty plea, but did not enter a conviction, pending completion of a presentence investigation report. With specific regard to deferred prosecution, the following colloquy occurred:
THE COURT: One of the things that applies in this situation is that the State is going to make a recommendation under Wyoming Statute 7-13-301, which is a deferred sentence [sic]. The final decision on that would be made at sentencing. This case is Judge Perry's case; I'm doing the change of plea today, so that 
THE DEFENDANT: I'm sorry.

*108 THE COURT:  so that the trial that was going to start in this case on Monday can be cancelled, and we don't have to worry about the jury coming in and wasting their time. At least that's what I was told, so I'm just going to take a 7-13-301; any other decision on the recommendations that might be made will be up to Judge Perry. He won't be bound by any of those recommendations. If he doesn't follow any of the recommendation, he  or you, I mean, will not be able to withdraw the guilty plea and have a trial; you'll have to live with the decision that he makes in this case. Do you understand that?
THE DEFENDANT: Yes.
THE COURT: Have you entered into this plea agreement voluntarily?
THE DEFENDANT: Yes, sir.
[¶ 3] Later in the hearing, after a factual basis for the crime was established, the district court went to great lengths to detail for the appellant what would happen if he received deferred prosecution and what would happen if he did not receive deferred prosecution:
THE COURT:. . . .
Now those are both possible, ten years in jail to which a fine of up to $10,000 could be added if you don't receive the deferral under Section 7-13-301.
And I want to explain to you as best I can under the proceedings today what the differences are. I'm sure you and [Defense Counsel] have gone over those, but I want the record to be clear that you've heard those today.
There is a difference between getting the deferral and not getting the deferral. Now in some of the things there's no difference, in some of the things there is a big, big difference. I'll start out with one of the big differences.
If you get a deferral, there would be no jail sentence or a fine. And if you comply with the probation, there would never be a jail sentence or a fine, okay? But if you don't get the deferral, both of those are possible.
Under either situation there would be an assessment of $10 court costs; under either situation there would be an assessment for the Victims of Crime Compensation Fund in the minimum amount of $100. Under either situation you could be required to make restitution.
There are additional consequences under either situation. First of all, under either situation your guilty plea would be part of your criminal record, and a criminal record is permanent. And that would be the case even if you get the deferred, because it would be part of the criminal record showing that you pled guilty and that you got the deferred, and it would always be there even if you were successful in getting the deferred. And the reason is, you're only allowed to have one in your lifetime, so they keep a record of it so to make sure that a person doesn't accident[al]ly get two. And because of that, it could be someone might feel that you are not a good risk for employment, deferred or not deferred. And under either situation it could have a negative affect upon your reputation in the community.
Now if you get or don't get the deferred, the civil rights you lose are the right to vote, right to serve on a jury, right to hold public office. Those rights would be lost until you received a pardon or restoration of rights, and there's no guarantee that you would get that. And even if you are successful in probation, those rights would never be restored, they are lost under either. You lose the right to possess or use weapons. If you were on probation or parole even from a different court or a different jurisdiction, your probation or parole could be revoked. If you are on probation for a felony, you won't be eligible for a deferred; you have to have no prior felonies to be eligible.
If you plead guilty, you give up your right to complain about any errors or omissions in the charging documents, except that they failed to charge a crime.
The last thing I want to mention if there is a conviction and no deferred, you will have to submit a blood or tissue sample for DNA testing and record-keeping. Those are the main consequences, although there would be others if you enter a plea of *109 guilty. And it would, depending upon the consequences, there would not be a difference of whether you get the deferred or not get the deferred.
Do you feel that you understand these consequences?
THE DEFENDANT: Yes.
THE COURT: Do you understand the charges 
THE DEFENDANT: Yes.
THE COURT: Do you have an understanding of the differences between getting a deferred and not getting the deferral?
THE DEFENDANT: Yes.
[¶ 4] In addition, during another lengthy explanation of the effect of entering a guilty plea, the judge further detailed that the plea agreement entailed a recommendation for the sentencing judge to consider deferred prosecution:
THE COURT: A guilty plea gives up the right to a trial. There would be no confrontation of witnesses, no evidence presented; the only issue would be what sentence should be imposed. Although in your case it recommends a deferral, the Court would consider that, but first, as I told you before, once the Court makes a decision on any of that, you won't be able to change your mind. . . .
Finally, in summing up after accepting the plea and the factual basis, the court stated that it would "not enter the conviction in order to give possible consideration, or to give consideration to the expected recommendation for the deferred under Section 7-13-301."
[¶ 5] Unfortunately for the appellant's prospects under his plea agreement, the presentence investigation report indicated that in 1999, he had received a "deferred judgment" in a Colorado case involving disturbing the peace and interference with police authority, both misdemeanors. Thus, as the parties appear later to have agreed, he was ineligible from the outset for deferred prosecution under Wyoming's statute.
[¶ 6] Prior to sentencing, the appellant filed a motion under W.R.Cr.P. 32(d) for permission to withdraw his plea. In his motion, the appellant explained that an attorney had handled the Colorado charges for him and that he was not aware that he had received the equivalent of a Wyoming deferred prosecution. W.R.Cr.P. 32(d) provides as follows:
(d) Plea withdrawal.  If a motion for withdrawal of a plea of guilty or nolo contendere 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. At any later time, a plea may be set aside only to correct manifest injustice.
[¶ 7] The State contested the appellant's motion by arguing that: (1) the State was unaware of the Colorado disposition when it entered into the plea agreement; (2) the appellant was in the best position to have knowledge of the Colorado disposition; and (3) the court had explained to the appellant that he would not be allowed to withdraw his plea if the court did not accept the plea agreement. The district court denied the motion without a hearing, concluding in its decision letter that the appellant had not shown a "fair and just reason" to permit withdrawal of his plea. The court then sentenced the appellant to a term of 18 to 48 months in the custody of the Department of Corrections, but suspended that sentence in favor of probation.

STANDARD OF REVIEW
[¶ 8] A general statement of our role in reviewing the denial of an appellant's motion to withdraw a guilty plea is found in Burdine v. State, 974 P.2d 927, 929-30 (Wyo. 1999):
A defendant has no absolute right to withdraw his plea of guilty prior to sentencing. Grady v. State, 914 P.2d 1230, 1232 (Wyo. 1996); Kaldwell v. State, 908 P.2d 987, 990 (Wyo.1995). The discretion afforded to the trial court will not be deemed abused in those cases where "the requirements of W.R.Cr.P. 11 have been met and the record is clear that the defendant intelligently, knowingly, and voluntarily entered into his plea of guilty." Kaldwell, supra., quoting Triplett v. State, 802 P.2d 162, 165 (Wyo.1990).
*110 (Footnote omitted.) Stating the test somewhat differently, we said the following in Herrera v. State, 2003 WY 25, ¶ 10, 64 P.3d 724, 727 (Wyo.2003):
Decisions concerning whether a trial court properly denied a motion for withdrawal of a guilty plea, either pre-sentence or post-sentence, are determined under an abuse of discretion standard of review. In deciding whether or not a trial court abused its discretion, this court must "determine whether the trial court could reasonably conclude as it did and whether any facet of its ruling was arbitrary or capricious." Burton v. State, 2002 WY 71, ¶ 44, 46 P.3d 309, ¶ 44 (Wyo.2002) (citing Cook v. State, 7 P.3d 53, 58-59 (Wyo.2000) and Vaughn v. State, 962 P.2d 149, 152 (Wyo. 1998)).
We look to the following seven factors, identified in Frame v. State, 2001 WY 72, ¶ 7, 29 P.3d 86, 89 (Wyo.2001), as pertinent in determining whether the district court properly exercised its discretion:
1. Whether the defendant has asserted his innocence?
2. Whether the government would suffer prejudice?
3. Whether the defendant has delayed in filing his motion?
4. Whether withdrawal would substantially inconvenience the court?
5. Whether close assistance of counsel was present?
6. Whether the original plea was knowing and voluntary?
7. Whether the withdrawal would waste judicial resources?
[¶ 9] There is more to the question, however, when a guilty plea has been entered pursuant to a plea agreement. A plea agreement is a contract between the State and the appellant, and it is subject to the general principles of contract law. Frederick v. State, 2007 WY 27, ¶ 13, 151 P.3d 1136, 1141 (Wyo.2007); Browning v. State, 2001 WY 93, ¶ 32, 32 P.3d 1061, 1071 (Wyo.2001). In determining whether to allow withdrawal of a guilty plea, the district court should look to the terms of the agreement in light of the appellant's reasonable expectations at the time the agreement was made. Frederick, ¶ 13, 151 P.3d at 1141; Herrera, ¶ 12, 64 P.3d at 727. Where performance of the agreement is impossible, the State should not be allowed to retain the benefits of its bargain while avoiding the burdens. Fernandez v. State, 2006 WY 8, ¶ 6, 126 P.3d 111, 113 (Wyo.2006); Spencer v. State, 2005 WY 105, ¶ 13, 118 P.3d 978, 983 (Wyo.2005); Ford v. State, 2003 WY 65, ¶ 17, 69 P.3d 407, 412 (Wyo.2003). Where performance is not possible, withdrawal of the plea is the correct remedy. Fernandez, ¶ 6, 126 P.3d at 113; Spencer, ¶ 13, 118 P.3d at 983. In particular, where the terms of the agreement do not specify what should happen when an expectation of the agreement cannot be fulfilled, "we are reluctant to place the risk and consequence of such an eventuality on the [appellant] alone." Ford, ¶ 17, 69 P.3d at 412.
[¶ 10] In reviewing the district court's exercise of its discretion in ruling upon a motion to withdraw a guilty plea where that plea is entered pursuant to a plea agreement, we must review these contract considerations, and not just the seven Frame factors set forth above. See supra ¶ 8. When a guilty plea has been entered pursuant to a plea agreement, we will review de novo the question of whether the agreement has been fulfilled. Fernandez, ¶ 6, 126 P.3d at 113; Clingman v. State, 2001 WY 46, ¶ 4, 23 P.3d 27, 28 (Wyo.2001).

DISCUSSION
[¶ 11] The simple facts of this case demand reversal, not upon the district court's consideration of the Frame factors, but upon the failure of the plea agreement underlying the plea. Clearly, there was no agreement that the appellant would receive deferred prosecution, but there was an agreement that, in exchange for the appellant's guilty plea, the district court would consider deferred prosecution. That did not happen  the district court never considered deferred prosecution because it was prevented from doing so by a mutual mistake of the parties: neither the State nor the appellant knew that the appellant was ineligible for deferred prosecution. The proper remedy upon collapse *111 of the plea agreement was to allow the appellant to withdraw his plea.
[¶ 12] The State argues that the appellant should be stuck with his bargain because he was in a better position to know of the earlier Colorado proceedings. While that contention has some surface appeal, the truth is that criminal defendants often are not aware of the technicalities of the criminal justice system, and the truth also is that modern criminal information sharing systems give the State immediate access to criminal record information from other jurisdictions. In the instant case, in fact, the existence of the Colorado deferral was discovered during preparation of the presentence investigation report.
[¶ 13] Logic and justice combined in this case to create a "fair and just reason" to have allowed the appellant to withdraw his plea before sentencing. Logic suggests that the appellant would not have entered a guilty plea to a felony, bargaining for something he knew he could not get, and that the prosecutor certainly would not, to obtain a guilty plea from the appellant, offer a benefit that he or she knew to be illusory. Perhaps an earlier investigation of the specifics of the appellant's Colorado conviction would have avoided the futile plea agreement, but such did not happen. Instead, when the district court could not and did not consider deferred prosecution, the bargain was lost.
[¶ 14] When a motion to withdraw a guilty plea is determined without a hearing, as happened here, the allegations made in the motion should be accepted as true, unless they are contradicted by the record, inherently unreliable, or merely conclusions. Brock v. State, 981 P.2d 465, 468-69 (Wyo. 1999). Here, the appellant stated in his motion that he did not realize that the Colorado disposition was equivalent to a Wyoming deferral. Therefore, without a hearing, that alleged fact could not be determined otherwise in denying the plea-withdrawal motion.
[¶ 15] We conclude that the district court erred in disregarding the collapse of the parties' plea agreement in denying the appellant's motion to withdraw his guilty plea. This is not a case where the recommendation that deferred prosecution be considered was an immaterial condition of the agreement. The lengthy quotations from the change-of-plea hearing set forth above make evident that the possibility of deferred prosecution was central to the change of plea. See supra ¶¶ 2-4. In fact, all the appellant received in exchange for pleading guilty to a felony was the expectation that the judge would consider a deferral. While these facts are not as egregious as when a prosecutor breaches a plea agreement, the total failure of the consideration underlying the agreementthe fact that the agreement was impossible to performstill required that the appellant be allowed to withdraw his plea.
[¶ 16] The underlying principle of law is the voluntariness of the plea:
In Mehring v. State, 860 P.2d 1101, 1109 (Wyo.1993), this court set forth the standard for evaluating the validity of a guilty plea that results from a plea agreement:
A guilty plea is valid when it "`"represents a voluntary and intelligent choice among the alternative courses of action open to the defendant."'" Osborn [v. State], 806 P.2d [259], 271 [(Wyo.1991)](quoting Hill v. Lockhart, 474 U.S. 52, 56, 106 S.Ct. 366, 369, 88 L.Ed.2d 203 (1985) and North Carolina v. Alford, 400 U.S. 25, 31, 91 S.Ct. 160, 164, 27 L.Ed.2d 162 (1970)). See W.R.Cr.P. 11(d) (Former Rule 15(d)). The acknowledged standard, adopted by the Supreme Court of the United States, to test whether a plea is voluntary states:
"`[A] plea of guilty entered by one fully aware of the direct consequences, including the actual value of any commitments made to him by the court, prosecutor, or his own counsel, must stand unless induced by threats (or promises to discontinue improper harassment), misrepresentation (including unfulfilled or unfulfillable promises), or perhaps by promises that are by their nature improper as having no proper relationship to the prosecutor's business (e.g. bribes).' . . . "
*112 Herrera, ¶ 17, 64 P.3d at 728 (quoting Brady v. United States, 397 U.S. 742, 755, 90 S.Ct. 1463, 1472, 25 L.Ed.2d 747 (1970)) (emphasis added).

CONCLUSION
[¶ 17] Unknown to either the State or the appellant, the agreement that resulted in the appellant's entry of a guilty plea to felony stalking was impossible to perform, ab initio. Therefore, the district court erred in allowing the State to retain the benefit of its bargainthe guilty pleawithout bearing the burdenconsideration of deferred prosecution. The motion to allow withdrawal of the guilty plea should have been granted.
[¶ 18] Reversed and remanded to the district court for entry of an order allowing the appellant to withdraw his guilty plea.
NOTES
[1]  Wyo. Stat. Ann. § 7-13-301 (LexisNexis 2007) provides in pertinent part as follows:

(a) If a person who has not previously been convicted of any felony is charged with or is found guilty of or pleads guilty or no contest to any misdemeanor except any second or subsequent violation of W.S. 31-5-233 or any similar provision of law, or any second or subsequent violation of W.S. 6-2-501(a) or (b) by a household member as defined by W.S. XX-XX-XXX against any other household member or any similar provision of law, or any felony except murder, sexual assault in the first or second degree, aggravated assault and battery or arson in the first or second degree, the court may, with the consent of the defendant and the state and without entering a judgment of guilt or conviction, defer further proceedings and place the person on probation for a term not to exceed five (5) years upon terms and conditions set by the court. . . .
