
55 Cal.Rptr.3d 566 (2007)
147 Cal.App.4th 1470
The PEOPLE, Plaintiff and Respondent,
v.
Shamin ZAIDI, Defendant and Appellant.
No. A114292.
Court of Appeal of California, First District, Division Five.
February 27, 2007.
*568 Bill Lockyer, Attorney General, Mary Jo Graves, Chief Assistant Attorney General, Gerald A. Engler, Senior Assistant Attorney General, Seth K. Schalit, Supervising Deputy Attorney General, Jill M. Thayer, Deputy Attorney General, James P. Fox, District Attorney, Jeff Jackson, Deputy District Attorney, for plaintiff and respondent.
Robert J. Beles, Paul McCarthy, H. Ernesto Castillo, Oakland, for defendant and appellant.
*567 JONES, P.J.
The issue before us is the necessary content of a change of plea advisement when a lifetime obligation to register as a sex offender may be imposed upon a defendant under Penal Code section 290, subdivision (a)(2)(E).
Following a negotiated plea, defendant Shamin Zaidi pled no contest to one count of misdemeanor lewd conduct in a public place (Pen.Code, § 647, subd. (a)).[1] He was sentenced to three years supervised probation and required to register as a sex offender pursuant to section 290. We granted his petition to transfer his case from the appellate department of the superior court to the Court of Appeal (Cal. Rules of Court, rule 64(c)(1)(B)), after the appellate department affirmed the denial of his petition to withdraw his plea. He contends he should be allowed to withdraw his plea because he was not informed that registration is a lifetime requirement.

BACKGROUND

Complaint
The original complaint charged defendant with three misdemeanors: sexual battery (§ 243.4, subd. (e)(1); counts 1 & 2) and annoying or molesting a child under 18 (§ 647.6, subd. (a); count 3). Conviction of these offenses mandates registration as a sex offender (§ 290, subd. (a)(2)(A)). Defendant entered a plea of not guilty to all counts.

Plea Negotiations
Pursuant to a negotiated plea, the complaint was amended to add count 4, misdemeanor lewd conduct in a public place (§ 647, subd. (a)). Conviction of this offense gives a court discretion to impose the registration requirement. (§ 290, subd. (a)(2)(E); People v. Castellanos (1999) 21 Cal.4th 785, 790, fn. 2, 88 Cal.Rptr.2d 346, 982 P.2d 211.).[2] Defendant agreed to *569 plead no contest to count 4, and the People agreed to dismiss the original three counts.
Defendant signed a "waiver of rights for entry of plea of guilty or nolo contendere (no contest)." The waiver form contains the preprinted statement: "My decision to plead guilty or nolo contendere has been made freely and voluntarily without threat or fear to me or anyone closely related to or associated with me. There have been no promises to me of rewards, immunity, probation, or anything else to induce my plea of guilty or nolo contendere except[:]" This statement is followed by the handwritten phrases "No Contest Plea[;] PC 647(a)  Molesting a Minor (Hands)[;] Referral to Probation Dept."
Immediately underneath this handwritten entry is another preprinted statement: "I understand that the maximum penalty which may be imposed is as indicated below:" Immediately below this statement are two side-by-side boxes. The box on the left is entitled "COUNT NUMBER AND CHARGE." Handwritten therein is "PC 647(a)."
The box on the right is entitled "MINIMUM/MAXIMUM PENALTY." "Maximum" has been circled by hand. Preprinted under this title is the statement: "No Probation: not less than 5 nor more than 90 days in County Jail or a fine of not less than $145 nor more than $1,000 fine (plus assessments) or both fine and imprisonment. Probation Granted: not less than 5 nor more than 90 days in County Jail or a fine of not less than $145 nor more than $1,000 fine (plus assessments) or both fine and imprisonment and participation in and completion of at minimum the educational component of an alcohol and drug education program." Handwritten thereunder is "6 months county jail; $1000 fine."

May 9, 2005 Change of Plea Hearing
At the hearing on his change of plea from not guilty to no contest, defendant affirmed that he had read, understood, and signed the waiver of rights and plea form for a no contest plea to count 4. During further examination the court asked:
"THE COURT: Do you understand the maximum penalty the Court can impose under the law is six months in the county jail, a fine of 1,000 plus state assessment or both?
"THE DEFENDANT: Yes.
"THE COURT: Do you understand that the Court could also order that you register as a sexual offender pursuant to Penal Code section 290 if the Probation Department determines that is appropriate?
"THE DEFENDANT: Yes.
"THE COURT: Have any promises or threats been made to you to get you to enter your plea other than that the remaining counts would be dismissed and that this matter would be referred to the Probation Department for report and recommendation?
"THE DEFENDANT: No.
*570 "THE COURT:: You discussed the matter with [ ] your attorney?
"THE DEFENDANT: Yes."
Defense counsel acknowledged there was a factual basis for the plea. The court accepted defendant's no contest plea and referred the matter to the probation department for a resentencing report and recommendation.

