
644 P.2d 1329 (1982)
STATE of Hawaii, Plaintiff-Appellee,
v.
Alfred David COSTA, Defendant-Appellant.
No. 7874.
Supreme Court of Hawaii.
May 21, 1982.
*1330 Michael K. Tanigawa, Deputy Public Defender, Honolulu, on the brief, for defendant-appellant.
Keith M. Kaneshiro, Deputy Pros. Atty., Honolulu, on the brief, for plaintiff-appellee.
Before RICHARDSON, C.J., LUM and NAKAMURA, JJ., and OGATA and MENOR, Retired Justices, assigned by reason of vacancy.
PER CURIAM.
Defendant-appellant, Alfred David Costa (hereinafter appellant), appeals from an order of the First Circuit Court, entered in favor of the State of Hawaii, which denied appellant's motion to withdraw his plea of guilty. At issue is whether the terms of the plea agreement entered into by the State and appellant were breached by the State's filing a motion for mandatory imprisonment. For the reasons set forth below, we find that the trial court did not err in denying the motion to withdraw guilty plea. Accordingly, we affirm appellant's conviction.
Appellant was indicted on July 31, 1979, and charged with one count of murder and one count of attempted murder. Subsequently a plea agreement was negotiated between the parties wherein appellant *1331 would plead guilty as charged in exchange for the prosecution recommending that the maximum term to be imposed be twenty years, not life imprisonment. These terms were embodied in the guilty plea form. On January 24, 1980, pursuant to the plea agreement, appellant changed his plea to guilty as charged which was accepted by the trial court.
Thereafter, on March 27, 1980, the State filed a Motion for Mandatory Term of Imprisonment pursuant to HRS § 706-660.1.[1] Then, appellant filed a motion to withdraw guilty plea on May 7, 1980, contending that the State's motion breached the plea agreement. After a hearing on this matter, the trial court concluded that the State's motion for mandatory imprisonment did not breach the terms of the plea agreement.
Appellant was then sentenced to life imprisonment with the possibility of parole on the murder charge with a ten-year minimum term of imprisonment pursuant to HRS § 706-660.1. On the attempted murder charge, appellant was sentenced to twenty years with the possibility of parole after having served a ten-year minimum term pursuant to HRS § 706-660.1.
A defendant does not have an absolute right to withdraw a guilty plea. State v. Smith, 61 Haw. 522, 606 P.2d 86 (1980); Rule 32(d), H.R.P.P. Thus, on a motion to withdraw guilty plea, the trial court must determine whether the defendant presented fair and just reasons for his request and that the State has not relied upon the guilty plea to its substantial prejudice. State v. Jim, 58 Haw. 574, 574 P.2d 521 (1978). And this Court has held that prior to sentencing, when a defendant pleads guilty, it is within the discretion of the trial court to permit a withdrawal of the plea and absent a clear abuse of that discretion, appellate courts will not overturn such a decision. State v. Smith, supra; State v. Jim, supra; State v. Dicks, 57 Haw. 46, 49, 549 P.2d 727, 730 (1976); State v. McCoy, 51 Haw. 34, 449 P.2d 127 (1968). The defendant has the burden of establishing plausible and legitimate grounds for the withdrawal. State v. Jim, supra.
Appellant asserts that the basis for withdrawing the guilty plea is the State's breaching of the plea agreement by filing the motion for mandatory imprisonment pursuant to HRS § 706-660.1.
Santobello v. New York, 404 U.S. 257, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971), and State v. Waiau, 60 Haw. 93, 588 P.2d 412 (1978), mandate that the terms of a plea agreement which serve as the inducement or consideration for entering the plea must be fulfilled. In Santobello, where a prosecutor promised to make no recommendation as to sentencing in exchange for defendant changing his plea, but another prosecutor made a sentencing recommendation, the United States Supreme Court found that the latter act was a breach of the plea agreement. The Court held that a promise made by the prosecutor which is part of the plea bargain must be fulfilled by other prosecutors in the office. Accordingly, the case was remanded to the state court for appropriate disposition. Likewise, in Waiau, this Court held that a plea agreement was breached when under instruction of the trial court, the prosecution sought an extended term sentence which it had expressly agreed not to seek.
Unlike either Santobello or Waiau, the instant record shows that there was no breach of the bargain entered into between appellant and the State. The guilty plea *1332 form reduced to writing the terms of the agreement which state:[2]
8. I have not been promised any kind of deal or favor or leniency by anyone for pleading guilty, except that I have been told that the government has agreed as follows:
That the office of the Prosecuting Attorney will recommend that the maximum sentence imposed by the court should be 20 years and not life imprisonment.
The terms of this agreement reveal that the prosecution was not prohibited from seeking the mandatory term of imprisonment as authorized by law. The clear intent of this agreement was for the State to recommend only a maximum term of imprisonment, not a minimum term. Therefore, filing the motion for mandatory term of imprisonment did not breach the plea agreement, since the terms of the agreement did not foreclose pursuit of such an option by the State.
Moreover, at sentencing, the State fulfilled its promise to appellant and performed the terms of the agreement. The State made the following recommendation at sentencing:
Your Honor, the State would ask that for these hideous crimes that this Court impose a term of 20 years on Alfred Costa and also impose the sentence of 10 years mandatory minimum sentence of 10 years for the use of a firearm in the commission of the offenses.
We further note that the court is not obligated to abide by the terms agreed to by the parties. The court is empowered to sentence a defendant to the maximum term allowable by law. State v. Gumienney, 58 Haw. 304, 568 P.2d 1194 (1977).
We conclude that the trial court did not abuse its discretion in denying the motion to withdraw guilty plea. Appellant has not presented arguments which justify the withdrawal of the guilty plea.
Affirmed.
NOTES
[1]  Under HRS § 706-660.1, that statute mandates a mandatory minimum term of imprisonment whenever a firearm is used in the commission of a felony. Since murder is a Class A felony, the mandatory term of imprisonment would be ten years. A defendant sentenced under this provision is subject to parole only after the expiration of the mandatory term of imprisonment.
[2]  At the change of plea hearing, the terms of the agreement were represented to the court as follows:

THE COURT: Is there a negotiated plea in this matter?
MR. LAU: Yes, your Honor.
THE COURT: What is that?
MR. LAU: At the time of sentencing, the recommendation by the prosecuting attorney's office would be that there be a maximum sentence of twenty years. They would be asking as the maximum sentence twenty years and not life imprisonment.
THE COURT: Mr. Kaneshiro, is that your understanding?
MR. KANESHIRO: Yes, your Honor. That's our end of the deal.
THE COURT: All right. Alfred, you understand that the agreement reached between you, through your attorney, and the Prosecutor is that the Prosecutor will not recommend life imprisonment, but recommend that you be sentenced to twenty years?
THE DEFENDANT: Yes, your Honor.
