
306 N.W.2d 769 (1981)
STATE of Iowa, Appellee,
v.
Clarence Gene WENZEL, Appellant.
STATE of Iowa, Appellee,
v.
Donald Edward WENZEL, Appellant.
Nos. 64603, 64604.
Supreme Court of Iowa.
June 17, 1981.
*770 Harry H. Smith and MacDonald Smith, Sioux City, and John J. Wolfe, Jr., Clinton, for appellants.
Thomas J. Miller, Atty. Gen., Lona Hansen, Asst. Atty. Gen., and Joseph S. Beck, Asst. Clinton County Atty., for appellee.
Considered by UHLENHOPP, P. J., and HARRIS, McGIVERIN, LARSON and SCHULTZ, JJ.
McGIVERIN, Justice.
May the trial court reject a plea agreement at time of sentencing even though the court had accepted the agreement when the defendant entered his guilty plea? We conclude the court can later reject the plea agreement when it allows defendant to withdraw his guilty plea. Therefore, we affirm.
Defendants Clarence and Donald Wenzel were charged by informations with rioting in violation of section 723.1, The Code 1979, in connection with a labor dispute. Pursuant to plea agreements, defendants entered pleas of guilty to the charges.
The terms of the plea agreements were that in exchange for the guilty pleas the State would recommend and the court would order that defendants receive deferred sentences. At both guilty plea proceedings the trial court stated that it accepted the plea agreement and advised the defendants that the court would embody in the judgment and sentence the disposition provided for in the plea agreement. Iowa R.Crim.P. 9(2), (3).
Both defendants were eligible for deferred sentences, sections 907.3, .4, and both presentence reports recommended that the court consider giving deferred sentences. However, on the day of sentencing, the court said that after reviewing the presentence reports and the plea agreements it decided to reject the agreements. After rejecting the plea agreements, the court allowed defendants to withdraw their guilty pleas.
We granted defendants' applications for discretionary review of the court's rejection of the plea agreements it had previously accepted. We consolidated the two cases on appeal and treat them as one.
Defendants contend that Iowa R. Crim. P. 9 does not permit a trial court to accept a plea agreement and then reject it at sentencing. They claim that we should order the court to specifically perform the agreements it had accepted. We conclude that rule 9 does not prohibit a court's rejection of a plea agreement and a defendant is not harmed as long as the court allows withdrawal of the plea.
Iowa R.Crim.P. 9(2) provides:
2. Advising court of agreement. If a plea agreement has been reached by the parties the court shall require the disclosure of the agreement in open court at the time the plea is offered. Thereupon, if the agreement is conditioned upon concurrence *771 of the court in the charging or sentencing concession made by the prosecuting attorney, the court may accept or reject the agreement, or may defer its decision as to acceptance or rejection until receipt of a presentence report.
Rule 9(2) gives a court three options regarding the plea agreement at the time the plea is offered if the agreement is conditioned on the court's acceptance. First, the court may accept the agreement and "inform the defendant that it will embody in the judgment and sentence the disposition provided for in the plea agreement" or a more favorable disposition. Iowa R.Crim.P. 9(3). Second, the court may reject the plea agreement and "afford the defendant the opportunity to then withdraw his or her plea." Iowa R.Crim.P. 9(4). Third, the court "may defer its decision as to acceptance or rejection until receipt of a presentence report." Iowa R.Crim.P. 9(2).
Rule 9 does not provide for the procedure used hereacceptance of the agreement at the time the plea is offered and then rejection at the time of sentencing with an opportunity to withdraw the plea. When a trial court is in doubt about whether to accept a plea agreement, the better practice, and the one contemplated by the rule, is to defer its decision until it has received the presentence report. Iowa R.Crim.P. 9(2). Although the rule does not contemplate the trial court's actions here, we do not conclude the rule prohibits the court from changing its initial decision to accept the plea agreement as long as there is no harm to defendant.
Trial courts have broad discretion in deciding whether to accept guilty pleas. Farley v. Glanton, 280 N.W.2d 411, 415 (Iowa 1979). A defendant has no constitutional right to have a plea accepted. Santobello v. New York, 404 U.S. 257, 262, 92 S.Ct. 495, 499, 30 L.Ed.2d 427, 433 (1971).
The purpose of rule 9 is to "bring into the open and codify plea agreements between the prosecution and the defense." 4 J. Yeager & R. Carlson, Iowa Practice: Criminal Law and Procedure § 1041 (1979). As long as defendant is not prejudiced by the trial court's rejection of the agreement and is allowed to withdraw the plea of guilty, we will not overturn the exercise of the court's discretion. The purpose of rule 9 is served if the agreement and the court's exercise of its discretion are part of the record.
We also cannot find any harm to the defendants in this case since they were allowed to withdraw their pleas. Cf. State v. Edwards, 279 N.W.2d 9, 11 (Iowa 1979); State v. Kuchenreuther, 218 N.W.2d 621, 624 (Iowa 1974) (State may not withdraw from plea agreement if defendant has detrimentally relied on it). Defendants claim that they have lost their rights against self-incrimination and to a speedy trial. We disagree. Any statements made during plea negotiations would not be admissible in any later criminal proceeding. Iowa R.Crim.P. 9(5); State v. Schomaker, 303 N.W.2d 129, 131 (Iowa 1981) ("Granting permission to withdraw a guilty plea implicitly assumes it shall not later be used against defendant."). Statements made to the presentence investigator are confidential and may be opened only on court order. § 901.4. Defendants waived speedy trial and did not urge any loss of speedy trial rights as a ground for requiring the court to keep its promise to accept the agreements.
Our review of the authorities does not uncover any rule that a trial court must specifically perform all plea agreements it has accepted. Where a prosecutor breaches an agreement, the remedy is either specific performance or withdrawal of the plea. Santobello, 404 U.S. at 263, 92 S.Ct. at 499, 30 L.Ed.2d at 433. However, the decision on which remedy to use is in the discretion of the court. Where the trial court does not follow a plea agreement it has accepted and, without prejudice to the defendant, allows him to withdraw the plea, there is no reversible error. See United States v. Thomas, 580 F.2d 1036, 1038 (10th Cir. 1978), cert. denied, 439 U.S. 1130, 99 S.Ct. 1051, 59 L.Ed.2d 92 (1979); United States ex rel. Selikoff v. Commissioner of Correction, 524 F.2d 650, 654 (2d Cir. 1975), cert. *772 denied, 425 U.S. 951, 96 S.Ct. 1725, 48 L.Ed.2d 194 (1976); United States ex rel. Elksnis v. Gilligan, 256 F.Supp. 244, 249 (S.D.N.Y.1966); ABA Standards, Pleas of Guilty §§ 2.1(a)(ii)(5), 3.3(b) (1968).
In summary, we hold the trial court's rejection of the plea agreements was not barred by rule 9 and was within the court's discretion. The trial court acted within its authority and defendants were not harmed by the ruling.
AFFIRMED.