Presentence Report
The factual account of the offense in the presentence report is based on the police reports. It states that the victim's father arranged for defendant, a long-time family friend whom the 16-year-old victim called "grandfather," to stay with her and her two younger sisters while their parents were out of town. The victim fell asleep watching television and awoke because defendant was removing her socks. He then placed his hands under her clothing and moved them over her breasts and pubic area.
The presentence report noted that throughout his interview with the probation officer, defendant denied touching the victim, showed no remorse, and accepted no responsibility for his actions.
The probation department's investigation revealed that defendant had no prior criminal history. It recommended that he be placed on "[s]upervised probation for three (3) years on the following conditions:" The enumerated conditions included "[s]erve" 90 days in county jail, "[p]ay" various fines and restitution, and "register as a sex offender pursuant to section 290 of the Penal Code and maintain yearly registration requirements as required by law." Specific to the last recommendation, it stated, that, due to the nature of the touching, "it is felt that the defendant should register as a sex offender to afford the community some additional protection from him."

June 24, 2005 Sentencing
The court announced at the outset of the sentencing hearing that it had read and considered the presentence report and recommendation. The prosecutor began his argument in favor of registration by stating: "As we discussed in chambers, the court has looked at the probation report which includes a number of factors, including . . . sexual registration." He concluded his argument by asking the court "to follow the recommendation to impose the 90-day jail sentence, to impose sexual registration, and to impose sexual counseling."
Defense counsel argued against registration, asserting that defendant's age, standing in his community, and absence of criminal record pointed to the offense being an aberrant incident on defendant's part. Therefore, defense counsel continued, registration was unnecessary because defendant was unlikely to sexually reoffend, and nothing about the case "would warrant the conclusion that sexual registration is appropriate."
In rebuttal, the prosecutor argued that, because defendant had violated a position of trust he had with the victim and her family, it was appropriate that the community know that he was "a dangerous person who has been convicted of a sexual crime."
Neither the presentence report nor the arguments of counsel mentioned that registration as a sex offender is a lifetime requirement.
The court accepted the recommendation of the probation department because the offense was "close to being a felony," and defendant violated a trust and showed no remorse. "[T]herefore, I believe that the recommendation of the probation department *571 for the 90-day jail sentence and the recommendation for registration pursuant to Penal Code section 290 as a sexual registrant are appropriate and I will impose those conditions." It then stated:
"THE COURT: . . . Imposition of sentence is ordered suspended.
"And, [defendant], you are placed upon three years of supervised probation on the following terms and conditions: That you obey all laws; that you serve 90 days in the county jail with credit for time served of one actual day.
. . . . . . . . . . . . . . . . . .
"[Y]ou will have to pay [fines and restitution of designated amounts] through the probation department as directed.
". . . During the period of probation, you must submit to search and seizure of your person, place of residence, area under your control or vehicle at any time day or night, with or without a search warrant, without regard to reasonable or probable cause, and with or without your consent as directed by any probation officer or peace officer.
"You shall register as a sex offender pursuant to section 290 of the Penal Code and maintain yearly registration requirements as required by law.
"You are not to associate with minors under the age of 18 years, other than your grandchildren, nor frequent places where minors congregate unless in the presence of a responsible adult approved by the probation officer.
"You are not to reside in a house where a child resides, except the court will allow you to reside where your son and his children reside.
"You must participate in and complete any education program as mandated by Penal Code section 1001.10.
"You are to stay away from and not have any contact with the victim. And such order will be issued pursuant to Penal Code section 136.2.
"You must participate in and complete a sexual offender treatment program as directed by the probation officer. You must participate in counseling or treatment as directed by the probation department.
"[Defendant], do you understand and agree to each of the terms and conditions of probation I have stated?
"THE DEFENDANT: Yes.
"THE COURT: You will get everything in writing at the clerk's office."
On the day of sentencing defendant signed a printed "Conditions of Probation" form acknowledging he "RECEIVED A COPY, read, understand], and accept[s] the above terms and conditions of probation." The form states he will be on supervised probation for "3" years. Fourteen of the numerous preprinted conditions on the form are checked, e.g., 90 days jail confinement, "Obey all laws," submit to warrantless arrest, restitution to be determined by probation department. Registration as a sex offender is not among the enumerated preprinted conditions. However, a handwritten notation alongside the form's preprinted conditions states: "Register as a sex offender per sec PC 290 maintain yearly Reg. Requirements."

