
669 So.2d 205 (1995)
Ex parte Hon. Orson L. JOHNSON.
Ex parte Jan ACKERMAN.
(Re Ex parte State of Alabama ex rel. David Barber, District Attorney, petition for writ of mandamus and prohibition (Re State of Alabama v. Jan Ackerman)).
1931760, 1931761.
Supreme Court of Alabama.
September 15, 1995.
David Cromwell Johnson and Annesley H. DeGaris of Johnson & Cory, P.C., Birmingham, for petitioner Judge Orson L. Johnson.
C. Tommy Nail of McAbee, Nail & Ragsdale, Birmingham, for petitioner Jan Ackerman.
*206 Jeff Sessions, Atty. Gen., and Joseph G.L. Marston III, Asst. Atty. Gen., for respondent.
PER CURIAM.
Jan Ackerman was arrested and charged with unlawful distribution of the controlled substance Dilaudid. Ackerman, by and through her legal counsel, entered into plea negotiations with the district attorney in Jefferson County. The district attorney offered Ackerman a recommended sentence of two years' imprisonment in exchange for a guilty plea. The district attorney also agreed that he would not object to Ackerman's applying for probation immediately following the plea. Ackerman accepted the offer. The trial court conducted a full colloquy, as required by Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969), to ensure that Ackerman understood that she would be waiving her constitutional rights by entering a plea. Subsequently, the court accepted the plea agreement and entered a judgment based on the plea.
Shortly thereafter (within minutes), the district attorney realized that he had forgotten to consider certain sentence enhancements that would have been applicable. Specifically, the district attorney had forgotten to include the five years' additional imprisonment for sale of a controlled substance within three miles of a school and another five years' additional imprisonment for distribution within three miles of a public housing project. See §§ 13A-12-250 and -270, Ala. Code 1975, respectively. The district attorney then asked the court to rescind the plea agreement. Before the court had acted on the request to rescind the plea agreement, the district attorney filed a motion asking the court to impose the mandatory sentence based on Ackerman's guilty plea, including an additional 10 years for distribution within three miles of a school and a housing project. Ackerman filed a motion to enforce the original plea agreement calling for a sentence of two years' imprisonment and allowing immediate application for probation.
The trial court held a hearing and ruled that the district attorney's office was bound by the original plea agreement and that the court could not rescind the plea agreement and could not enhance the sentence by an additional 10 years pursuant to §§ 13A-12-250 and -270. The Court of Criminal Appeals reversed, holding that the district attorney had had no authority to make the original plea agreement calling for two years' imprisonment, because, it held, §§ 13A-12-250 and -270 are mandatory sentence enhancements, and that the original plea agreement was made only through negligence. That court also stated that Ackerman had shown no detrimental reliance on the original plea agreement and had shown no prejudice that she would suffer from a rescission of the agreement.
We granted certiorari review in order to determine whether the plea agreement should be upheld.
The United States Supreme Court first upheld the constitutionality of plea bargains in Brady v. United States, 397 U.S. 742, 90 S.Ct. 1463, 25 L.Ed.2d 747 (1970). In Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971), the Supreme Court recognized the enforceability of a negotiated plea. This Court addressed the issue of plea bargaining in Ex parte Yarber, 437 So.2d 1330 (Ala.1983), wherein it held that the State does not have to enter into a plea agreement. However, if the State chooses to do so, the Court held, it should not be allowed "to repudiate that agreement with impunity." 437 So.2d at 1335. To allow the State to dishonor its agreements at will would weaken the plea negotiating system.
It is clear that no defendant has a constitutional right to a plea bargain. The district attorney may engage in plea bargain negotiations at his sole discretion or, if he chooses, he may go to trial. If the district attorney makes an offer to an accused and the accused takes no action in reliance on the offer, the state may withdraw the offer. However, 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 bargain becomes binding and enforceable under constitutional law.
*207 In Santobello, the Supreme Court stated that "when a plea [of guilty] rests in any significant degree on a promise or agreement of the prosecutor, so that it can be said to be part of the inducement or consideration, such promises must be fulfilled." 404 U.S. at 262, 92 S.Ct. at 499. The Court in Santobello did not specifically state where the right to relief from a broken plea agreement arises. However, we believe that the right comes from the due process requirement that guilty pleas be made voluntarily and intelligently, given that a guilty plea is a waiver of fundamental rights such as a jury trial, the right against self-incrimination, and the right to confront accusing witnesses. See, Santobello, 404 U.S. at 261, 92 S.Ct. at 498.
We also recognize that plea agreements resemble formal contracts and that contract law theories provide a "useful analytical framework," for dealing with plea agreements but contract law cannot be rigidly applied to plea agreements. Yarber, 437 So.2d at 1334. It is the Due Process Clause that 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.
We do not agree with the Court of Criminal Appeals that specific performance of this plea agreement would permit the State, in the future, to avoid the mandatory nature of any sentencing enhancement statute merely by claiming that the State was not "aware" of the circumstances before entering the plea bargain. This assumes that the State would perpetrate a fraud on the court by intentionally omitting details about a case. We cannot make such an assumption. Further, to allow the state to revoke plea agreements made through negligence on the part of the district attorney's office might encourage such negligence. Requiring the district attorney to know the pertinent facts in a given case before entering a plea bargain will prevent such negligence and will ensure fairness to both the State and the defendant.
Based on the foregoing, we reverse the judgment of the Court of Criminal Appeals and remand this cause for proceedings consistent with this opinion.
REVERSED AND REMANDED.
HORNSBY, C.J., and ALMON, SHORES, KENNEDY, and COOK, JJ., concur.
MADDOX, HOUSTON, and BUTTS, JJ., dissent.
HOUSTON, Justice (dissenting).
An assistant district attorney cannot, by inadvertence, undermine the legislature's authority to establish sentencing ranges. The defendant has shown no detrimental reliance on the plea agreement and no prejudice that would result from its rescission; therefore, I cannot agree with the majority that the failure to enforce the agreement would violate the defendant's due process rights. Then Presiding Judge Bowen wrote in the opinion of the Court of Criminal Appeals: "In any further prosecution of [the defendant], the State may not use any admissions obtained from or volunteered by [the defendant] in connection with the plea agreement or the acceptance of her guilty plea." State v. Ackerman, 669 So.2d 202 (Ala.Crim.App.1994). By that ruling of the Court of Criminal Appeals, the defendant would receive all the process she is due. I would affirm the judgment of the Court of Criminal Appeals.
MADDOX, J., concurs.
