
242 S.E.2d 704 (1978)
STATE ex rel. Ross A. GRAY, Jr.
v.
Hon. James G. McCLURE, Judge, etc., et al.
No. 13937.
Supreme Court of Appeals of West Virginia.
April 7, 1978.
*705 McCamic & McCamic, Jeremy C. McCamic, William E. Parsons, II, Wheeling, for relator.
Richard E. Hardison, Deputy Atty. Gen., Charleston, for respondents.
McGRAW, Justice:
The defendant was indicted in Ohio County for rape and sodomy. An agreement was reached between the defendant and Assistant Prosecuting Attorney A. Dana Kahle whereby the defendant would plead guilty to sodomy and be given credit for time served in the Ohio County jail on these charges if the prosecution would enter a nolle prosequi to the rape charge. The defendant desired the bargain on two conditions. The first was that he be permitted to exhaust his remedies on a question raised on the sufficiency of the warrant, and the second was that his counsel be permitted to interview the prosecuting witness in the presence of the prosecuting attorney.
Assistant Prosecuting Attorney Kahle testified that this accord was approved by the Prosecuting Attorney, Louis Johns. Mr. Johns swore by affidavit that Mr. Kahle, as Assistant Prosecuting Attorney, "had complete control, discretion and authority to enter into and accept any plea bargain agreement he saw fit to make with any defendant whose case he was handling." The Honorable George L. Spillers, the original presiding trial judge in this case, swore by affidavit that Mr. Kahle presented to him for his approval the plea bargain agreement as set out above and further that he, as Judge of the Circuit Court, orally approved the agreement as offered and transmitted his approval to Mr. Kahle and to Mr. Jeremy McCamic, counsel for the defendant.
Subsequently, a new prosecuting attorney, Dennis Naum, was elected and the case was transferred to Judge James G. McClure. The prosecuting attorney now refuses to honor Mr. Kahle's agreement with the defense and the presiding judge has refrained from enforcing it. Petitioner seeks a writ of mandamus compelling the new judge and prosecutor to honor the plea bargain approved by their predecessors.
The specific question addressed here is whether a prosecuting attorney must honor an inchoate plea bargain agreement made by his predecessor in office.
Plea bargaining has been a part of West Virginia law for at least forty-six years. State v. Ward, 112 W.Va. 552, 165 S.E. 803 (1932) is cited by federal and state jurisdictions as a leading case on plea bargain agreements. In that case fourteen indictments for banking law violations were returned against the defendant who subsequently agreed to plead guilty to one indictment and to assist the prosecution in return for a discharge from further prosecution under the other thirteen indictments. After this plea bargain was approved by the prosecuting attorney, the State Banking Commissioner, and the court, the defendant entered a plea of guilty to the one indictment and was sentenced. A nolle prosequi was entered in the remaining thirteen indictments. Upon release from the penitentiary, however, the defendant was reindicted on one of the charges discharged under the plea bargaining agreement. A special plea was interposed to this indictment, but a demurrer to the plea was sustained by the circuit court and its sufficiency was certified to this Court. This Court, citing public policy grounds, declared the special plea sufficient and noted:
Promises of immunity from prosecution made to a witness by a prosecuting officer with the consent of the court are justified on the ground of public policy.