Motion to Withdraw Plea
On August 30, 2005, defendant, represented by new counsel, moved to withdraw his plea. He argued his plea was not knowing and intelligent, insofar as he was not advised of its consequences because he was not informed that registration was a lifetime requirement.
In support of his motion defendant declared: He has maintained his innocence *572 since the accusations were first made against him. On May 9, 2005, the date set for trial, he waited in the courtroom while his then-attorney arid the prosecutor spoke with the judge in chambers. His attorney emerged from chambers to say that he had reached an agreement with the prosecutor, whereby the prosecutor would amend the complaint to charge him instead with "`disorderly conduct'" and allow him to enter a plea of no contest. His attorney had initially informed him that conviction of any of the original charges would require him to register as a sex offender, but he was told that conviction of disorderly conduct would not require such registration. He had never heard of "sex registration" until the accusations against him. He understood that a plea of no contest allowed him to maintain his claim that he never sexually touched the complaining witness but that by not contesting the charge he would be accepting the punishment as if he had pled or been found guilty of the charge. When he agreed to enter a plea of no contest, he read and signed a "`plea form'" filled out by his lawyer. The form nowhere stated that, if applicable, he would be required to register as a sex offender, although it noted possible immigration consequences and other possible consequences inapplicable to his case. He pled no contest in order to maintain his innocence without going through the expense, anxiety and uncertainty of trial. When he entered his plea, he did not fully understand or appreciate what the judge was saying because he was nervous; he was completely unfamiliar with the proceedings; English is not his first language; and he was concentrating on what his lawyer was telling him to say by whispering in his ear. He understood that three years was the longest period he would be on probation and that if any conditions of probation were imposed, they would be only for the term of probation. When, at sentencing, the court imposed registration as a term of probation, he understood the condition would last until he finished his probationary term. He was not made aware until a later time that registration was a lifetime requirement. Had he been aware that he would have been subject to the lifetime requirement, he would not have changed his plea to no contest but would have insisted on going to trial.
The trial court found that defendant failed to show good cause to withdraw his plea and denied his motion. It noted that in January and February 2005 pretrial conferences the attorneys and the court discussed referring defendant to the probation department and possible registration. It also observed that when defendant's plea was taken on May 9, defendant stated that he understood the court could order him to register as a sex offender pursuant to section 290 if the probation department deemed it appropriate; defendant stated that he had discussed the matter with his attorney; and defendant did not ask any questions about registration either when he entered his plea or at sentencing.

Appeal to Appellate Division
Defendant appealed the denial of his motion to withdraw his plea to the appellate division of the superior court. The appellate division affirmed the denial. Its opinion observes that defendant was advised when his plea was taken that registration as a sex offender "could be imposed," and that at sentencing he "accepted a condition of registration that was imposed upon [him].'' The appellate division also concluded that, even if the trial court erred in failing to advise on one of the direct consequence of his plea, defendant had not shown prejudice from the failure, i.e., that he would not have entered the plea had the court properly *573 advised him. "Despite [his] claim that he would not have entered his plea of no contest to the reduced charge if he were properly advised there is no evidence in the record to justify that claim."
The appellate division based its conclusion on two facts: (1) defendant gained an opportunity by his plea not to have to register because the dismissed counts mandated registration, and the offense to which he pled did not, and (2) he did not protest imposition of registration at the time of sentencing.

DISCUSSION

I. Duty to Advise that Registration is a Lifetime Obligation

