
213 Cal.App.3d 1214 (1989)
261 Cal. Rptr. 911
THE PEOPLE, Plaintiff and Respondent,
v.
GEORGE GILBERT AMES, Defendant and Appellant.
Docket No. F010934.
Court of Appeals of California, Fifth District.
September 7, 1989.
*1215 COUNSEL
John F. Schuck III, under appointment by the Court of Appeal, for Defendant and Appellant.
John K. Van de Kamp, Attorney General, Steve White, Chief Assistant Attorney General, Arnold O. Overoye, Assistant Attorney General, Michael J. Weinberger and Thomas Y. Shigemoto, Deputy Attorneys General, for Plaintiff and Respondent.
OPINION
STONE (W.A.), Acting P.J.
In People v. Williams (1981) 30 Cal.3d 470 [179 Cal. Rptr. 443, 637 P.2d 1029] the Supreme Court held that a court *1216 retains discretion under Penal Code section 1385 to dismiss a jury's finding of special circumstances in order to modify a sentence of life imprisonment without the possibility of parole. (30 Cal.3d at p. 490.) In this appeal we are called upon to determine whether a sentencing court retains discretion to strike a special circumstance which is part of a negotiated plea which the court had previously approved. As we will discuss, the court has no authority to alter the terms of an otherwise lawfully negotiated plea bargain once it has approved the agreement.

STATEMENT OF THE CASE AND PROCEEDINGS
An information charged appellant with the murder of a 93-year-old woman. The information also contained special circumstances allegations that the murder was committed in the course of attempted rape (Pen. Code, § 190.2, subd. (a)(17)(iii)) and attempted oral copulation (Pen. Code, § 190.2, subd. (a)(17)(vi)). After a preliminary hearing, appellant changed his initial plea of not guilty to a plea of guilty, in exchange for which the prosecution agreed not to seek the death penalty and to dismiss the special circumstance of attempted oral copulation. Defense counsel stated the terms of the plea agreement as follows: "Mr. Ames will plead guilty to the crime charged in the Information and admit the first special circumstance, and in return for that, the District Attorney's Office will not seek the death penalty which will set Mr. Ames' penalty at life without possibility of parole in state prison." The court referred the matter to the probation department for preparation of a presentence report and recommendation. At the sentencing hearing, the prosecution noted that two penalties were provided for the crime as charged and that one of the penalties, the death penalty, had been eliminated by the plea bargain. The court thereafter sentenced appellant to life in prison without the possibility of parole.

DISCUSSION
(1a) Appellant contends the parties mistakenly assumed that the penalty of life without the possibility of parole was set as a matter of law and that, contrary to this assumption, the sentencing court retained discretion pursuant to Penal Code section 1385[1] and People v. Williams, supra, 30 Cal.3d 470, to dismiss the special circumstance of attempted rape so that appellant could be eligible for parole. He argues that the court erred by failing to exercise its discretion.
*1217 Respondent contends the penalty was set by the terms of the plea bargain and pursuant to Penal Code section 1192.5[2] the court did not retain discretion to alter the terms of the agreement by dismissing the special circumstance which appellant admitted in return for the prosecution's agreement not to seek the death penalty.
(2) The imposition of sentence and exercise of discretion are fundamentally and inherently judicial functions. (People v. Navarro (1972) 7 Cal.3d 248, 258 [102 Cal. Rptr. 137, 497 P.2d 481].) While no bargain or agreement can divest the court of the sentencing discretion it inherently possesses (People v. Arbuckle (1978) 22 Cal.3d 749, 756 [150 Cal. Rptr. 778, 587 P.2d 220, 3 A.L.R.4th 1171]), a judge who has accepted a plea bargain is bound to impose a sentence within the limits of that bargain. (People v. Green (1982) 142 Cal. App.3d 207, 215 [192 Cal. Rptr. 146].) (3) "A plea agreement is, in essence, a contract between the defendant and the prosecutor to which the court consents to be bound." (People v. Shepeard (1985) 169 Cal. App.3d 580, 586 [215 Cal. Rptr. 401], disapproved on other grounds in People v. Martin (1986) 42 Cal.3d 437, 451, fn. 13 [229 Cal. Rptr. 131, 722 P.2d 905].) Should the court consider the plea bargain to be unacceptable, its remedy is to reject it, not to violate it, directly or indirectly. (People v. Green, supra, 142 Cal. App.3d at p. 215.) Once the court has accepted the terms of the negotiated plea, "[it] lacks jurisdiction to alter the terms of a plea bargain so that it becomes more favorable to a defendant unless, of course, the parties agree." (People v. Cardoza (1984) 161 Cal. App.3d 40, 45, fn. 4 [207 Cal. Rptr. 388].)
(1b) The prosecution in the case we now consider agreed not to seek the death penalty and to dismiss one of two special circumstances, in exchange for which appellant agreed to plead guilty to murder and to admit the special circumstance allegation. Regardless of whether the parties did or did not stipulate expressly to life in prison without the possibility of parole, the prosecution included the special circumstance as a term of the agreement in order to render appellant ineligible for parole. There is no other explanation for inclusion of this term in the bargain.
Appellant was advised he would be sentenced to life in prison without the possibility of parole as a consequence of admitting the special circumstance, and he indicated he understood. If the sentencing court were to dismiss the special circumstance, the dismissal would undermine an essential term of the agreement and provide appellant with a more favorable bargain than *1218 that agreed upon. That disposition is beyond the sentencing court's authority.
Appellant's reliance upon People v. Williams, supra, 30 Cal.3d 470, and its progeny (People v. Hamilton (1988) 45 Cal.3d 351 [247 Cal. Rptr. 31, 753 P.2d 1109], People v. Marsh (1984) 36 Cal.3d 134 [202 Cal. Rptr. 92, 679 P.2d 1033], People v. Lucev (1986) 188 Cal. App.3d 551 [233 Cal. Rptr. 222], and People v. George (1984) 157 Cal. App.3d 1053 [204 Cal. Rptr. 329]) is misplaced. In none of the cases cited by appellant had the court accepted a plea agreement which included in its terms the penalty to be imposed.[3]
(4) "As the People are held strictly to the terms of the plea bargain, the accused also must be held to his agreement." (People v. Masten (1982) 137 Cal. App.3d 579, 586 [187 Cal. Rptr. 515]; see also People v. Tucker (1986) 187 Cal. App.3d 295, 297 [231 Cal. Rptr. 671].)
(1c) In light of our holding that the court had no discretion to impose a sentence other than life in prison without the possibility of parole, we need not address the remaining issues appellant raises, namely, whether the record reveals sufficient reasons to justify striking the special circumstance and whether the prosecutor should be prevented from withdrawing from the plea bargain.
The judgment is affirmed.
Baxter, J., and Dibiaso, J., concurred.
A petition for a rehearing was denied September 22, 1989, and appellant's petition for review by the Supreme Court was denied December 7, 1989.
NOTES
[1]  Penal Code section 1385 provides that "[t]he judge or magistrate may, either of his or her own motion or upon the application of the prosecuting attorney, and in furtherance of justice, order an action to be dismissed...."
[2]  Penal Code section 1192.5 provides that when a plea agreement specifies the punishment and its terms are approved by the court, "the court may not proceed as to such plea other than as specified in the plea."
[3]  Although People v. Marsh, supra, 36 Cal.3d 134, involved a plea bargain, there was no agreement regarding the penalty to be imposed. Indeed, the court had a "wide range of sentencing choices short of imposing life imprisonment without possibility of parole." (Id. at p. 144.)
