Opinion
This case presents a question closely related to the issue involved in In re Moser, ante, page 342 [24 Cal.Rptr.2d 723, 862 P.2d 723]. *370In Moser, a criminal defendant who, pursuant to a plea agreement, pleaded guilty to second degree murder, sought to have his conviction set aside on habeas corpus on the ground that the trial court, in advising him of the direct consequences of his proposed plea, erroneously advised him concerning the length of his potential term of parole. In the present case, a defendant who, pursuant to a plea agreement, pleaded guilty to assault with intent to commit rape, seeks to have his guilty plea set aside on appeal on the ground that the trial court, in advising him prior to the entry of the plea, failed to inform him that upon conviction of this offense he would be required to register as a sex offender pursuant to Penal Code section 290.1
As we explained in Moser, “a defendant who has pleaded guilty after receiving inadequate or erroneous advice from the trial court with regard to the potential consequences of a plea generally is entitled to obtain relief only by establishing that he or she was prejudiced by the erroneous advice, i.e., by establishing . . . that but for the trial court’s erroneous advice . . . , the defendant would not have entered the guilty plea.” (Moser, supra, ante, at p. 345.) In the present case, because the record on appeal fails to establish that defendant would not have entered his guilty plea had he been advised of the mandatory sex offender registration requirement, and also fails to establish that imposition of the registration requirement violates the terms of defendant’s plea agreement, we conclude that the Court of Appeal erred in holding that defendant was entitled to relief, and therefore reverse the judgment of the Court of Appeal.
I. Factual and Procedural Background •
On May 12, 1990, Bakersfield police officers responded to a request for assistance concerning an injured minor, Donna T., who was 16 years of age. The police subsequently learned that the minor had been attacked in the bathroom of a friend’s residence, that a man of defendant’s description had been observed in the vicinity of the crime, and that defendant’s fingerprints were found at the scene.
In July 1990, police officers contacted defendant at the Kern County jail, where he was in custody following his arrest on unrelated charges. He was placed under arrest in connection with the assault on Donna T., and subsequently was charged by information as follows: count I—assault with intent to commit rape (§§ 220, 261, subd. (a)(2)); count II—attempted rape (§§ 261, subd. (a)(2), 664) with the intentional infliction of great bodily injury (§ 1203.075); count III—burglary (§§ 459, 460); and count IV— battery resulting in serious bodily injury (§ 243, subd. (d)). The information *371also alleged that defendant previously had been convicted of a serious felony (§ 667, subd. (a)), had served a prior prison term (§ 667.5, subd. (b)), and (as to counts I, II, and III) had inflicted great bodily injury (§ 12022.7).
Following the preliminary hearing, defendant was held to answer on the above charges, thereafter entering a plea of not guilty and denying the additional allegations.
In September 1990, defendant withdrew his plea of not guilty and entered a plea of guilty to count I, assault with intent to commit rape, also admitting the allegations of intentional infliction of great bodily injury, prior serious felony conviction, and prior service of a prison term. Defendant’s guilty plea specifically was conditioned upon dismissal of the attempted rape, burglary, and battery charges and imposition of a state prison sentence not to exceed thirteen years (based upon a middle term sentence of four years for the assault with intent to commit rape (§ 220), a consecutive three-year enhancement for the great bodily injury allegation (§ 12022.7), a consecutive five-year enhancement for the prior serious felony allegation (§ 667, subd. (a)), and a consecutive one-year enhancement for the prior prison term allegation (§ 667.5, subd. (b)).2
Because it was conditioned upon a sentence not to exceed 13 years and dismissal of the attempted rape, burglary, and battery charges, the plea offered substantial benefits to defendant.
Prior to accepting defendant’s guilty plea, the trial court fully and accurately advised defendant of his constitutional rights. The court also accurately advised defendant as to the length of the parole term he would face *372following his release from prison, but failed, however, to advise defendant that his plea of guilty to the offense of assault with intent to commit rape would require that he register as a sex offender pursuant to section 290.3
The trial court inquired whether defendant’s plea was freely and voluntarily made and whether there was a factual basis for the plea pursuant to section 1192.5 (but improperly failed to advise defendant of his right to withdraw the plea in the event the trial court at the time of sentencing withdrew its approval of the terms of the plea agreement). (§ 1192.5.)4 The court also inquired of defendant whether anyone had promised him anything other than the stated terms of the plea agreement, to which defendant responded in the negative.
Upon the trial court’s acceptance of the plea, the People, pursuant to the terms of the plea agreement, moved to dismiss the attempted rape, burglary, and battery charges, conditioned upon the plea remaining in effect.
In October 1990, the probation officer filed her report recommending that probation be denied, that defendant be sentenced to a prison term totaling 15 years (including the 6-year upper term for the assault, plus enhancements), and that defendant be required to register as a sex offender pursuant to section 290.
At the sentencing hearing conducted 11 days later, the trial court, having reviewed the probation officer’s report and defendant’s prior criminal record, observed that “[t]he [sentencing] choice. . . in this case ... is between the [four-year] mid[dle] term (described at the change of plea hearing) and the [six-year] upper term” (recommended by the probation officer) for defendant’s assault with intent to commit rape. “The low term is *373not a viable alternative based on the facts and circumstances of this case as well as the circumstances obviously in aggravation that have been cited . . . . [¶] The Court feels that under the circumstances, however, that the plea bargain is appropriate and the middle term with the enhancements for the prior convictions is an appropriate sentence in that regard. [¶] And that’s what the Court is going to do.”
Prior to imposing sentence, the trial court invited defense counsel to comment. Although defense counsel raised specific challenges to other aspects of the probation officer’s report, she did not challenge the recommendation set forth in the probation officer’s report that defendant be required to register as a sex offender. After sentencing defendant to a prison term totaling 13 years, the trial court declared, “The defendant is also instructed to register as required under the provisions of Section 290 of the Penal Code.” Defendant did not interpose an objection to the registration requirement, nor did he request permission to withdraw his plea of guilty in the event the registration requirement were to be imposed.
Defendant filed a timely notice of appeal in propria persona, citing numerous grounds pertaining to his initial detention and arrest, and again failing to challenge the registration requirement imposed at sentencing.5 Six months after filing his notice of appeal, defendant filed in the Court of Appeal an “Application to Amend Notice of Appeal” which added, as a basis for the appeal, the trial court’s imposition of the sex offender registration requirement. In this amended notice, defendant asserted that, had he been advised of the registration requirement, he would not have entered his plea of guilty. The Court of Appeal, in granting the application to amend the notice of appeal, cited rule 41(c) of the California Rules of Court (“. . . Failure of the adverse party to serve and file written opposition . . . may be deemed a consent to the granting of [the] motion.”). In his briefing in the Court of Appeal, defendant contended that the judgment should be reversed because the trial court failed to advise him at the change of plea hearing that registration as a sex offender was a direct consequence of his guilty plea. The People argued in response that the trial court’s error was harmless.
Characterizing the trial court’s error as a “violation of a plea bargain,” the Court of Appeal distinguished our decision in People v. Walker (1991) 54 *374Cal.3d 1013 [1 Cal.Rptr.2d 902, 819 P.2d 861], holding that because the registration requirement does not lend itself to a remedy of substantial specific performance as was fashioned with regard to the challenged restitution fine in 'Walker, the defendant in the present case must be given the opportunity to withdraw his plea. The Court of Appeal therefore remanded the case to the trial court to allow defendant to reaffirm the plea agreement, including the sex offender registration requirement, or, alternatively, to withdraw his plea. The People sought review in this court, urging that the proper remedy was to remand the matter to the trial court for the purpose of reopening plea negotiations.
II. Discussion
As in Moser, supra, ante, at page 342, we are asked in the present case to determine what remedy, if any, should be afforded in view of the trial court’s failure to provide the defendant with complete and accurate advice concerning the direct consequences of a guilty plea, prior to accepting the plea.
Defendant characterizes the trial court’s error as a failure to advise him of the direct consequences of his plea. (See In re Birch (1973) 10 Cal.3d 314 [110 Cal.Rptr. 212, 515 P.2d 12] [judgment vacated where trial court failed to advise an unrepresented defendant of the sex offender registration requirement prior to accepting the defendant’s plea of guilty to a charge of committing lewd or dissolute conduct].) Defendant also contends that, because the trial court’s imposition of the sex offender registration requirement amounts to a lifetime punishment that was not included in the parties’ plea agreement, it constitutes a violation of that agreement, entitling defendant to withdraw his plea. (See § 1192.5; People v. Walker, supra, 54 Cal.3d 1013, 1024 [“When a guilty plea is entered in exchange for specified benefits such as the dismissal of other counts . . . , both parties, including the state, must abide by the terms of the agreement. The punishment may not significantly exceed that which the parties agreed upon.”]; see also In re Reed (1983) 33 Cal.3d 914, 920-922 [191 Cal.Rptr. 658, 663 P.2d 216] [sex offender registration is punitive in nature].)6
The People concede defendant is entitled to obtain relief, but contend that allowing him to withdraw his plea improperly would ignore the constitutional interests of the victim (Cal. Const., art. I, § 28, subd. (a)) and that, in *375view of these interests, notions of fairness and a balancing of interests demand that the People be afforded an opportunity to help shape the remedy in this case. Thus, the People urge remand of this case to the trial court to enable it, after additional briefing and argument, “to determine whether withdrawal of the plea, renegotiation, specific performance, or voluntary acceptance of the plea by defendant (with the addition of the registration requirement), would be the most appropriate remedy.”
As explained below, we reject the remedy proposed by each party as inconsistent with our analysis in Moser. Although, unlike Moser, the present case reaches us on direct appeal rather than on habeas corpus, and involves failure to advise of a registration requirement rather than erroneous advice concerning the length of the applicable term of parole, both cases involve defendants who, following imposition of sentence, are attempting to set aside a consummated plea agreement, based upon a trial court’s error in advising the defendant of certain consequences of a plea of guilty. In view of this similarity, our analysis in Moser is instructive.
“In analyzing the parties’ contentions, we adhere to the framework set forth in our decision in People v. Walker, supra, 54 Cal.3d 1013, 1019-1020, where we explained that resolution of the issues presented ‘requires consideration of two related but distinct legal principles. (See People v. Glennon (1990) 225 Cal.App.3d 101, 104 [276 Cal.Rptr. 1].) [¶] The first principle concerns the necessary advisements whenever a defendant pleads guilty, whether or not the guilty plea is part of the plea bargain. The defendant must be admonished of and waive his constitutional rights. (Boykin v. Alabama (1969) 395 U.S. 238 [23 L.Ed.2d 274, 89 S.Ct. 1709]; In re Tahl (1969) 1 Cal.3d 122 [81 Cal.Rptr. 577, 460 P.2d 449].) In addition, and pertinent to this case, the defendant must be advised of the direct consequences of the plea. (Bunnell v. Superior Court (1975) 13 Cal.3d 592, 605 [119 Cal.Rptr. 302, 531 P.2d 1086].) [¶] The second principle is that the parties must adhere to the terms of a plea bargain. (People v. Mancheno (1982) 32 Cal.3d 855, 860 [187 Cal.Rptr. 441, 654 P.2d 211].) [fl] In any given case, there may be a violation of the advisement requirement, of the plea bargain, or of both. Although these possible violations are related, they must be analyzed separately, for the nature of the rights involved and the consequences of a violation differ substantially. Indeed, much of the confusion engendered by the appellate decisions on this issue results from a blurring of the distinction between these principles.’ ” (Moser, supra, ante, at pp. 350-351.)
Thus, we first consider whether the trial court’s failure to advise defendant regarding the sex offender registration requirement constituted a violation of *376the court’s obligation to inform him of the direct consequences of his plea of guilty, and, if so, whether such a violation entitles him to the relief he now seeks. Thereafter, we consider the separate question whether imposition of the sex offender registration requirement constituted a violation of the parties’ plea agreement.
A. Advisement of the consequences of the plea
Our initial inquiry, whether the trial court’s failure to advise defendant of the sex offender registration requirement violated its obligation to inform him of the direct consequences of the plea, easily is answered. In Bunnell v. Superior Court (1975) 13 Cal.3d 592 [119 Cal.Rptr. 302, 531 P.2d 1086], we cited the registration requirement contained in section 290 as an example of the plea consequences of which a defendant must be informed. {Bunnell, supra, at p. 605 [“In all guilty plea and submission cases the defendant shall be advised of the direct consequences of conviction such as the permissible range of punishment provided by statute, registration requirements, if any (e.g., § 290 ...)... .”]; see also In re Birch, supra, 10 Cal.3d 314, 322 [registration requirement constitutes a “grave and direct consequence of [the defendant’s] guilty plea; in the absence of counsel the responsibility for such advice rested with the court”].)7 We therefore conclude that Bunnell error has occurred where the trial court fails to advise a defendant that, as a consequence of his or her plea of guilty to any one of the offenses enumerated in section 290, the defendant must register as a sex offender.8
Having found such error, we next must determine whether it entitles defendant to the relief he now seeks. Defendant claims that, in view of the *377trial court’s omission, he is entitled to withdraw his plea of guilty. For the reasons that follow, we reject defendant’s contention.
In People v. Walker, supra, 54 Cal.3d 1013, we held that absent a timely objection, a defendant waives a claim of error as to a trial court’s misadvisement concerning the consequences of a guilty plea. “ ‘The purpose of the general doctrine of waiver is to encourage a defendant to bring errors to the attention of the trial court, so that they may be corrected or avoided and a fair trial had. ...[¶] In this case, the record reflects that defense counsel was familiar with the probation report. Had the recommendation that defendants be ordered to pay a restitution fine come as a genuine surprise, it would have been a simple matter to bring the issue to the attention of the trial court.’ ” (Id., at p. 1023, quoting People v. Melton (1990) 218 Cal.App.3d 1406, 1409 [267 Cal.Rptr. 640].)
Applied to the present case, Walker supports a determination that defendant waived his claim of error by failing at the sentencing hearing to interpose a timely objection to the registration requirement. Defendant’s counsel was aware of the probation officer’s report, filed 11 days prior to the sentencing hearing, recommending that defendant be ordered to register as a sex offender. In the context of her objections at the sentencing hearing to other matters contained in the probation officer’s report, defense counsel readily could have challenged the registration recommendation. (See, e.g., People v. Walker, supra, 54 Cal.3d at p. 1030 [“whenever possible, any error in taking the plea should be brought to the attention of the court at sentencing so that it can be addressed expeditiously”]; see also People v. Victorian (1992) 2 Cal.App.4th 954, 957 [4 Cal.Rptr.2d 460] [judgment reversed where, prior to sentencing, defendant unsuccessfully moved to withdraw his guilty plea based upon the trial court’s misadvisement as to the maximum length of his parole term].) Moreover, when the trial court formally imposed the registration requirement later in the sentencing hearing, the defense had a second opportunity to challenge it but failed to do so. Under these circumstances, we conclude defendant waived any claim of prejudice arising from the trial court’s error. (Cf. Moser, supra, ante, at p. 352, fn. 8 [no waiver where trial court’s imposition of sentence was not at variance with its erroneous advice at earlier proceeding, and nothing in the record suggested that defendant should have been aware of the trial court’s error].)
Defendant contends, however, that under People v. Walker, supra, 54 Cal.3d 1013, his failure at the sentencing hearing to object to the imposition of the registration requirement should not operate as a waiver of the misadvisement error because the trial court, at the change of plea hearing, failed to *378advise him, pursuant to section 1192.5, of his right to withdraw his plea in the event he was sentenced to a punishment more severe than that contemplated by the plea agreement. In Walker, however, we explained that a trial court’s failure to provide a section 1192.5 admonition permits a defendant to complain of an asserted violation of the plea agreement despite the absence of any objection at the sentencing hearing. (54 Cal.3d at pp. 1024-1026.) We did not suggest that the trial court’s failure to give the section 1192.5 advisement would excuse the defendant from objecting to the imposition of a direct consequence of the guilty plea, as to which he simply was not advised by the trial court at the plea proceedings. (54 Cal.3d at p. 1023.)
Furthermore, the record before us fails to establish that defendant was prejudiced by the trial court’s failure to advise him of the registration requirement. Although defendant’s amended notice of appeal contains an assertion by defendant that, but for the trial court’s omission, he would not have pleaded guilty, that extrajudicial assertion is not a proper component of the record on appeal. Because the record of the trial court proceedings contains no evidence (nor even an assertion) concerning the bearing of a registration requirement upon defendant’s decision to plead guilty, the prosecution never has had an opportunity to contest the assertion made by defendant on appeal, and the trial court had no occasion to pass upon the veracity of defendant’s present claim. Indeed, to the extent the trial court record sheds any light upon the issue before us, defendant’s failure to object at the sentencing hearing suggests that he did not consider the registration requirement significant in the context of his plea agreement.
As we reiterated in Moser, supra, ante, at page 352, “[A] defendant (even on direct appeal) is entitled to relief based upon a trial court’s misadvisement only if the defendant establishes that he or she was prejudiced by the misadvisement, i.e., that the defendant would not have entered the plea of guilty had the trial court given a proper advisement.” (Ibid., citing People v. Walker, supra, 54 Cal.3d at pp. 1022-1023; see also People v. McMillion (1992) 2 Cal.App.4th 1363, 1370 [3 Cal.Rptr.2d 821]; People v. Wagoner (1979) 89 Cal.App.3d 605, 611-612 [152 Cal.Rptr. 639].) Although defendant alleges that had he properly been advised, he would not have entered his plea of guilty, there is nothing in the record on appeal to support this contention. Thus, we conclude defendant has failed to meet his burden of establishing prejudice.
B. Violation of the plea agreement
Defendant’s failure to establish that he is entitled to relief, based upon the trial court’s failure at the change of plea hearing to advise him of *379the sex offender registration requirement, does not end our inquiry. As explained in Moser, we also must determine whether the trial court’s error constitutes a violation of the parties’ plea agreement, entitling defendant to some form of relief. (Moser, supra, ante, at p. 351.)9 The relevant principles underlying the importance of such an inquiry are set forth in Moser (ante, at pp. 353-354) and need not be repeated here.
As explained above, prior to accepting defendant’s plea of guilty, the trial court fully recited on the record the terms of the parties’ plea agreement, observing that defendant had agreed to plead guilty to the charge of assault with intent to commit rape and admit the enhancement allegations, in exchange for the People’s agreement to dismissal of the attempted rape, burglary, and battery charges and corresponding enhancements, and the imposition of a maximum state prison term of 13 years. (See fn. 2, ante, and accompanying text). When the trial court inquired of defense counsel, and of defendant personally, whether each of them understood the plea agreement to embrace the terms identified by the court, each responded affirmatively. The statutory requirement of sex offender registration was not mentioned by the parties or by the court at the change of plea hearing.
Unlike the petitioner in Moser, supra (see ante, p. 357), defendant does not suggest that the challenged element of his sentence was a subject of negotiation (or even discussion) during the plea-negotiation process, or that the prosecutor made any promises or inducements relevant to the challenged element. (Cf. Santobello v. New York (1971) 404 U.S. 257, 262 [30 L.Ed.2d 427, 433, 92 S.Ct. 495] [“[W]hen 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.”].) Thus, we conclude that the trial court’s omission, at the change of plea hearing, of advice regarding defendant’s statutory obligation to register as a sex offender did not transform the court’s error into a term of the parties’ plea agreement.
Our decision in People v. Walker, supra, 54 Cal.3d 1013, is not helpful to defendant’s argument. As we explained in Moser, supra (see ante, pp. 356-357): “In Walker, the offense to which the defendant had agreed to plead guilty carried a potential seven-year sentence and a $10,000 punitive fine, but under the negotiated plea agreement the defendant was to receive a five-year term of imprisonment and no punitive fine. At the subsequent *380sentencing hearing, the trial court imposed the agreed-upon five-year sentence but also a substantial ($5,000) restitution fine. [¶] In concluding that the imposition of such a substantial fine constituted a violation of the plea agreement in Walker, we implicitly found that the defendant in that case reasonably could have understood the negotiated plea agreement to signify that no substantial fine would be imposed. Moreover, in reaching this conclusion, we reasoned that, because the amount of an appropriate restitution fine imposed upon a defendant could vary significantly depending upon the specific facts of a given case, ‘the restitution fine should generally be considered in plea negotiations.’ (People v. Walker, supra, 54 Cal.3d at p. 1024.)”
By contrast, the sex offender registration requirement challenged in the present case is, like the parole term in Moser, a statutorily mandated element of punishment for the underlying offense. (§§ 290, 290.1; see also Barrows v. Municipal Court, supra, 1 Cal.3d at p. 825 [section 290 “applies automatically when a person is convicted of one of the enumerated offenses”]; People v. Saunders (1991) 232 Cal.App.3d 1592, 1597 [284 Cal.Rptr. 212] [where one is guilty of assault with intent to commit rape, registration is required “under the plain language of the statute”]; People v. Monroe, supra, 168 Cal.App.3d 1205, 1209 [section 290 “leaves no discretion in the trial judge to not require registration if one or more of the listed violations occurs”].) Thus, unlike the amount of a restitution fine, sex offender registration is not a permissible subject of plea agreement negotiation; neither the prosecution nor the sentencing court has the authority to alter the legislative mandate that a person convicted of assault with intent to commit rape shall register as a sex offender pursuant to the provisions set forth in section 290. Accordingly, Walker does not support defendant’s claim.
The contrary conclusion reached by the dissenting opinion of Justice Mosk is based entirely upon its inaccurate characterization of the sex offender registration requirement as a punishment added “after the [plea] bargain was struck.” (Dis. opn. of Mosk, J., post, at p. 382.) Because the registration requirement is statutorily mandated for every person convicted of assault with intent to commit rape, that requirement was an inherent incident of defendant’s decision to plead guilty to that offense and was not added “after” the plea agreement was reached. The record does not suggest that the prosecution misled or deceived defendant; no promise or suggestion ever was made that the mandatory registration requirement would not be imposed.
As we have explained above, the trial court, in advising defendant of the direct consequences of his guilty plea, should have informed him of the *381registration requirement. In view of the trial court’s omission, defendant would have been entitled to relief had he interposed a timely objection to imposition of the registration requirement, and had he demonstrated he would not have pleaded guilty in the event he had been advised properly with regard to this consequence. As is made clear by the United States Supreme Court’s decision in United States v. Timmreck (1979) 441 U.S. 780, 784 [60 L.Ed.2d 634, 638-639, 99 S.Ct. 2085] (discussed in our companion decision in Moser, supra, ante, pp. 354-355), however, the circumstance that a statutorily mandated consequence of a guilty plea is not embodied specifically within the terms of a plea agreement does not signify that imposition of such a consequence constitutes a violation of the agreement. Accordingly, we disagree with Justice Mosk’s assertion that defendant’s right to due process of law has been abridged.
III. Conclusion
We conclude that, although the trial court erred in failing to advise defendant that his plea of guilty to the charge of assault with intent to commit rape would result in his having to register as a sex offender, defendant is not entitled to relief, because he failed at the sentencing hearing to object to imposition of the registration requirement, the record on appeal does not establish prejudice to defendant resulting from the misadvisement, and imposition of the registration requirement does not constitute a violation of the terms of the plea agreement. Accordingly, we reverse the judgment of the Court of Appeal and direct that court to affirm the judgment of the superior court.
Lucas, C. J., Panelli, J., Arabian, J., and Baxter, J., concurred.