Defendant asserts that under the rule enunciated in Bunnell v. Superior Court (1975) 13 Cal.3d 592, 119 Cal.Rptr. 302, 531 P.2d 1086 (Bunnell), the trial court was required to inform him that registration is a lifetime requirement.
Under long and well-established principles, a trial court is obligated to advise a defendant of the direct consequences of a plea of guilty or no contest to a felony or misdemeanor before it takes the plea. (Boykin v. Alabama (1969) 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274; In re Moser (1993) 6 Cal.4th 342, 351, 24 Cal.Rptr.2d 723, 862 P.2d 723; Bunnell, supra, 13 Cal.3d at p. 605, 119 Cal.Rptr. 302, 531 P.2d 1086; Mills v. Municipal Court (1973) 10 Cal.3d 288, 110 Cal.Rptr. 329, 515 P.2d 273; In re Tahl (1969) 1 Cal.3d 122, 81 Cal.Rptr. 577, 460 P.2d 449.) This obligation includes the duty to advise of the requirement to register as a sex offender upon conviction of a statutorily enumerated offense. (In re Birch (1973) 10 Cal.3d 314, 321, 110 Cal.Rptr. 212, 515 P.2d 12 (Birch).) Failure to advise of the sex registration requirement is error. (People v. McClellan (1993) 6 Cal.4th 367, 376, 24 Cal.Rptr.2d 739, 862 P.2d 739.)
The issue before us is the requisite content of the advisement regarding sex registration as a direct consequence of a plea. Does a trial court satisfy its obligation by informing the defendant simply that he or she must register as a sex offender pursuant to section 290, or must it specify that the registration obligation is lifelong? We conclude the court must advise that the registration requirement will be for the duration of the defendant's life.
Our analysis begins with Birch, supra, 10 Cal.3d 314, 110 Cal.Rptr. 212, 515 P.2d 12. The Birch defendant was charged with section 647, subdivision (a), lewd conduct in a public place, after two police officers observed him urinating at 1:30 a.m. while he stood next to his car and faced a retaining wall. (Birch, at p. 316, 110 Cal.Rptr. 212, 515 P.2d 12.) Unrepresented by counsel, he pled guilty without being told by the court that as a result of his plea he would be ordered to register as a sex offender pursuant to state law. (Id, at pp. 317, 318, 110 Cal.Rptr. 212, 515 P.2d 12.)[3]
Birch granted the defendant's petition for habeas corpus because (1) the record failed to demonstrate explicitly that he was informed of his right to counsel, and (2) it concluded "that in the instant case, in view of the unusual and onerous nature of the sex registration requirement that follows inexorably from a conviction under section 647, subdivision (a), the trial court's duty surely included an obligation to advise petitioner *574 of this sanction prior to accepting his guilty plea." (Birch, supra, 10 Cal.3d at p. 321, 110 Cal.Rptr. 212, 515 P.2d 12, fn. omitted.) It elaborated:
"Individuals convicted of one of the enumerated crimes [in section 290] have been deemed by the Legislature to have a propensity to commit such antisocial crimes in the future and thus are the subject of continual [lifetime] police surveillance. Whenever any sex crime occurs in his area, the registrant may very well be subjected to investigation. Although the stigma of a short jail sentence should eventually fade, the ignominious badge carried by the convicted sex offender can remain for a lifetime." (Birch, supra, 10 Cal.3d at p. 322, 110 Cal.Rptr. 212,515 P.2d 12.)
We read this language as strongly implying that the court's duty to advise on registration does not exist merely because there is a statutory requirement to register. Rather, the duty exists because the ignominy and the duration of the registration requirement makes it a particularly harsh sanction, and only if a defendant is apprised of the duration can he or she fully appreciate the gravity of the consequence of the plea, so as to make the plea voluntary and intelligent.
Subsequently, Bunnell held that a defendant pleading guilty shall be advised of the direct consequences of conviction "such as the permissible range of punishment . . . [and] registration requirements, if any (e.g., § 290 . . .). . . ." (Bunnell, supra, 13 Cal.3d at p. 605, 119 Cal.Rptr. 302, 531 P.2d 1086.) In holding that a court is obligated to advise a defendant of the sex offender registration requirement, McClellan, supra, 6 Cal.4th at page 376, 24 Cal. Rptr.2d 739, 862 P.2d 739 specifically cited the language in Birch that registration is a "`grave and direct consequence'" of a plea.
Recently People v. Hofsheier (2006) 37 Cal.4th 1185, 1191-1192, 39 Cal.Rptr.3d 821,129 P.3d 29 held that a defendant who pled guilty to oral copulation with a 16year-old girl (§ 288a, subd. (b)(1)) was denied equal protection because section 290 mandates sex offender registration for conviction of the offense, whereas the court has discretion to impose the registration requirement when a person is convicted of unlawful sexual intercourse with a minor (§ 261.5) under the same circumstances (same age victim, victim's willing participation, absence of statutory aggravating factors like force or violence).
Hofsheier acknowledged that while sex offender registration is not considered a form of punishment under the state or federal Constitutions, it nevertheless imposes a "`substantial'" and "`onerous'" burden on the registrant. (Hofsheier, supra, 37 Cal.4th at p. 1196, 39 Cal.Rptr.3d 821, 129 P.3d 29, citing Castellanos, supra, 21 Cal.4th at p. 796, 88 Cal.Rptr.2d 346, 982 P.2d 211 & Birch, supra, 10 Cal.3d at pp. 321-322, 110 Cal.Rptr. 212, 515 P.2d 12.) Significantly, Hofsheier noted that section 290 registration fills a dual purpose of facilitating police surveillance of registrants and notifying the public of the existence and location of a sex offender. (Hofsheier, supra, 37 Cal.4th at p. 1195, 39 Cal.Rptr.3d 821, 129 P.3d 29.) Ubiquitous references in Hofsheier to the duration of the section 290 registration requirement as "for life" (id., at pp. 1191, 1195, 1201, 1205, 39 Cal.Rptr.3d 821, 129 P.3d 29), or "lifetime" (id., at pp. 1196, 1197, 1201, 1202, 1204, 1206, 1207, 1208, 39 Cal.Rptr.3d 821, 129 P.3d 29) underscore the strong implication of Birch that it is the fact of an obligation communicating public disgrace for a lifetime that gives rise to a court's duty to advise defendants of the requirement before it accepts a plea.
*575 We find additional support for our conclusion in case law holding that a restrictive lifelong consequence or obligation is a direct consequence of the plea, and that a court must advise of the lifetime element. For example, a person found guilty by reason of insanity (NGI) is subject to a possible lifetime commitment in state hospital by section 1026.5, subdivision (b)'s authorization of repeated two-year commitment extensions. In People v. McIntyre (1989) 209 Cal.App.3d 548, 257 Cal. Rptr. 271 the defendant pled no contest and NGI to assault with a deadly weapon causing great bodily injury. During the hearing the court advised him that the maximum total prison term was seven years. After accepting his pleas, it committed him to a state hospital until his sanity was restored, not to exceed the maximum term he could have been imprisoned. However, he was not advised that, by statute, he could be subject to the commitment extensions. (Id, at p. 551, 257 Cal.Rptr. 271.)
After the defendant completed his seven-year state hospital commitment, the trial court granted the People's petition for an extended commitment. (McIntyre, supra, 209 Cal.App.3d at p. 551, 257 Cal. Rptr. 271.) McIntyre reversed the order because the court had failed to advise the defendant when he entered his plea that, as a consequence thereof, he could be committed to a state hospital for life. (Id at p. 558, 257 Cal.Rptr. 271.) It reached this conclusion by relying, in part, on Birch's requirement that trial courts "advise defendants of the lifetime sex-offender registration provisions of section 290. [Citation.]" (Id. at p. 555, 257 Cal.Rptr. 271, emphasis added; see also People v. Wetmore (1978) 22 Cal.3d 318, 322, fn. 2, 149 Cal.Rptr. 265, 583 P.2d 1308, approving practice of advising defendant pleading NGI that successful assertion of plea might result in indefinite commitment to state hospital.)
We also find support for our conclusion by analogy to those direct consequences in which the court's obligation includes a duty to advise on particulars of the consequence. For example, a mandatory term of parole is a direct consequence of a plea. The court is obligated to advise a defendant not simply on the bare fact that he or she will be on parole following completion of a prison term. It is required to advise on the actual length of that parole. (In re Moser (1993) 6 Cal.4th 342, 351-352, 24 Cal.Rptr.2d 723, 862 P.2d 723.)
A restitution fine is another direct consequence. Therefore, "before taking any guilty plea a trial court should advise the defendant of the minimum $100 and maximum $10,000 restitution fine." (People v. Walker (1991) 54 Cal.3d 1013,1022,1 Cal.Rptr.2d 902, 819 P.2d 861.) In other words, according to Walker, it does not suffice to advise the defendant merely that he or she will have to pay "a" restitution fine. The defendant must be advised of the dollar range of the fine.
By parity of reasoning, we conclude that an admonition that simply informs the defendant he or she will or may be subject to registration as a sex offender pursuant to section 290 undermines the Bunnell requirement of advising on all direct consequences of a plea. The reference to an abstract statutory reference ("you shall register as a sex offender pursuant to Penal Code section 290") does not inform the defendant of registration's most dire element. Registration is not for a finite period, like a jail incarceration or probation; it will remain a requirement for the remainder of the defendant's life, with all its attendant shame, ignominy, and potential *576 limitation on employment and housing.[4] Given the magnitude of the consequence, advising the defendant of the lifetime requirement of registration will not impose an undue burden on trial courts. Any additional burden is outweighed by the benefit of assuring that the defendant's waiver of his rights when entering a plea is voluntary and intelligent.
The People argue the trial court was not obligated to advise defendant that registration was a lifetime requirement because registration in his case was a collateral, not a direct, consequence of his plea.
A collateral consequence to a plea is one that does not "`inexorably follow'" from the conviction of the offense to which the plea is made. (People v. Arnold (2004) 33 Cal.4th 294, 309, 14 Cal.Rptr.3d 840, 92 P.3d 335, quoting People v. Crosby (1992) 3 Cal.App.4th 1352, 1355, 5 Cal.Rptr.2d 159.) The People argue registration was a collateral consequence because the crime to which defendant pled, section 647, subdivision (a), does not mandate registration but gives the sentencing court discretion to impose the registration requirement.
The People's argument fails in view of Bunnell's articulation of the advisement requirement: "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 . . . and, in appropriate cases the possibility of commitment" as a drug addict or mentally disordered sex offender. (Bunnell, supra, 13 Cal.3d at p. 605, 119 Cal.Rptr. 302, 531 P.2d 1086, emphasis added; see also Walker, supra, 54 Cal.3d at p. 1022, 1 Cal.Rptr.2d 902, 819 P.2d 861: "a possible $10,000 restitution fine" is a direct consequence of a plea, so court should advise defendant of minimum $100 and maximum $10,000 restitution fine before taking plea.) The fact a court has discretion not to impose the registration requirement for some offenses does not relieve it of the obligation to advise the defendant that registration is a possible consequence. Indeed, the court here did tell defendant at the change of plea hearing that it could order him to register as a sexual offender if the probation department thought it appropriate, albeit failing to say the registration would be for life.
Alternatively, the People contend that if a registration advisement was required, the court was not obligated to specify the lifetime requirement. They argue that by advising him that he could be ordered to register as a sex offender pursuant to Penal Code section 290 if the probation department deemed it appropriate, the court sufficiently alerted him to the possibility of registration "with all of the attendant consequences." The People urge that notice of the potential registration did not make his plea any less voluntary because the court did hot "read the entire statute with its myriad responsibilities and contingencies," e.g., annual registration within five days of the defendant's birthday, providing DNA samples, etc.
The People rely on People v. Barella (1999) 20 Cal.4th 261, 84 Cal.Rptr.2d 248, 975 P.2d 37 to support their contention. At issue in Barella was whether the court was required to advise a defendant, on a guilty plea, that the "Three Strikes" law (§§ 667, subd. (b)-(i), 1170.12) limits the defendant's ability to earn conduct and work credits while incarcerated. (20 *577 Cal.4th at p. 262, 84 Cal.Rptr.2d 248, 975 P.2d 37.) Barella held it did not. To do so would make the trial court responsible "for advising defendants of a myriad of contingencies related to eligibility for good-time or work-time credits  an unduly burdensome task and one unnecessary to ensure the voluntariness of a guilty plea. [11] Numerous factors inform the decision to release an inmate into law-abiding society, and courts need not inform the defendant of all the contingencies and possibilities that may ensue from a plea of guilty. Nor does the fair and efficient administration of justice require that the trial court inform the defendant of the theoretical minimum portion of a sentence that will have to be served in custody (taking into account potential in-prison conduct or work credits) when he or she pleads guilty to a term whose potential length may be greater; such knowledge, although important to the defendant who pleads guilty, is not required to facilitate a knowing and intelligent decision to plead. [Citation.]" (Id. at pp. 271-272,84 Cal.Rptr.2d 248, 975 P.2d 37.)
Barella is distinguishable. Unlike good-time/work-time credits and eligibility for parole that depend on unknowable events that occur after the defendant's incarceration, there is nothing "contingent" about the lifetime element of registration, nor is it dependent on the registrant's postconviction conduct. The legal possibility that a person required to register under section 290 may eventually be relieved of the requirement does not mitigate the onerous quality and burden of the lifetime registration requirement.[5] The possibility of this relief is comparable to the possibility that an incarcerated defendant may be released from custody earlier than his designated sentence if he earns good time/work time credits. As Barella notes, this possible early release is speculative when the plea is taken and depends on facts that have not yet occurred. (Barella, supra, 20 Cal.4th at pp. 270, 272, 84 Cal.Rptr.2d 248, 975 P.2d 37.) The possible relief from the registration requirement is similarly speculative and dependent on the defendant's conduct after he has completed any incarceration.

II. Prejudice

Having concluded that the court erred in failing to advise defendant of the lifetime requirement of sex offender registration, we must determine whether he is entitled to the relief he seeks.
At the outset we observe that the rule articulated in Walker, supra, 54 Cal.3d 1013, 1 Cal.Rptr.2d 902, 819 P.2d 861 is inapplicable to this case. Walker held that the error in failing to advise of the consequence of a plea is waived if not raised by a timely objection at or before *578 sentencing. (Id., at p. 1023, 1 Cal.Rptr.2d 902, 819 P.2d 861.) This procedural bar is inapplicable in the case before us, however, "because unlike Walker, the present case does not involve a trial court's imposition at the sentencing hearing of a sentence at variance with the advice given at the earlier plea proceeding  a situation in which a defendant reasonably may be required to bring the discrepancy to the court's attention." (Moser, supra, 6 Cal.4th at 352, fn. 8, 24 Cal.Rptr.2d 723, 862 P.2d 723.) Here, defendant was advised at his plea hearing of the possibility of registration, which would depend on the probation department's recommendation in its pre-sentence report. Defense counsel, by objecting at sentencing to imposition of registration, was plainly familiar with the report's recommendation that defendant be required to register.[6] But nothing in the record suggests defendant himself was aware of the lifetime element of registration, nor should he be required to infer this missing information. (Ibid.)
Moser, a habeas corpus proceeding, concluded the trial court's misadvisement regarding the length of the defendant's parole term constituted a violation of its obligation to advise the defendant on the direct consequences of his guilty plea. Citing Walker, supra, 54 Cal.3d 1013, 1 Cal.Rptr.2d 902, 819 P.2d 861, Moser observed that the defendant would be entitled to withdraw his plea only if he established that he was prejudiced by the misadvisement, i.e., that he would not have entered the plea had the court given a proper advisement. (Moser, supra, 6 Cal.4th at p. 352, 24 Cal.Rptr.2d 723, 862 P.2d 723.) Because the defendant's petition for writ of habeas corpus did not specifically allege prejudice, and the People's return did not bring this omission to the trial court's attention, the question of prejudice was never litigated or resolved in the trial court. (Id., at pp. 352, 353, 24 Cal.Rptr.2d 723, 862 P.2d 723.) Therefore, Moser concluded the interest of justice would be best served by remanding the matter to the trial court to hear and determine the question of prejudice. (Id, at p. 353, 24 Cal.Rptr.2d 723, 862 P.2d 723.)
In McClellan, a companion case filed the same day as Moser, the defendant pled guilty to a sex offense that mandates registration. (McClellan, supra, 6 Cal.4th at p. 380, 24 Cal.Rptr.2d 739, 862 P.2d 739.) The trial court said nothing about the registration requirement at the plea hearing. (Id. at p. 372, 24 Cal.Rptr.2d 739, 862 P.2d 739.) At sentencing neither the defendant nor his attorney challenged the probation officer's recommendation that the defendant be required to register, even though they were aware of the probation department's recommendation at least a week before the sentencing hearing; nor did they question the court's imposition of the requirement. (Id., at p. 373, 24 Gal. Rptr.2d 739, 862 P.2d 739.) The defendant did not assert the failure to advise in his initial notice of appeal. He added it as a ground in an amended notice of appeal filed six months later and argued therein that he should be allowed to withdraw his plea. (Id, at pp. 373, 377, 24 Cal.Rptr.2d 739, 862 P.2d 739.)
McClellan concluded the error was harmless because the defendant failed to *579 object to the requirement at sentencing (citing Walker), and because the appellate record did not establish that he was prejudiced by the failure to advise. (McClellan, supra, 6 Cal.4th at pp. 377, 378, 24 Cal. Rptr.2d 739, 862 P.2d 739.) It observed that the defendant's amended notice of appeal contained an assertion that, but for the trial court's omission, he would not have pled guilty, but such an extrajudicial assertion is not a proper component of the record on appeal. (Id., at p. 378, 24 Cal. Rptr.2d 739, 862 P.2d 739.) By contrast, McClellan continued, there was no evidence or even an assertion in the record regarding the effect of the registration requirement on the defendant's decision to plead guilty. It reiterated Moser's holding, which in turn relied on Walker, that "[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. [Citations.]" (McClellan, supra, 6 Cal.4th at p. 378, 24 Cal.Rptr.2d 739, 862 P.2d 739.) Because nothing on the record supported the defendant's allegation that he would not have entered his plea had he been properly advised, McClellan concluded that he failed to meet his burden of establishing prejudice. (Id, at p. 378, 24 Cal.Rptr.2d 739,862 P.2d 739.)
Unlike McClellan, the record before us contains evidence of prejudice from the failure to advise that registration was a lifetime requirement. In contrast to the defendant in McClellan who did not raise the issue of registration at all until his amended notice of appeal, defendant here objected to imposition of registration under section 290 at the sentencing hearing. Within weeks of sentencing he petitioned to withdraw his plea based primarily on what he characterized as an incomplete advisement, i.e., failure to advise of the lifetime requirement. Moreover, it was not a naked assertion. He supported his petition with a declaration that, while he was aware that he might have to register as a consequence of his plea, he understood that the length of the registration was concurrent with the period of probation. Had he known it was a lifetime requirement, he would never have entered his plea and would have insisted on going to trial.
On the record before us, there is no evidence to rebut defendant's assertion that he understood that his registration requirement would be only for the duration of his probation. The People's opposition to his motion to withdraw his plea argued that the "issue of lifetime sex registration was discussed at the original pretrial conference on January 19, 2005," four months before defendant entered his plea on May 9, 2005. At the September 27, 2005 hearing on defendant's motion to withdraw his plea, the trial court commented that the prosecutor and the two defense attorneys discussed a referral "to the probation department for possible registration" at the January 19 pretrial conference, and that "I [the trial court] made notes of that." The court also commented that "we" had another conference on February 22, 2005, at which registration was again discussed.
The minutes for the January 19, 2005 pretrial conference list defendant as appearing with his attorney. However, the People's opposition to defendant's motion to withdraw his plea contained no declaration by the prosecutor or other direct evidence that defendant participated in this pretrial discussion regarding registration or that the discussion referred specifically to the lifetime nature of registration. Neither did the trial court's comments at the September 27, 2005 hearing recite or identify *580 any specifics from its January 19, 2005 notes, e.g., that defendant himself participated in the discussion, or that registration was described as life-long. The minutes for the February 22, 2005 pretrial conference state that defendant was not personally present, that the trial date was confirmed, and that defendant remained in jail. Clearly, the minutes of the January and February 2005 pretrial conferences and the court's comments at the September 2005 hearing fail to show that defendant was a participant in, or was even present, during any discussion of lifetime registration.
Furthermore, the manner in which the probation department outlined its recommendations and in which the trial court articulated the sentence reasonably implies that the registration would last only the length of probation.
Under the heading "RECOMMENDATION" the presentence report states: "Supervised probation for three (3) years on the following conditions:" Registration as a sex offender is listed among the 14 conditions.
After the court announced that imposition of sentence was suspended, it instructed defendant that he was placed on "three years of supervised probation on the following terms and conditions." It then enumerated the terms and conditions, incorporating among them the requirement that "You shall register as a sex offender pursuant to section 290 of the Penal Code and maintain yearly registration requirements as required by law." The court did not distinguish the length of this "condition" of probation from the length of the probation itself. It concluded its enumeration by asking, `[D]o you understand and agree to each of the terms and conditions of probation I have stated?"
The printed form entitled "Conditions of Probation" that defendant signed on the day of sentencing states that he is on probation for three years. It includes the registration requirement alongside the other terms and conditions of probation.
A lay defendant new to the criminal justice system could understandably infer from the context in which the probation department and court enunciated the registration requirement that registration was a condition of probation and that he would be bound by the requirement only for the length of his probation.
The People rely on In re Resendiz (2001) 25 Cal.4th 230, 105 Cal.Rptr.2d 431, 19 P.3d 1171 and In re Alvernaz (1992) 2 Cal.4th 924, 8 Cal.Rptr.2d 713, 830 P.2d 747 to support their contention that defendant failed to show prejudice. These cases are inapposite. They concern claims of ineffective assistance of defense counsel based on incompetent advice from counsel prior to entering a plea, not a claim of insufficient advisement by the court.
In light of (1) defendant's prompt effort to withdraw his plea on the grounds of lack of advisement, accompanied by his specific declaration that he would not have entered a plea had he known of the lifetime registration requirement; (2) the format of the oral sentencing and written probation forms that misleadingly suggested that the registration requirement was for the duration of probation only; and (3) the absence of evidence that defendant was made aware that registration would be for life, we conclude that defendant met his burden of establishing prejudice from the court's failure to advise that a consequence of his no contest plea would be lifetime registration as a sex offender. Under the totality of these circumstances, the denial of his motion to withdraw his plea was an abuse of discretion. (See People v. Harvey (1984) 151 Cal.App.3d 660, 667, 198 Cal. Rptr. 858.)


*581 DISPOSITION
The opinion of the appellate department that affirmed the superior court's order denying defendant's motion to withdraw his plea is reversed. The case is remanded to the superior court with directions to permit defendant to withdraw his plea, and, if he elects to do so, to reinstate the dismissed charges and proceed accordingly. If he declines to withdraw his plea, the judgment of the superior court is affirmed.
SIMONS and GEMELLO, JJ., concur.
NOTES
[1]  AH further section references are to the Penal Code.
[2]  Section 290, subdivision (a)(1)(A) states, in pertinent part: "Every person described in paragraph (2), for the rest of his or her life while residing in California, or while attending school or working in California . . . shall be required to register with the chief, of police of the city in which he or she is residing, or the sheriff of the county if he or she is residing in an unincorporated area or city that has no police department . . . within five working days of coming into, or changing his or her residence within, any city, county, or city and county, or campus in which he or she temporarily resides." Such a person who has more than one residence address is required to register in each jurisdiction in which he or she resides. (§ 290, subd. (a)(1)(B).) The person must reregister annually and with every change of address. (§ 290, subd. (a)(1)(D).)

Section 290, subdivision (a)(2)(A) enumerates the offenses for which registration is mandatory.
Section 290, subdivision (a)(2)(E) authorizes courts to impose the registration requirement for offenses not specifically enumerated if the court finds the person committed the offense as a result of sexual compulsion or for purposes of sexual gratification.
Any person required to register pursuant to section 290 based on a misdemeanor conviction who willfully violates any requirement of section 290 is guilty of a misdemeanor punishable by imprisonment in county jail up to one year. (§ 290, subd. (g)(1).)
[3]  When defendant Birch was convicted, section 290 mandated registration as a sex offender upon conviction of section 647, subdivision (a). Section 290 was subsequently amended to delete the mandatory requirement for conviction of this offense. (Castellanos, supra, 21 Cal.4th at p. 797, fn. 8, 88 Cal.Rptr.2d 346, 982 P.2d 211.)
[4]  Although see footnote 5, post. Under some circumstances and a minimum of 10 years after release from custody, the defendant may seek, but has no guarantee of, relief from the requirement.
[5]  A person who is required to register because he has been convicted of one of the offenses specifically listed in section 290.5, subdivision (a)(2) is relieved of the requirement only by a gubernatorial pardon. (§ 290.5, subd. (b)(1); Hofsheier, supra, 37 Cal.4th at p. 1193, 39 Cal.Rptr.3d 821, 129 P.3d 29.) Section 647, subdivision (a), of which defendant was convicted, is not one of these specified offenses. Generally, a person required to register for conviction of an offense other than those listed in section 290.5, subdivision (a)(2) may be relieved of the requirement if he obtains a certificate of rehabilitation pursuant to section 4852.01 et seq. (§ 290.5, subd. (a)(1).) A person required to register under section 290 may seek a certificate of rehabilitation 10 years after release from custody, based on a showing of living an honest and upright life, conducting himself with sobriety and industry, exhibiting good moral character, and obeying all laws. (§§ 4852.03, subd. (a)(2), 4852.05; People v. Failla (2006) 140 Cal.App.4th 1514, 1518, 45 Cal.Rptr.3d 585.) The granting or denial of a petition for a rehabilitation certificate lies within the trial court's sound discretion. (Id. at p. 1519, 45 Cal.Rptr.3d 585.)
[6]  Furthermore, the only objection defense counsel could assert was an objection to imposition of the registration requirement itself. Registration is not like most prison terms and restitution fines, which may be imposed within a limited range of years or dollars. If the offense gives the court discretion to impose registration and the court elects to exercise its discretion to impose the registration obligation, the court then has no discretion to impose a requirement for less than lifetime.
