
465 So.2d 1085 (1985)
Ray EDWARDS
v.
STATE of Mississippi.
No. 55452.
Supreme Court of Mississippi.
March 20, 1985.
Samuel H. Wilkins, Jackson, for appellant.
Edwin Lloyd Pittman, Atty. Gen. by Leyser Q. Morris, Sp. Asst. Atty. Gen., Jackson, for appellee.
Before WALKER, P.J., and DAN M. LEE and ROBERTSON, JJ.
DAN M. LEE, Justice, for the Court:
This is an appeal from the Circuit Court of Leake County wherein the appellant, Ray Edwards, was found guilty of extortion and sentenced to serve a term of one year in the custody of the Mississippi Department of Corrections. The sole issue on this appeal is whether Edwards' prosecution violates an agreement between him and the district attorney whereby Edwards would resign his position as constable in exchange for immunity from prosecution.
Ray Edwards, a former Leake County constable, was indicted for extortion. Through his attorney, Edwards filed a motion to quash the indictment on the grounds that it violated an agreement between him and the district attorney. At a hearing on that motion the district attorney testified that he had reached an agreement with Edwards' attorney which stated in part:
In the event Constable Edwards will resign from office and not seek reelection, either personally or through some close member of his family, these matters will not be presented to the Grand Jury. Mr. Robert King, the investigator with the Ethics Commission, expressed to me last week that he concurs with this action.
If Mr. Edwards resigns and does not seek reelection as stated in the above paragraph, all matters brought out in the Ethics Commission report will not be prosecuted. Obviously, if some other violation of the criminal laws comes to my attention, as to which I am not now familiar, this would have to be evaluated at that time.
The district attorney admitted that the extortion charge involved in this appeal was one of the subjects included in his letter to Edwards' attorney.
The district attorney stated that after reaching the agreement with Edwards he received notice that Edwards had resigned his position as constable and had withdrawn his name from candidacy for reelection. Subsequently, the grand jury decided to investigate Edwards on its own initiative. During the course of that investigation the district attorney explained to the grand jury the agreement he had reached with Edwards and the fact that Edwards had resigned his position as constable in reliance on that agreement.
*1086 Although the district attorney claimed to be acting in good faith, he at no time motioned the trial court to enter a nolle prosequi. Edwards' motion to quash the indictment was overruled and he was subsequently tried and found guilty of extortion.
In this appeal we are asked to decide the propriety and legal consequences of the agreement between the district attorney and Edwards. We begin our inquiry with reference to § 99-15-53 Miss. Code Ann. (1972). That section reads:
A district attorney shall not compromise any cause or enter a nolle prosequi, either before or after indictment found, without the consent of the court; and, except as provided in the last preceding section, it shall not be lawful for any court to dismiss a criminal prosecution at the cost of the defendant, but every cause must be tried, unless dismissed by consent of the court.
Under the above quoted statute the district attorney clearly lacked the authority to compromise Edwards' prosecution. That conclusion alone cannot settle the issues raised in this appeal for there is more involved here than a promise to compromise the prosecution. Here, in addition to the promise, we also have affirmative acts on the part of the defendant in reliance upon that promise.
In Salter v. State, 387 So.2d 81 (Miss. 1980), we held: "The state, whether it be through the prosecutor, the trial judge, or both, is bound by its plea bargain agreement with a defendant who pleads guilty pursuant to the agreement." 387 So.2d at 84. We there held that the state was bound by its agreement with Salter to nolle pros eight indictments against Salter after he plead guilty to two others. The integrity of the state's law enforcement and prosecutorial powers is seriously impuned by any lack of good faith in complying with plea bargaining agreements. In another context in Wiley v. State, 449 So.2d 756 (Miss. 1984), we held that the means by which we select and impose punishment "must not be tainted for they then become unjust and we surrender the very mandate which empowers us to pass judgment." 449 So.2d at 763. We face the same dilemma when the state fails to exercise good faith in compliance with a plea bargaining agreement.
In the instant case the district attorney never moved to nolle pros. Complete good faith on his part would have required such a motion which would, of course, been subject to the trial court's discretion under § 99-15-53. Nevertheless, we are of the opinion that Edwards' motion to quash the indictment presented the trial court with the opportunity to ratify the agreement as our decision in Salter required. This was not an executory agreement. Edwards had already surrendered his office as constable and withdrawn his name from candidacy for reelection in complete compliance with the agreement with the district attorney. In light of Edwards' detrimental reliance on the agreement, we are compelled to hold that the circuit court abused its discretion in not quashing the indictment and thereby forcing the state to comply with its obligation under the agreement. Salter, supra. See also Boyington v. State, 389 So.2d 485 (Miss. 1980). Certainly we are not holding that the trial court must ratify every agreement between the state and a criminal defendant. That decision remains a function of the court's sound discretion.
Based on all of the foregoing, Ray Edwards' conviction of extortion, the crime which was the subject of his agreement with the district attorney, is hereby reversed and he is discharged.
REVERSED AND APPELLANT DISCHARGED.
PATTERSON, C.J., WALKER and ROY NOBLE LEE, P.JJ., and HAWKINS, PRATHER, ROBERTSON, SULLIVAN and ANDERSON, JJ., concur.
