
678 So.2d 1046 (1995)
Ex parte Linda Seay RICHARDSON.
(Re Linda Seay Richardson v. State).
1930940.
Supreme Court of Alabama.
November 22, 1995.
Rehearing Denied February 9, 1996.
*1047 Collins Pettaway, Jr. of Chestnut, Sanders, Sanders, & Pettaway, Selma, for Petitioner.
Jeff Sessions, Atty. Gen., and Ward Beeson, Deputy Atty. Gen., for Respondent.
COOK, Justice.
Linda Richardson was charged with unlawful distribution of marijuana, a controlled substance. She entered into a plea agreement with the Dallas County district attorney; pursuant to that agreement she entered a guilty plea and was convicted. The Court of Criminal Appeals affirmed, without opinion. We granted certiorari review to consider (1) whether the State provided adequate notice of its intent to seek sentence enhancement when it entered into the agreement with Richardson and (2) whether the State met the burden of proof required to allow imposition of the enhancement.
The facts establish that under the plea agreement, the State recommended a seven-year prison sentence and no probation. Richardson acknowledged the sentence recommendation, but she said she intended to request that the court consider suspending the sentence or granting probation. The agreement stipulated that Richardson had no prior felony convictions for enhancement purposes under the Alabama Habitual Offender Act. The agreement did not mention the state's intent to pursue a sentence enhancement under Ala.Code 1975, § 13A-12-250, the school-yard statute.
At Richardson's sentencing hearing, the State asked the court to apply the school-yard statute. That statute enhances a sentence for unlawful distribution of a controlled substance by imposing a mandatory five-year sentence, with no probation, if the sale occurred within three miles of a school. The court reasoned that it could not ignore the statute; it followed the State's recommendation, sentencing Richardson to seven years in prison without probation. The State presented no evidence that the school-yard statute should apply, because its witness was not available to testify. The Court of Criminal Appeals affirmed the conviction and sentence.
The dispositive issue in this case is whether the State violated the plea agreement with Richardson by invoking the school-yard statute at the sentencing hearing although it had not been mentioned during the plea negotiations. We hold that the State did violate the terms of the agreement; therefore, we reverse the judgment of the Court of Criminal Appeals and remand the case. On remand, the Court of Criminal Appeal is to remand to the trial court for sentencing consistent with this opinion.
We have stated regarding plea agreements that, if the district attorney makes an offer and that offer is accepted by the accused, either by entering a guilty plea or by taking action to his detriment in reliance on the offer, the plea agreement becomes binding and enforceable. Ex parte Johnson, 669 So.2d 205 (Ala.Cr.App.1995); Waldrop v. State, 54 Ala.App. 163, 306 So.2d 29 (Crim. App.1974), cert. denied, 293 Ala. 777, 306 So.2d 33 (1975). The State does not have to enter into a plea agreement. However, if it chooses to do so, it should not be allowed to repudiate that agreement with impunity. Ex parte Yarber, 437 So.2d 1330 (Ala.1983). Our position is supported by the United States Supreme Court, which has held that when a guilty plea rests in any significant degree on a promise or agreement of the prosecutor, so that the promise or agreement can be said to be part of the inducement or consideration leading to the plea, the promise or agreement must be fulfilled. Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971).
In Ex parte Johnson, the district attorney did not consider the applicable sentence enhancements when negotiating a plea with the defendant Ackerman, who was charged with selling the controlled substance Dilaudid within three miles of a school and a housing project. This Court upheld the ruling of the trial court, which had ruled that the State could not rescind the plea agreement and, therefore, that the court could not enhance Ackerman's sentence.
We find no evidence that the State's written agreement with Richardson expressed any intention on the part of the State to seek enhancement under § 13A-12-250. The *1048 agreement makes the State's position clear: it recommended that Richardson not receive probation. But the district attorney knew that Richardson intended to ask the court for a suspended sentence and/or probation, neither of which is available if the statute is imposed. The State cannot subsequently attempt to rescind the plea agreement.
The Court of Criminal Appeals has held that when an accused is not informed that § 13A-12-250 will be applied in the accused's case, the accused has not been informed of the true and correct terms of the sentence. In that situation, the defendant's plea is considered involuntary. Pope v. State, [Ms. CR-94-132, March 3, 1995] ___ So.2d ___ (Ala.Cr.App.1995), citing Cummings v. State, 642 So.2d 489 (Ala.Cr.App.1992). The Pope opinion makes it clear that when this situation occurs, all parties go back to the status existing before the court accepted of the plea agreement, and that any further prosecution of the defendant cannot be based on any admissions obtained in connection with the plea agreement. See also Ex parte State ex rel. Barber, 669 So.2d 202 (Ala.Cr.App.1994). While that is a viable alternative, given the facts in this case, we point out that this Court has recognized that plea agreements resemble contracts and that contract theories provide a useful framework for dealing with plea agreements, even though contract law cannot be rigidly applied. Ex parte Yarber, 437 So.2d 1330, 1334 (Ala.1983). The Yarber Court pointed out that the Due Process Clause mandates enforcement of the State's promise when the accused has detrimentally relied on that promise in pleading guilty or in taking action based on the promise. Id. There is no question that Richardson relied on the fact that the State entered the agreement knowing that she intended to ask the court to give her a suspended sentence or probation. Richardson presented witnesses who testified that she was conducting herself in a manner that deserved the court's consideration in that regard. Clearly, she had not understood that the State intended to seek to apply the school-yard statute. It is clear from the record that the trial court understood it had to impose a sentence based on the statute. Under our holding in Ex parte Johnson, with similar facts and circumstances, that understanding was incorrect.
Faced with a similar situation in Yarber, this Court said, in providing guidance to the trial court:
"Because we have decided that the plea agreement is enforceable, the question which next arises is: What is defendant's remedy on remand? Because the trial court is not bound to accept an agreement between the defense and prosecution, defendant cannot compel the entry of a judgment of guilty coupled with the terms embodied in the plea agreement. Nevertheless, defendant is not without a remedy. Under the posture of the agreement in this case, defendant is entitled to compel the enforcement of that for which he bargainedthat is, the tender of the negotiated plea, with its attendant terms, to the trial court for its consideration. The Court of Criminal Appeals is directed to instruct the trial court to consider the negotiated plea and its terms entered into by the state's counsel and defendant's counsel."
437 So.2d at 1336.
We remand this case for the Court of Criminal Appeals to order a new sentencing hearing. Additionally, Richardson contends that the State did not meet its burden of proving that the distribution occurred within three miles of a school. We need not reach this issue in light of our resolution of the other issue.
REVERSED AND REMANDED.
HOOPER, C.J., and ALMON, SHORES, HOUSTON, KENNEDY, INGRAM, and BUTTS, JJ., concur.
MADDOX, J., dissents.
MADDOX, Justice (dissenting).
This case is strikingly similar to Ex parte Johnson, 669 So.2d 205 (Ala.1995). In that case, Justice Butts and I joined Justice Houston's dissent, which stated that "an assistant district attorney cannot, by inadvertence, undermine the legislature's authority to establish sentencing ranges." 669 So.2d at 207. As in Johnson, the majority in this *1049 case overlooks the mandatory aspect of the sentence enhancement statutes as established by the legislature.[1] I also point out that the defendant was not sentenced to a term in excess of what she agreed to in the plea agreement, seven years. So how was she prejudiced by the failure to "mention" the enhancement in the plea negotiations? I do not believe that she was prejudiced. Based on the foregoing, I must respectfully dissent.
NOTES
[1]  The particular sentence-enhancement statute applicable here states:

"In addition to any penalties heretofore or hereafter provided by law for any person convicted of an unlawful sale of a controlled substance, there is hereby imposed a penalty of five years incarceration in a state corrections facility with no provision for probation if the situs of such unlawful sale was on the campus or within a three-mile radius of the campus boundaries of any public or private school, college, university or other educational institution in this state."
§ 13-A-12-250, Ala.Code (1975) (emphasis added).
