delivered the opinion of the court:
Both defendants in this consolidated appeal were convicted of predatory criminal sexual assault of a child. While defendants’ respective appeals were pending, this court invalidated Public Act 89 — 428, which created this offense. Subsequently, in case No. 85524, the appellate court reversed defendant Gomecindo Tellez-Valencia’s conviction, holding that the State could not amend the charging instrument on appeal. 295 Ill. App. 3d 122. However, the appellate court in No. 85532 affirmed defendant Robbie J. Moore’s conviction, allowing the State to amend the charge on appeal to aggravated criminal sexual assault. 295 Ill. App. 3d 676. We consolidated the two cases, and now hold that, when a defendant is convicted of an offense later held unconstitutional, the State may not amend the charging instrument on appeal.
BACKGROUND
Defendants were both charged with and convicted of predatory criminal sexual assault of a child for acts committed in the spring of 1996. Subsequent to defendants’ convictions, and while their appeals were pending, this court held that Public Act 89 — 428 was enacted in violation of the single subject rule (Ill. Const. 1970, art. IV, § 8) and declared the Act unconstitutional in its entirety. Johnson v. Edgar, 176 Ill. 2d 499 (1997). Shortly thereafter, the General Assembly passed Public Act 89 — 462, reenacting the offense of predatory criminal sexual assault of a child. Public Act 89 — 462 did not become effective, however, until May 29, 1996, and by its language, does not apply to offenses occurring before that date.
On appeal, both defendants argued that their convictions were invalid because they were based upon charging instruments that failed to state an offense. The Second District of the Appellate Court reversed the conviction of defendant Tellez-Valencia, holding that only the grand jury could make a substantive change to the defendant’s indictment. 295 Ill. App. 3d at 127. The Fourth District of the Appellate Court, however, reached the opposite result in defendant Moore’s case, holding that the State could amend the trial court’s judgment and sentencing order to change the name of the offense of which defendant was convicted from predatory criminal sexual assault of a child to aggravated criminal sexual assault, thereby effectively amending defendant’s indictment on appeal. In so holding, the court in Moore noted the identical nature and elements of the two offenses, and reasoned that such an amendment constituted a mere formality, thus affirming the conviction. 295 Ill. App. 3d at 683-84. We granted leave to appeal in order to resolve this conflict in the appellate court.
ANALYSIS
When Public Act 89 — 428 was held unconstitutional by this court’s ruling in Johnson v. Edgar, 176 Ill. 2d 499 (1997), the offense of predatory criminal sexual assault of a child was rendered void ah initia-, that is, it was as if the law never existed. See People v. Gersch, 135 Ill. 2d 384, 390 (1990). Although the General Assembly later reenacted the offense, this reenactment had the effect of creating an entirely new criminal statute. Each defendant’s charging instrument thus failed to state an offense because the statute under which each was charged and prosecuted was not in effect when the alleged offenses occurred. Accordingly, defendants’ convictions for predatory criminal sexual assault of a child cannot stand.
The State argues that amendment of defendants’ charging instruments on appeal to change the name of the offense charged from predatory criminal sexual assault of a child to aggravated criminal sexual assault is merely a formality because the elements of the two crimes, as well as the statutory language and penalties as applied to defendants, are identical. The State reasons that defendants are not prejudiced in any way by such an amendment because each was apprised of the nature and elements from which to prepare a defense, regardless of the specific name given to the alleged criminal act.
While we acknowledge that formal defects in a charging instrument may be amended by the State at any time (see 725 ILCS 5/111 — 5 (West 1998)), we disagree with the State’s characterization of the proposed amendment in the cases at bar as a mere formality. The committee comments to section 111 — 5 of the Code of Criminal Procedure of 1963 specifically exclude failure to charge a crime from those defects in a charge considered merely formal and which may be cured by amendment at any time, instead labeling this a substantive defect. See 725 ILCS 5/111 — 5, Committee Comments — 1963 (Smith-Hurd 1992). Further, the defect caused by charging an offense based upon a statute not in effect when the alleged offense occurred is fatal, rendering the entire instrument invalid, and warranting reversal of defendants’ convictions. See People v. Wasson, 175 Ill. App. 3d 851, 854, 855 (1988).
People v. Ryan, 117 Ill. 2d 28 (1987), upon which the dissent places great weight, is distinguishable and has no application to the case at bar. In Ryan, the defendants were charged with unlawful possession of a weapon by a felon for acts committed in December 1985 and January 1986. Ryan, 117 Ill. 2d at 30-31. The defendants’ charging instruments, however, incorrectly cited to “Illinois Revised Statutes, 1983,” although the statute which created the offense did not take effect until July 1984. Ryan, 117 Ill. 2d at 37. This court held that citation to the wrong edition of the Illinois Revised Statutes on defendants’ charging instruments was not a fatal defect and reversed the trial court’s ruling that the informations failed to state an offense. Ryan, 172 Ill. 2d at 37.
Unlike the present case, however, the defendants in Ryan were charged with an offense that was in existence before, during and after the time the defendants committed their crimes. The offense of predatory criminal sexual assault of a child, by contrast, was rendered nonexistent at the time defendants Moore and Tellez-Valencia committed the acts for which they were convicted. Thus, contrary to the dissent’s contention, what occurred in the case at bar was more than just an error in citation on the defendants’ charging instruments, as was the case in Ryan-, both of the instant defendants were charged with and convicted of a nonexistent offense.
The amendment sought by the State to each defendant’s charging instrument is to cure a substantive, not a formal, defect. Accordingly, these amendments may not be made on appeal. The charging instrument in each case is therefore invalid, and each defendant’s conviction must be reversed.
CONCLUSION
For the above reasons, we affirm the judgment of the appellate court in cause No. 85524 and reverse the judgments of the appellate and circuit courts in cause No. 85532.
No. 85524 — Affirmed.
No. 85532 — Judgments reversed.