
501 So.2d 1262 (1986)
Ex parte John Lloyd SIDES, Jr., alias "Brownie".
(Re Ex parte John Lloyd Sides, Jr., alias "Brownie". In re State of Alabama v. John Lloyd Sides, Jr., alias).
84-812.
Supreme Court of Alabama.
June 20, 1986.
Rehearing Denied September 5, 1986.
Ryan deGraffenried, Jr. of deGraffenried & Hawkins, Tuscaloosa, for petitioner.
Charles A. Graddick, Atty. Gen., Joseph G.L. Marston III, Asst. Atty. Gen., Charles Freeman, Dist. Atty., and Thomas M. Smith, Asst. Dist. Atty., Tuscaloosa, for respondents.
PER CURIAM.
We granted certiorari in this case to determine whether an alleged plea bargain which involves Code of Alabama 1975, § 20-2-81(b), must be presented to the trial judge as provided for in Ex parte Yarber, 437 So.2d 1330 (Ala.1983), and Ex parte Congo, 455 So.2d 896 (Ala.1984), prior to the defendant's plea of guilty, or trial and conviction.
The facts of this case are as follows:
On June 11, 1982, defendant John Lloyd "Brownie" Sides was indicted for trafficking in cocaine. After entering a plea of not guilty, defendant entered into a plea bargain with the State wherein he agreed to work as an undercover agent with the West Alabama Narcotics Squad in exchange for consideration in his pending trial, *1263 as provided for in Code of Alabama 1975, § 20-2-81(b), which reads:
(b) The prosecuting attorney may move the sentencing court to reduce or suspend the sentence of any person who is convicted of a violation of this article and who provides substantial assistance in the identification, arrest, or conviction of any of his accomplices, accessories, coconspirators, or principals. The arresting agency shall be given an opportunity to be heard in aggravation or mitigation in reference to any such motion. Upon good cause shown, the motion may be filed and heard in camera. The judge hearing the motion may reduce or suspend the sentence if he finds that the defendant rendered such substantial assistance. (Acts 1980, No. 80-587, p. 926).
On November 21, 1983, the court held a hearing to consider defendant's motion to dismiss the indictment and his motion for enforcement of the agreement. According to testimony taken at the hearing, defendant brought about the conviction of one person and would have brought about more convictions except for the fact that each time the arrests were "called off" by the law enforcement officers. The trial court denied both of defendant's motions, stating that the motion for enforcement of the agreement was premature in light of the language of the statute. Defendant filed a petition for writ of mandamus with the Court of Criminal Appeals, which ultimately denied the writ, holding that "the requirements for mandamus are not present [and] no relief is available under § 20-2-81(b) until after the defendant has been found guilty." Defendant then filed his writ of certiorari with this Court.
In this case we are faced with an apparent conflict between the statute and our holdings in Yarber and Congo. According to the language of § 20-2-81(b), there must be a conviction before the statute comes into play, and after such conviction the prosecuting attorney may or may not move the court to reduce or suspend the defendant's sentence. The State argues, and the Court of Criminal Appeals agreed, that until the defendant is found guilty, no relief is available under the statute. We are of the opinion that such a construction arguably could render the statute unconstitutional and conflicts with the ratio decidendi inherent in Yarber and Congo.
In Ex Parte Yarber this Court held that the terms of a plea bargain must be considered by the trial court if defendant so requests, even if no plea has been entered.[1] (The trial court could reject the plea bargain.) In Yarber no plea was entered and there was no evidence that the defendant had acted in reliance upon the alleged agreement, but it still had to be submitted for the court's consideration. In this case, there was proof that defendant Sides placed his life and liberty in danger on more than one occasion in his attempts to procure the arrests of members of the Tuscaloosa drug culture. It would undermine all notions of fairness not to require the State to tell the court the agreement made by the defendant and the State because the defendant's motion to consider the agreement was arguably made too early.
We are of the opinion that the trial court should have considered the terms of the plea bargain at defendant's request, notwithstanding the language in the statute. Indeed, to hold otherwise would have a chilling effect on the purpose and spirit of our holding in Yarber. We are compelled to prevent a situation where a defendant bargains with the prosecutor to do certain things prior to conviction, and then the prosecutor reneges on his promise to recommend leniency, with no penalty whatsoever for so doing. Without Yarber, this could very well have happened in the case sub judice. A hearing prior to conviction or plea may show that but for the actions of the law enforcement officers, defendant would have brought about several drug-related arrests, and thus have lived up to his end of the bargain. The State should not be allowed now to unilaterally determine *1264 that the defendant did not substantially comply with an agreement and then not make a recommendation after plea or conviction of the defendant. The determination of whether the defendant substantially complied with an agreement is better left to the trial court once it has had an opportunity to examine the terms of the plea agreement.
We point out at this juncture that our holding in this case by no means requires the State to make a precise recommendation as to sentence prior to conviction, unless it has made a precise agreement concerning a recommended sentence. We simply hold that the defendant has the right to have whatever agreement was made by the State and him considered by the court prior to the entry of a plea or conviction.
Therefore, according to our holding in Ex Parte Yarber, supra, the judgment of the Court of Criminal Appeals must be reversed and the cause remanded, with instructions for that court to have the trial court conduct a hearing wherein the plea bargain, if there be any, is considered by the court.
REVERSED AND REMANDED.
TORBERT, C.J., and MADDOX, JONES and ADAMS, JJ., concur.
ALMON, J., concurs in the result.
SHORES, BEATTY, HOUSTON and STEAGALL, JJ., dissent.
BEATTY, Justice (dissenting):
Even a casual reading of Code of 1975, § 20-2-81, discloses that it does not apply to the facts of this case, and a like reading of Yarber shows that Yarber did not require the trial court to apply § 20-2-81 when the petitioner's motion was made. That section reads, in part:
"(b) The prosecuting attorney may move the sentencing court to reduce or suspend the sentence of any person who is convicted of a violation of this article and who provides substantial assistance in the identification, arrest, or conviction of any of his accomplices, accessories, coconspirators, or principals. The arresting agency shall be given an opportunity to be heard in aggravation or mitigation in reference to any such motion. Upon good cause shown, the motion may be filed and heard in camera. The judge hearing the motion may reduce or suspend the sentence if he finds that the defendant rendered such substantial assistance."
It is too clear to merit discussion that the petitioner's motion was premature and thus could not have invoked the operation of this statute.
SHORES, HOUSTON and STEAGALL, JJ., concur.
NOTES
[1]  Our decision in Ex parte Congo reaffirms our holding in Yarber that a defendant who has negotiated a plea bargain has the right to have it submitted to the court.
