
186 Cal.App.4th 684 (2010)
In re WARREN GRANARD WATFORD on Habeas Corpus.
No. C062550.
Court of Appeals of California, Third District.
July 9, 2010.
*686 Linda M. Leavitt, under appointment by the Court of Appeal, for Petitioner Warren Granard Watford.
Edmund G. Brown, Jr., Attorney General, Michael P. Farrell, Assistant Attorney General, Charles A. French and Michael A. Canzoneri, Deputy Attorneys General, for Respondent State of California.

OPINION
NICHOLSON, J.
Petitioner Warren Granard Watford petitions for a writ of habeas corpus directing the Placer County Superior Court to vacate its judgment of conviction for failing to register as a sex offender because the predicate sex offense has been vacated and will not be retried. Petitioner asserts the predicate offense is now void ab initio, and thus he was never required to register and cannot be held for failing to register.
We disagree and deny the petition.

FACTS
In 1986, petitioner was convicted in Suffolk County, Massachusetts, of a sex offense involving a minor.
Nearly 22 years later, on February 6, 2008, petitioner was arrested in Lincoln, California, and charged with failing to register as a sex offender as required under Penal Code sections 290 and 290.005.[1] The evidence at trial indicated petitioner had arrived in California from Massachusetts in December 2007, and he had not registered with local authorities since his arrival.
*687 In April 2008, a Placer County jury convicted petitioner of failing to register as a sex offender. The trial court also found true an allegation that petitioner was convicted of armed robbery in Massachusetts in 1992, a serious felony for purposes of the "Three Strikes" law. The court sentenced defendant to the low prison term of 16 months, doubled under the Three Strikes law for a total of 32 months. We affirmed this judgment on appeal. (People v. Watford (Dec. 17, 2009, C060123) [nonpub. opn.].)[2]
In September 2008, following his Placer County conviction, petitioner filed a motion in the Massachusetts court to withdraw his plea to the 1986 sex offense conviction. He claimed his plea in that action had not been voluntary and was unconstitutional. In January 2009, the Massachusetts court granted his motion and permitted him to withdraw his plea.
In May 2009, the Massachusetts court dismissed the 1986 charges against petitioner after the district attorney declined to prosecute petitioner again.
Petitioner now seeks a writ of habeas corpus from this court. He claims that as a result of the withdrawal of his 1986 plea and the dismissal of the Massachusetts complaint in 2009, the qualifying sex offense for his 2008 Placer County conviction for failing to register is not a conviction and is void ab initio. He asserts that because his status as a sex offender has been eliminated and with it the requirement to register, he is being unlawfully incarcerated for failing to register.