*706 ... The courts treat such promises as pledges of the public faith... The promise alleged in the instant plea (that of the prosecuting attorney with the approval of the court) is equally a pledge of the public faith which in our opinion should be duly kept. Id. at 554-55, 165 S.E. at 804-05.
The United States Supreme Court addressed a related issue in Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971). There the defendant, who was indicted on two felony counts, pleaded guilty to a lesser included offense after the prosecuting attorney agreed to make no recommendations to the court respecting the imposition of sentence. The trial court accepted the guilty plea, but at the subsequent sentencing hearing a new prosecuting attorney appeared and argued over objections for the imposition of the maximum sentence, apparently unmindful of his predecessor's agreement. The trial judge imposed the maximum sentence, and the defendant appealed.
The court, characterizing this as an "unfortunate lapse in orderly prosecutorial procedures," held that "when a plea 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 promise must be fulfilled... The staff lawyers in a prosecutor's office have the burden of `letting the left hand know what the right hand is doing' or has done." Id. at 262, 92 S.Ct. at 499, 30 L.Ed.2d at 433. The judgment was vacated, and the case was remanded to the state courts to determine the appropriate relief (e. g. resentencing by new judge with the prosecution making no recommendation, withdrawing of guilty plea, etc.).
Permitting the prosecution to breach a plea bargaining agreement has been characterized as "extremely detrimental to the administration of justice if it should be established." People v. Siciliano, 185 Misc. 149, 152, 56 N.Y.S.2d 80, 82 (1945). Other courts treat the plea bargaining agreement as a contract. E. g., State v. Ashby, 43 N.J. 273, 204 A.2d 1 (1945); Mallon v. State, 49 Wis.2d 185, 181 N.W.2d 364 (1970). Further jurisdictions following the majority rule include Shields v. State, Del.Super., 374 A.2d 816 (1977); Davis v. State, 308 So.2d 27 (Fla.1975); People v. Baron, 130 Ill.App.2d 588, 264 N.E.2d 423 (1970); State v. Hingle, 242 La. 844, 139 S.E.2d 205 (1961); People v. Ledrow, 53 Mich.App. 511, 220 N.W.2d 336 (1974); State v. Tourtellotte, 88 Wash.2d 579, 564 P.2d 799 (1977); Shavie v. State, 49 Wis.2d 379, 182 N.W.2d 505 (1971).
In Brooks v. Narick, No. 13893 (W.Va. filed Apr. 4, 1978), this Court considered another facet of the problem presented here. In that case the defendant, after being indicted for delivery of marijuana, entered into a plea bargain and agreed to (1) plead guilty, (2) go to a correctional center for a sixty-day evaluation and diagnostic study, (3) begin his confinement on July 12, 1976, and (4) pay court costs of $656.90. The State's agreement to drop all charges pending against him in the county and recommend probation was contingent upon a favorable pre-sentence report. If the report was unfavorable, the State was to recommend that the court take whatever action it felt appropriate. Defendant then pleaded guilty and was returned to court for sentencing. Both the court and the prosecutor considered the report to be neither favorable nor unfavorable, so counsel's motion for probation was denied when an assistant prosecuting attorney affirmatively opposed it. Defendant moved to withdraw his guilty plea on the grounds that the government had breached the agreement and the motion was granted. Then seven new indictments were returned against him. He moved the court to specifically enforce the plea bargain by dismissing the seven new indictments. The court overruled both motions and denied defendant's motion to reconsider. The defendant petitioned for prohibition. This Court held in syllabus point 2 that:
Where a defendant, having performed his part of a plea bargain is coerced by the government's violation of the bargain into withdrawing his guilty plea, he has *707 the option of standing trial on the not guilty plea and suffering whatever other consequences may result from his being in the original position, or reinstating his guilty plea and requiring specific performance by the government of the bargain.
The case at bar, however, lacks a key element contained in the cases binding the State to the terms of a plea agreement. The defendant in all the cases cited has either pleaded guilty or has otherwise acted to his detriment.
The rule we follow, consistent with the cases cited above, is that a prosecuting attorney or his successor is bound to the terms of a plea agreement once the defendant enters a plea of guilty or otherwise acts to his substantial detriment in reliance thereon. Shields v. State, supra. In such cases the prosecutor pledges the public faith, and this pledge must be honored by the State. If the defendant has not yet acted to his detriment, the State is not bound to the terms of an inchoate plea agreement.
In the present case, the record does not show that the defendant has pleaded guilty or relied to his substantial detriment upon the agreement. Absent such a showing by the defendant, the State is not bound to execute an inchoate plea agreement. The issue of whether the defendant acted to his detriment was not developed by the parties in the underlying proceeding. For this reason we are not able to determine whether the State is required to honor the purported bargain. The defendant is entitled to develop this point before the circuit court which can then make its determination.
Therefore, while the relator is not entitled to the relief prayed for in his petition and such relief is hereby denied, he is entitled to a hearing consistent with the principles set forth above and therefore a writ should be molded accordingly, and as molded is awarded.
Writ as molded awarded.
