delivered the opinion of the court:
Following a jury trial in the circuit court of Champaign County in 1985, defendant was found guilty of armed robbery (Ill. Rev. Stat. 1983, ch. 38, par. 18 — 2(a)) and sentenced to an extended term of 45 years’ imprisonment based on a previous conviction for attempted murder. The circuit court’s judgment was affirmed on direct review. People v. Harvey, 140 Ill. App. 3d 1151 (1986) (unpublished order under Supreme Court Rule 23). A post-conviction petition challenging the judgment was subsequently rejected. People v. Harvey, 190 Ill. App. 3d 1112 (1989) (unpublished order under Supreme Court Rule 23).
Defendant has now filed a petition under section 2 — 1401 of the Code of Civil Procedure (735 ILCS 5/2— *4471401 (West 1998)), challenging his extended-term sentence on the grounds that it is void. The circuit court rejected defendant’s challenge, and the appellate court affirmed. No. 4 — 99—0073 (unpublished order under Supreme Court Rule 23). For the reasons that follow, we now affirm the judgment of the appellate court.
In undertaking our review, we begin by noting that there is no issue as to defendant’s right to seek redress by means of a section 2 — 1401 petition. Section 2 — 1401 provides a comprehensive statutory procedure by which final orders, judgments, and decrees may be vacated after 30 days from their entry. Although a section 2 — 1401 petition is usually characterized as a civil remedy, its remedial powers extend to criminal cases. People v. Haynes, 192 Ill. 2d 437, 460-61 (2000).
As a general rule, a petition for relief from judgment under section 2 — 1401 must be filed within two years after entry of the judgment being challenged. 735 ILCS 5/2 — 1401(c) (West 1998). A section 2 — 1401 petition filed beyond the two-year period will not normally be considered. People v. Caballero, 179 Ill. 2d 205, 210 (1997). An exception to the two-year period has been recognized where a clear showing has been made that the person seeking relief is under legal disability or duress or the grounds for relief are fraudulently concealed. Caballero, 179 Ill. 2d at 210-11. A person may also seek relief beyond section 2 — 1401’s two-year limitations period where the judgment being challenged is void. R.W. Sawant & Co. v. Allied Programs Corp., 111 Ill. 2d 304, 309-10 (1986); see In re Marriage of Steinberg, 302 Ill. App. 3d 845, 856 (1998). In addition, section 2 — 1401’s limitations period may be waived by the opposing party. People v. Ross, 191 Ill. App. 3d 1046, 1053 (1989).
Because the defendant in this case is challenging his extended-term sentence on the grounds that it is void, the State has conceded that section 2 — 1401’s two-year *448limitations period is inapplicable. Here, as in the appellate court, it has not attempted to invoke that deadline as a barrier to defendant’s petition. We shall therefore proceed to address defendant’s claims on the merits.
In imposing sentences, trial courts must adhere to statutory requirements. If a trial court imposes a sentence greater than that permitted by statute, the excess portion of the sentence is void. See People v. Rankin, 297 Ill. App. 3d 818, 822 (1998). Accordingly, the extended-term portion of a criminal sentence is subject to challenge and cannot stand where the requirements of the extended-term sentencing statute have not been met. See People v. Pittman, 316 Ill. App. 3d 245, 253 (2000). Defendant contends that this is such a case.
The extended-term sentence challenged here was imposed by the circuit court pursuant to section 5 — 8—2 of the Unified Code of Corrections (Ill. Rev. Stat. 1983, ch. 38, par. 1005 — 8—2) based on its findings that the factors in aggravation set forth in section 5 — 5—3.2(b)(1) of the Unified Code of Corrections (Ill. Rev. Stat., 1984 Supp., ch. 38, par. 1005 — 5—3.2(b)(1)) were present. The aggravating factors set forth in section 5 — 5—3.2(b)(1) exist when a defendant has been “convicted of any felony, after having been previously convicted in Illinois of the same or greater class felony, within 10 years, excluding time spent in custody, and such charges are separately brought and tried and arise out of different series of acts.” Ill. Rev. Stat., 1984 Supp., ch. 38, par. 1005 — 5— 3.2(b)(1).
The felony for which defendant was convicted and for which he was sentenced to the extended term was armed robbery. At the time he received the extended-term sentence, defendant had previously been convicted of attempted murder. That conviction, dating to 1974, was also a felony. There is no dispute that both convictions took place in Illinois and occurred within 10 years of *449each other, excluding time defendant spent in custody. There is likewise no dispute that the charges underlying the convictions were separately brought and tried and arose out of different series of acts. Defendant’s challenge to his extended-term sentence turns solely on the question of whether attempted murder can be regarded as “the same or greater class felony” as armed robbery.
At the time defendant committed attempted murder, the offense was classified as a Class 1 felony for sentencing purposes. See Ill. Rev. Stat. 1973, ch. 38, par. 8 — 4(c)(1). So was armed robbery. Ill. Rev. Stat. 1973, ch. 38, par. 18 — 2(b). By the time defendant had committed the armed robbery for which he received the extended term, the Criminal Code of 1961 had been amended. For purposes of sentencing, attempted murder was no longer considered a Class 1 felony. It was now a Class X felony. Ill. Rev. Stat. 1983, ch. 38, par. 8 — 4(c)(1); People v. Zuniga, 99 Ill. App. 3d 396, 401-02 (1981). The same was true, however, of armed robbery. It was also reclassified as a Class X felony. Ill. Rev. Stat. 1983, ch. 38, par. 18— 2(b). The relative severity of the offenses thus remained unchanged. For purposes of sentencing, both offenses were still of the same class. That being so, the requirements of the extended-term sentencing provisions were satisfied.
Defendant challenges this conclusion by arguing that the classification of his attempted murder conviction should be determined in accordance with the law as it existed at the time he committed that offense. In his view, the reclassification should be disregarded. Similar claims were advanced by other defendants in the wake of the legislature’s reclassification of offenses in 1978. They were properly rejected by the appellate court then (see People v. Tipton, 207 Ill. App. 3d 688, 703-04 (1990); People v. Butler, 78 Ill. App. 3d 809, 814-18 (1979)), and they were properly rejected by the appellate court here. *450The change in the law did not affect the elements of the crime, and the relative severity of attempted murder was correctly assessed by the circuit court in accordance with the law as it existed after that offense was reclassified.
How defendant’s attempted murder conviction should be classified for purposes of the extended-term sentencing rules is not affected by this court’s recent decision in People v. Olivo, 183 Ill. 2d 339 (1998). In contrast to the present case, Olivo had nothing to do with the effect of statutory reclassification on offenses which were and remained of the same relative severity. The prior convictions in Olivo were less severe than the conviction for which the extended term was imposed. They had merely drawn enhanced sentences. Because enhancement of a sentence does not operate to elevate the class of the crime for which the sentence is imposed, the defendant in Olivo could not be said to have been previously convicted “of the same or greater class felony” within the meaning of section 5 — 5—3.2(b)(1). That case is therefore inapposite.
As an alternative basis for attacking the lower courts’ judgments, defendant argues that using his 1974 attempted murder conviction as an aggravating factor to support imposition of an extended term for his subsequent armed robbery conviction contravenes the federal and state constitutional prohibitions against ex post facto laws (U.S. Const., art. I, § 10; Ill. Const. 1970, art. I, § 16). The prohibition against ex post facto laws bars a state from enacting legislation that “ ‘changes the punishment, and inflicts a greater punishment, than the law annexed to the crime, when committed.’ ” (Emphasis omitted.) Collins v. Youngblood, 497 U.S. 37, 42, 111 L. Ed. 2d 30, 38, 110 S. Ct. 2715, 2719 (1990), quoting Calder v. Bull, 3 U.S. (3 Dall.) 386, 390, 1 L. Ed. 648, 650 (1798). Defendant contends that the statutory reclassification of his attempted murder conviction from a Class 1 to a Class X felony offends that prohibition *451because, in light of the extended-term sentencing provisions, it had the effect of subjecting him to a more serious punishment for attempted murder than would have been possible when he committed the crime.
There are two flaws in this argument. First, it fails to appreciate that the particular classification a felony carries has no importance, in and of itself, for purposes of applying the extended-term sentencing provisions. As our discussion has suggested, the critical inquiry in determining whether those sentencing provisions are applicable is the relative severity of the offenses. The offenses at issue here retained their same relative severity. Before reclassification they were both regarded as Class 1 felonies. After reclassification they were both regarded as Class X felonies. There was no change in the elements of the offenses, and there was never a time when attempted murder was considered to be less serious than armed robbery. Reclassification thus had no effect on defendant’s eligibility for an extended term.
The second, and equally fundamental, flaw in defendant’s argument is that it assumes that the enhanced punishment defendant received is attributable to his attempted murder conviction. It is not. Defendant’s subsequent conviction for armed robbery is what drew the enhanced sentence. His punishment for the attempted murder conviction remained the same. Defendant’s prior conviction for attempted murder merely served as a factor in aggravation at the sentencing hearing for defendant’s subsequent armed robbery conviction. Under such circumstances, our court has specifically held that no ex post facto concerns are present. People v. Dunigan, 165 Ill. 2d 235, 242-43 (1995).
For the foregoing reasons, the judgment of the appellate court is affirmed.