DISCUSSION
(1) "`A habeas corpus petitioner bears the burden of establishing that the judgment under which he or she is restrained is invalid. [Citation.] To do so, he or she must prove, by a preponderance of the evidence, facts that establish a basis for relief on habeas corpus. [Citation.]' [Citation.]" (In re Cudjo (1999) 20 Cal.4th 673, 687 [85 Cal.Rptr.2d 436, 977 P.2d 66].)
Petitioner has not shown that his 2008 conviction in Placer County is invalid. On the date of his arrest, he was required to have registered under sections 290 and 290.005, and he had failed to do so. The fact that the predicate offense was later dismissed did not render the 2008 conviction invalid. At the time of his arrest, he was in violation of the law, and he is incarcerated for that violation.
Although no reported case authority appears directly on point, we find dispositive support in decisions upholding analogous judgments against a *688 convicted felon for unlawful firearm possession even though the underlying felony conviction is subject to collateral attack. In Lewis v. United States (1980) 445 U.S. 55 [63 L.Ed.2d 198, 100 S.Ct. 915] (Lewis), the United States Supreme Court ruled that the constitutional invalidity of an accused's underlying felony conviction was no defense to a conviction under federal law for being a felon unlawfully possessing a firearm.
In that case, shortly before trial on the possession charge, the trial court learned the defendant had not been represented by counsel on the underlying conviction some 16 years earlier. The defendant claimed that under the rule of Gideon v. Wainwright (1963) 372 U.S. 335 [9 L.Ed.2d 799, 83 S.Ct. 792], a violation of the federal possession statute could not be predicated on an earlier conviction obtained in violation of his constitutional rights. (Lewis, supra, 445 U.S. at pp. 57-58.)
The Supreme Court disagreed. Justice Blackmun wrote the opinion for a six-member majority. Relying on the possession law's language, the court found the law applied upon the fact of conviction, even if that conviction was later found to be invalid. The law proscribed possession of a firearm by any person "convicted" of a felony. Nothing indicated any restriction on the term "convicted," or any intent to limit the law's coverage to persons whose felony convictions are not subject to collateral attack. The statute's plain meaning "is that the fact of a felony conviction imposes a firearm disability until the conviction is vacated or the felon is relieved of his disability by some affirmative action, such as a qualifying pardon or a consent from the Secretary of the Treasury." (Lewis, supra, 445 U.S. at pp. 59-61, fn. omitted.)
The high court also determined the law's legislative history and purpose supported this interpretation. The law's authoring senator repeatedly stressed conviction as the sole criterion, not a "valid" conviction or a conviction not subject to constitutional challenge. (Lewis, supra, 445 U.S. at pp. 62-63.) The law also was adopted in response to the political and social violence of the 1960's. "`Congress sought to rule broadlyto keep guns out of the hands of those who have demonstrated that "they may not be trusted to possess a firearm without becoming a threat to society."' [Citation.]" (Id. at p. 63.)
In the face of such clear language, strong legislative history, and broad purpose, the court ruled the unambiguous law prohibited a felon from possessing a firearm despite the fact the predicate conviction may be subject to collateral attack on constitutional grounds. (Lewis, supra, 445 U.S. at p. 65.)
California courts have followed Lewis's lead and have held the fact of conviction subjects a felon to California's firearm possession laws even if the *689 predicate offense is later invalidated. In People v. Harty (1985) 173 Cal.App.3d 493 [219 Cal.Rptr. 85] (Harty), the First District Court of Appeal concluded the possible invalidity of an underlying prior felony conviction provides no defense to a charge of unlawful possession of a firearm by a felon under section 12021.
Writing for a unanimous court, Justice Channell relied upon analogous circumstances where California courts held that "defendants charged with crimes based on their prisoner status may be convicted of such offenses notwithstanding the invalidity of the conviction upon which the prisoner status was based. (See, e.g., Graham v. Superior Court (1979) 98 Cal.App.3d 880, 890 [160 Cal.Rptr. 10]; People v. Superior Court (Gaulden) (1977) 66 Cal.App.3d 773, 777-779 [136 Cal.Rptr. 229], disapproved on other grounds in People v. Sumstine (1984) 36 Cal.3d 909, 919, fn. 6 [206 Cal.Rptr. 707, 687 P.2d 904] [prosecution for assault by life prisoner§ 4500; conviction possible despite invalidity of conviction upon which life sentence was based]; People v. Scherbing (1949) 93 Cal.App.2d 736, 742-744 [209 P.2d 796], disapproved on other grounds in People v. Olivas (1976) 17 Cal.3d 236, 251 [131 Cal.Rptr. 55, 551 P.2d 375] [possession of weapon by prisoner§ 4502; invalidity of statute under which prisoner was confined is no defense].)" (Harty, supra, 173 Cal.App.3d at p. 499.)
The Harty court also relied upon the Supreme Court's decision in Lewis as being "[c]loser in point." (Harty, supra, 173 Cal.App.3d at p. 499.) Based on that holding, the Harty court concluded a felon could not first possess a firearm and then seek to invalidate the predicate offense if he wanted relief from the disability imposed by the prior conviction. (Id. at pp. 499-500.)
The Sixth District Court of Appeal in People v. Sanchez (1989) 211 Cal.App.3d 477 [259 Cal.Rptr. 294] (Sanchez) relied upon Lewis and Harty to conclude a trial court erred when it dismissed an information charging a felon with unlawful firearm possession because the predicate offense was later declared invalid under Boykin/Tahl.[3] Writing for a unanimous court, Presiding Justice Agliano ruled that the defendant's violation of section 12021.1 was "based on defendant's membership in a class of persons who are unable to legally possess firearms and thus the subsequent invalidity of the underlying prior conviction provides no defense to the instant charges." (Sanchez, supra, 211 Cal.App.3d at p. 480.)[4]
*690 (2) The reasoning of Lewis, Harty, and Sanchez applies to this case. The language of sections 290.005 and 290, part of the Sex Offender Registration Act (the Act; § 290 et seq.), indicates the registration requirement applies, regardless of the subsequent invalidity of the predicate offense, if, at the time of the failure to register, the petitioner was under a legal duty to register. The requirement applies to any person "convicted" of one of the enumerated sex crimes in this state or an equivalent crime in another state. The term is unadorned by any modifier, such as "final judgment" or "valid."
Moreover, as with the firearm possession convictions, the sex offense registration requirement applies to qualifying felons immediately upon conviction, both upon and release from incarceration, placement, or commitment. (§§ 290.015, 290.016.) An appeal does not stay the requirement. (§§ 1243, 1467.)
In addition, the registration requirement applies even if the conviction is later dismissed pursuant to section 1203.4 unless the felon obtains either a certificate of rehabilitation or, for more egregious crimes, a full pardon. (§§ 290.007, 290.5.)
These statutory provisions indicate the Legislature intended the requirement to apply based upon the fact of conviction, even if the conviction is later determined to have been invalid, so long as the petitioner stands convicted of a sex offense and has a legal duty to register.[5]
(3) The Act's broad purpose further supports imposing its requirement based upon the fact of conviction. "Section 290 `applies automatically to [its] enumerated offenses, and imposes on each person convicted a lifelong obligation to register.' [Citations.] Registration is mandatory [citation], and is `not a permissible subject of plea agreement negotiation' [citation]. It is intended to promote the `"state interest in controlling crime and preventing recidivism in sex offenders."' [Citation.] As this court has consistently reiterated: `The purpose of section 290 is to assure that persons convicted of the crimes enumerated therein shall be readily available for police surveillance at all times because the Legislature deemed them likely to commit similar offenses in the future. [Citation.]' [Citations.] Plainly, the Legislature perceives that sex offenders pose a `continuing threat to society' [citation] and require constant vigilance. [Citation.]" (Wright v. Superior Court (1997) 15 Cal.4th 521, 527 [63 Cal.Rptr.2d 322, 936 P.2d 101] (Wright).)
*691 "The statute is thus regulatory in nature, intended to accomplish the government's objective by mandating certain affirmative acts. Compliance is essential to that objective; lack of compliance fatal." (Wright, supra, 15 Cal.4th at p. 527.)
The Act's regulatory purpose is fulfilled by requiring the sex offender to register based upon the fact of conviction until such time as the predicate conviction may be invalidated.
Petitioner attempts to limit Lewis and its progeny to cases where the convicted felon takes an affirmative action, such as unlawfully possessing a firearm, as opposed to an allegedly passive failure to act, such as a failure to register. He relies on Lambert v. California (1957) 355 U.S. 225 [2 L.Ed.2d 228, 78 S.Ct. 240] (Lambert) for this distinction, but his reliance is misplaced. Lambert does not apply to convictions under section 290.
Lambert invalidated a municipal ordinance that made it a crime for a felon to remain in Los Angeles for more than five days without registering with the police. The high court held the ordinance denied due process because a "[v]iolation of its provisions is unaccompanied by any activity whatever, mere presence in the city being the test. Moreover, circumstances which might move one to inquire as to the necessity of registration are completely lacking." (Lambert, supra, 355 U.S. at p. 229, italics added.)
"Lambert concerns the mens rea that is necessary before the State may convict an individual of crime. [Citations.] Its application has been limited, lending some credence to Justice Frankfurter's colorful prediction in dissent that the case would stand as `an isolated deviation from the strong current of precedentsa derelict on the waters of the law.' [Citation.]" (Texaco, Inc. v. Short (1982) 454 U.S. 516, 537, fn. 33 [70 L.Ed.2d 738, 756, 102 S.Ct. 781].)
To the extent Lambert retains vitality, it requires "actual knowledge of the duty to register or proof of the probability of such knowledge and subsequent failure to comply" before a conviction under a registration law can stand. (Lambert, supra, 355 U.S. at p. 229.) It requires a conviction for failing to register be based on "the commission of acts, or the failure to act under circumstances that should alert the doer to the consequences of his deed." (Id. at p. 228, italics added.)
(4) A conviction under section 290 satisfies Lambert's demands. To convict for a violation of section 290, the jury must find that the defendant had actual knowledge of his duty to register. (People v. Garcia (2001) 25 Cal.4th 744, 747, 752 [107 Cal.Rptr.2d 355, 23 P.3d 590].)
*692 Petitioner's jury made that finding, and we determined on petitioner's appeal that substantial evidence supported that finding. (People v. Watford, supra, C060123.) Defendant's Massachusetts registration form informed him he was "required to immediately contact and advise of [his] presence, the appropriate authorities in any other state in which [he may locate himself] for the purpose of residence . . . ."
Thus, unlike in Lambert, this was not a case where "circumstances which might move one to inquire as to the necessity of registration are completely lacking." (Lambert, supra, 355 U.S. at p. 229; see also U.S. v. Dixon (7th Cir. 2008) 551 F.3d 578, 584 [Lambert does not apply to sex offender registration conviction where registration form informed defendant of his duty to register in a new state of residence].)
Lambert has no effect on this case. Whether a felon acts by obtaining possession of a firearm or a petitioner fails to register in violation of section 290 with knowledge of his duty to do so, both cases contain sufficient mens reanotice and the fact of a prior convictionto justify upholding their convictions even if the predicate offense is later invalidated.
Petitioner argues his conviction is now void ab initio and cannot be used as the predicate offense according to authority holding that a constitutionally defective conviction cannot serve as the basis for an enhanced sentence under an antirecidivism law. (See Burgett v. Texas (1967) 389 U.S. 109 [19 L.Ed.2d 319, 88 S.Ct. 258] (Burgett); People v. Sumstine, supra, 36 Cal.3d 909 (Sumstine).) The Lewis court, however, addressed this argument and disagreed with it.
The Lewis court distinguished its rulingdisallowing challenges to the predicate offense's constitutional validity in a firearm possession casefrom its earlier decisions which had held that a constitutionally invalid conviction could not be used for enhancing a punishment under a state's recidivist statute (see Burgett, supra, 389 U.S. 109), in sentencing a defendant after a subsequent conviction (United States v. Tucker (1972) 404 U.S. 443 [30 L.Ed.2d 592, 92 S.Ct. 589] (Tucker)), or in impeaching the general credibility of the defendant (Loper v. Beto (1972) 405 U.S. 473 [31 L.Ed.2d 374, 92 S.Ct. 1014] (Loper)). It did so because sentencing in those cases depended upon the reliability of the predicate conviction, whereas punishment for unlawful possession of a firearm by a felon depended on the fact of conviction and on Congress's determination that such a person should be regulated.
*693 The Lewis court stated: "Use of an uncounseled felony conviction as the basis for imposing a civil firearms disability, enforceable by a criminal sanction, is not inconsistent with Burgett, Tucker, and Loper. In each of those cases, this Court found that the subsequent conviction or sentence violated the Sixth Amendment because it depended upon the reliability of a past uncounseled conviction. The federal gun laws, however, focus not on reliability, but on the mere fact of conviction, or even indictment, in order to keep firearms away from potentially dangerous persons. Congress' judgment that a convicted felon, even one whose conviction was allegedly uncounseled, is among the class of persons who should be disabled from dealing in or possessing firearms because of potential dangerousness is rational." (Lewis, supra, 445 U.S. at p. 67, fn. omitted.)
Similarly here, the Act imposes the registration requirement on the mere fact of conviction, not on the reliability of the predicate sex offense. The Legislature determined that persons convicted of sex offenses present a sufficient risk to society to justify requiring them to register, and holding them accountable for not registering, even if the predicate offense existing when the offender fails to register is later invalidated. Thus, petitioner's reliance on Burgett, Sumstine, and their kind is misplaced.
Petitioner also misplaces his reliance on In re Smith (2008) 42 Cal.4th 1251 [73 Cal.Rptr.3d 469, 178 P.3d 446] (Smith). There, our Supreme Court determined that imposing a lesser standard of civil commitment under the Sexually Violent Predator Act (Welf. & Inst. Code, § 6600 et seq.) (the SVP Act) on a prisoner whose predicate offense is reversed after the commitment petition is filed, than on a violent sex offender no longer in prison, potentially violated constitutional guarantees of equal protection.
In that case, Smith, who had previously been convicted of violent sex offenses, was convicted of failing to register under section 290 and was imprisoned. Prior to his release from prison on the registration offense, and while his appeal of that conviction was pending, the district attorney filed a petition to have Smith civilly committed under the SVP Act as a sexually violent predator. More than three months later, and after Smith's transfer from prison custody to the custody of the county sheriff pending resolution of the commitment petition, the Supreme Court reversed his conviction on the registration offense. The district attorney elected not to refile charges. After the reversal, Smith filed a habeas corpus petition challenging the continuation of the commitment proceedings. (Smith, supra, 42 Cal.4th at pp. 1255-1256.) Ultimately, the Supreme Court granted his writ petition. (Id. at p. 1271.)
At issue was the following provision of the SVP Act: "A [civil commitment] petition shall not be dismissed on the basis of a later judicial or *694 administrative determination that the individual's custody was unlawful. . . ." (Welf. & Inst. Code, § 6601, subd. (a)(2).) The district attorney claimed that a reversal of the predicate offense was within the meaning of a "`determination that the individual's custody was unlawful,'" and thus it did not prevent the commitment proceedings from continuing. (Smith, supra, 42 Cal.4th at p. 1257.)
Unable to decide the case on the language of the SVP Act or its legislative history, the Supreme Court ruled in favor of Smith based on constitutional grounds. Writing for a unanimous court, Justice Moreno reasoned that a felony inmate whose conviction had been reversed was in the same position as one charged with, but not yet convicted of, a felony sex offense. Because the latter could not be subject to an SVP proceeding, the contested statute rested on infirm constitutional grounds if it subjected the former to an SVP proceeding. (Smith, supra, 42 Cal.4th at pp. 1268-1270.)
Petitioner argues Smith is controlling because it allegedly stands for the proposition that "a reversed and dismissed conviction cannot support the continued incarceration based on that reversed and dismissed conviction." But this argument exposes why Smith does not apply. Petitioner's conviction on which his incarceration is based has not been reversed.
Smith effectively determined the defendant could not be held in custody in order for the state to reach a new decision as to his current mental status when there were no longer any grounds for holding him. Here, petitioner is not being held to facilitate a subsequent determination of his status. He is being held because he previously violated the law by failing to register at a time he was undisputedly required to register due to a then extant predicate felony conviction. And his current conviction for failing to register as a sex offender has been affirmed on appeal.
Regardless of the ultimate impact the dismissal of petitioner's 1986 Massachusetts conviction may have on petitioner's future obligation to register pursuant to section 290, it has no effect on the validity of his existing conviction for violating section 290's registration requirement while he was indisputably subject to it. Smith thus has no bearing on this case.
(5) Consistent with the rule of Lewis, Harty, and Sanchez, we conclude the dismissal of petitioner's predicate Massachusetts offense after he was convicted of violating section 290 in California is no defense to his registration conviction, and it provides no ground for granting habeas corpus relief.


*695 DISPOSITION
The order to show cause is discharged and the petition for writ of habeas corpus is denied.
Sims, Acting P. J., and Butz, J., concurred.
NOTES
[1]  Further references to sections are to the Penal Code unless noted otherwise.
[2]  Petitioner's request that we take judicial notice of the court records filed in his appeal is granted. (Evid. Code, §§ 452, 459.)
[3]  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].
[4]  Two reported cases from other districts that preceded Lewis, People v. Norton (1978) 80 Cal.App.3d Supp. 14 [146 Cal.Rptr. 343] (Norton), from the Santa Barbara Superior Court Appellate Department, and People v. McGinnis (1967) 249 Cal.App.2d 613 [57 Cal.Rptr. 661] (McGinnis), from the Fifth District Court of Appeal, permitted challenges to the validity of the predicate conviction when charged with violating section 12021. However, in light of Lewis, Harty, and Sanchez, we disagree with Norton and McGinnis and do not rely upon them. (See Sanchez, supra, 211 Cal.App.3d at p. 480.)
[5]  We have no occasion in this case to address the validity of petitioner's registration conviction had his predicate conviction been invalidated before he was arrested in California, and we take no position on that issue.
