
562 So.2d 1307 (1990)
Ex parte Mary Louise CLAY.
(Re Mary Louise Clay v. State.)
89-204.
Supreme Court of Alabama.
March 16, 1990.
Norman Bradley, Jr. of Callaway and Bradley, Huntsville, for petitioner.
Don Siegelman, Atty. Gen., and Andrew J. Segal, Asst. Atty. Gen., for respondent.
*1308 SHORES, Justice.
Mary Louise Clay was charged with first degree theft of services in Madison County. She pleaded guilty to a reduced charge of second degree theft of services and received a sentence of a year and a day in the penitentiary. The Court of Criminal Appeals affirmed, without issuing an opinion. 553 So.2d 137 (Ala.Crim.App.1989). We issued our writ of certiorari to determine whether the trial court erred in failing to inquire about a plea bargain and in refusing Clay's timely request to withdraw her guilty plea.
Clay was indicted for first degree theft of services in violation of Alabama Code 1975, § 13A-8-10, for intentionally obtaining accommodations or rent in the value of $9,597 by providing false information to the Huntsville Housing Authority. On March 6, 1989, Clay appeared in open court with appointed counsel, and the charge was reduced at a hearing before the trial judge. Clay stated that she had looked at the form that explained her constitutional rights and the implications of a guilty plea, which was executed pursuant to Ireland v. State, 47 Ala.App. 65, 250 So.2d 602 (1971). The trial court then thoroughly informed her of her right to a jury trial and of the presumption of innocence. Clay denied that she was entering her guilty plea in response to a threat or a promise of a deal or any benefit. She acknowledged that she was aware of the range of punishment and that even though her attorney and the district attorney may have discussed a certain punishment, the court was not bound by any discussions they may have had. A factual basis for the plea was given, and Clay then pleaded guilty to the charge.
Sentencing was deferred until March 31, 1989. On March 31, Clay appeared in court with a different defense attorney (although it appears that the two defense attorneys were associates), and the attorney from the Madison County District Attorney's office was not the same as the one who had been present when Clay entered her guilty plea. Before the court sentenced Clay, her attorney stated that it was his understanding that Clay had pleaded guilty specifically on the inducement of the State in the form of a plea bargain. Defense counsel stated that under the terms of the plea bargain, Clay would plead guilty and receive a term of a year and a day, suspended for five years, probation, and would pay restitution, costs, and attorney fees. In response, the trial judge stated:
"That may be. The record would reflect that there was nothing said in terms of that arrangement, and to the contrary that the defendant was specifically advised that that was within the discretion of the Court. The record, of course, will speak for itself."
The trial judge sentenced Clay to serve a year and a day in the penitentiary and to pay court costs, attorney fees, and $25 to the Crime Victims Compensation Fund.
After the court announced the sentence, Clay's attorney moved to withdraw her guilty plea on grounds that the trial court had declined to follow the plea agreement reached between the defendant and the district attorney's office. The judge then stated:
"I think the record will show that we went to some length on March the 6th to explain to the defendant her rights and what her potential liability was in terms of punishment and that there was nothing made known to the Court in terms of any sort of arrangement between the defendant's counsel and the District Attorney. And I think the record will reflect that it took some ten or 15 minutes to go through the different rights that the defendant had, that she was fully advised of those rights, and based on that and the fact that she still chose to plead guilty, I'm going to deny your motion."
Neither the trial judge nor defense counsel asked the prosecuting attorney whether a plea agreement had been reached, and the prosecutor did not admit or deny that an agreement had been negotiated.
On appeal, Clay argues, first, that the trial court failed to allow the terms of the plea bargain to be presented before it accepted the plea and that that failure was error, and, second, that the court abused its *1309 discretion in refusing her request to withdraw her guilty plea.
Clay's first argument is meritless. She has cited several cases to support her contention that the trial court erred in failing to allow the terms of the plea bargain to be submitted for its consideration before she was required to plead. E.g., Ex parte Sides, 501 So.2d 1262 (Ala.1986). However, we stated in those cases that a trial court should consider the terms of a plea bargain at the defendant's request, and Clay failed to mention the plea agreement to the trial court before she entered her plea. Nothing in the record suggests that the court refused to consider the terms of any agreement reached by the parties, or that it would not have considered the terms if they had been submitted for its consideration.
Clay's second argument on appeal is that the court erred to reversal in denying her motion to withdraw her guilty plea after it declined to follow the plea agreement. In Ex parte Yarber, 437 So.2d 1330 (Ala. 1983), this Court held that once the State enters into a plea agreement with a defendant, the State cannot repudiate the agreement with impunity, and that the defendant has the right to have the agreement submitted to the court if he so requests. The trial court is not bound to accept the agreement, but "[w]hen the trial judge decides not to carry out an agreement reached between the prosecutor and the defense counsel, the accused must be afforded the opportunity to withdraw his or her guilty plea on motion promptly made." Ex parte Otinger, 493 So.2d 1362, 1364 (Ala.1986). The State does not quarrel with these established principles of law.
However, before these principles can be applied by a trial court, the threshold question of whether a plea agreement exists must be determined. The trial court has the power to determine whether such an agreement exists, Congo v. State, 455 So.2d 896, 897 (Ala.1984), and is in the best position to ascertain the facts and determine the intent of the parties. As a result, a trial court's decision regarding the existence of a plea bargain agreement is not readily disturbed on review. For example, in Fuller v. State, 481 So.2d 1178 (Ala. Crim.App.1985), the trial court considered testimony, as well as the arguments of defense counsel and of the State at the sentencing hearing, before it entered a finding that no plea agreement existed. The Court of Criminal Appeals upheld the trial court's determination, stating that there was nothing in the record on appeal that discredited the decision. See also, Ex parte Swain, 527 So.2d 1279 (Ala.1988).
This threshold question of whether a plea agreement existed was never directly addressed by the trial court in this case. Before the court sentenced Clay, defense counsel argued that a plea agreement had been reached and specified the terms of the alleged agreement, and the prosecutor stood by silently. At that point, the trial judge acknowledged that an agreement may have been reached, but stated that at the plea hearing nothing had been said about a plea arrangement. Instead of making a finding on the existence of a plea agreement, the trial judge noted that Clay had been advised of her rights and of the potential liability, but stated that the record "will speak for itself." The State now contends that no plea agreement existed.
The problem presented by this case, that is, whether the State and the defendant had actually reached a plea agreement, has repeatedly appeared in the Court of Criminal Appeals and in this Court. On previous occasions, we have set out a recommended solution, and we believe it is necessary to do so once again:
"The problem involved here could have been easily avoided had the plea agreement been written and all the terms and conditions made a part of the writing. If parties would reduce their plea agreements to writing, and present them to the trial court prior to sentencing, ... resolution of cases questioning the existence or contents of plea agreements would be greatly facilitated. The record would also show whether or not the trial court had accepted the plea agreement." *1310 Ex parte Cassady, 486 So.2d 453, 456 (Ala. 1986).
Proper resolution of this case necessitates a factual determination of whether defense counsel and the prosecutor had reached a plea agreement, and, if so, a determination of the terms of the agreement. Therefore, the judgment of the Court of Criminal Appeals is reversed, and the cause is remanded with instructions for that court to remand the cause to the circuit court for an evidentiary hearing on the issue of whether a negotiated plea agreement was reached and, if so, what the terms of that agreement were. The circuit court is instructed to prepare written findings of fact on this matter and to further proceed in a manner consistent with this opinion.
REVERSED AND REMANDED WITH INSTRUCTIONS.
HORNSBY, C.J., and MADDOX, JONES, ALMON, HOUSTON, STEAGALL and KENNEDY, JJ., concur.
