A trial court is required to advise a defendant that a registration requirement will be for the duration of his life. Appellant entered a no contest plea to a misdemeanor charge of Penal Code section 647, subdivision (a), with other mandatory-registration charges dismissed. At the plea hearing, although the court advised him that registration under Penal Code section was a possibility if the Probation Department determined that it was appropriate, it did not specify that registration, if ordered, was a lifetime requirement. At sentencing, appellant was granted probation with one of the articulated terms imposed being a requirement for registration pursuant to section 290. Again, it was not specified that it was lifetime. Appellants motion to withdraw his plea on the grounds that it was not knowing as he was not aware that registration was for lifetime was denied. The appellate court reversed holding that in addition to the sex registration being a direct consequence of a plea to specific offenses (People v. McClellan (1993) 6 Cal.4th 367), a restrictive lifelong consequence is also a direct consequence, obligating the court to advise a defendant of the lifetime aspect it before taking the plea. In addition to addressing the onerous nature of the obligation, the court analogized to parole and restitution fine consequences with their requirement for specificity. The court found that appellant had adequately established the requisite prejudice with his declaration emphasizing that he had never been advised of the lifetime aspect, his objection to registration at sentencing, and his immediate attempt to withdraw his plea.