
692 N.E.2d 1107 (1998)
181 Ill.2d 409
229 Ill.Dec. 896
The PEOPLE of the State of Illinois, Appellant,
v.
Brian WILSON, Appellee.
No. 82930.
Supreme Court of Illinois.
January 23, 1998.
Rehearing Denied March 30, 1998.
Cynthia N. Schneider, State's Attorneys Appellate Prosecutor, Elgin, Lisa Anne Hoffman, Assistant Attorney General, Chicago, State's Attorney Lake County, Waukegan, for the People.
Steven E. Wiltgen, Asst. State Appellate Defender, Elgin, for Brian Wilson.
Justice HARRISON delivered the opinion of the court:
The defendant, Brian Wilson, was charged in the circuit court of Lake County with aggravated battery (720 ILCS 5/12-4(b)(8) (West 1994)) on October 20, 1994. On December 9, 1995, Wilson was also charged with unlawful possession of a controlled substance (720 ILCS 570/402(c) (West 1994)). Wilson posted bond for these two offenses on December 17, 1994. On February 22, 1995, while Wilson was on pretrial release, he was charged with forgery (720 ILCS 5/17-3(a)(2) (West 1994)) and aggravated battery of a peace officer (720 ILCS 5/12-4(b)(6) (West 1994)).
At a hearing on July 28, 1995, defendant entered a negotiated plea of guilty to all of the charges. The terms of the agreement between the State and defendant provided that in exchange for Wilson's plea of guilty, the State agreed to a nolle prosequi of the forgery charge and to recommend a sentence cap of nine years' imprisonment for the three remaining counts. Then, in compliance with Supreme Court Rule 402 (134 Ill.2d R. 402), the trial court described the sentencing possibilities to Wilson, admonished him of his rights, and examined him to determine that his plea was knowingly and voluntarily made and that a factual basis existed for the plea. The trial court accepted the plea of guilty and continued the case for sentencing.
*1108 On September 15, 1995, Wilson filed a motion to withdraw his guilty plea. At this time, the trial court admonished Wilson that he was eligible for extended terms and noted that he might face mandatory consecutive sentences as well. At the sentencing hearing on October 2, 1995, Wilson withdrew his motion to withdraw his guilty plea. The trial court then sentenced Wilson to three concurrent terms of nine years on the aggravated battery offenses and the unlawful possession of a controlled substance offense. Following the trial court's entry of judgment, Wilson filed a pro se motion to reduce sentence. The trial court denied Wilson's motion.
The appellate court reversed the trial court's denial of Wilson's motion to reduce sentence and remanded the matter to the trial court for resentencing. 286 Ill.App.3d 169, 221 Ill.Dec. 385, 675 N.E.2d 292. The appellate court determined that the trial court erred in imposing a concurrent rather than a consecutive sentence on the count of aggravated battery of a peace officer and erred in imposing a nine-year sentence on the charge of unlawful possession of a controlled substance. 286 Ill.App.3d at 173-74, 221 Ill.Dec. 385, 675 N.E.2d 292. We granted the State's petition for leave to appeal. 166 Ill.2d R. 315. For the reasons which follow, we affirm.
The parties frame the issue in this case as whether our decision in People v. Evans, 174 Ill.2d 320, 220 Ill.Dec. 332, 673 N.E.2d 244 (1996), applies to guilty plea agreements where the State and defendant agree to a sentencing cap, but not a specific sentence, in exchange for a defendant's guilty plea. Evans holds that when a defendant pleads guilty in exchange for a specific sentence, he must move to withdraw the guilty plea and vacate the judgment prior to challenging his sentence. The State contends that since Wilson failed to move to withdraw his guilty plea and vacate the judgment, under Evans, he should be barred from protesting his sentence now.
The appellate court also addressed this case as an Evans issue, but distinguished it from Evans noting that, here, only a sentencing cap was agreed to, so the trial court had the discretion to determine an appropriate sentence for defendant in relation to the cap. 286 Ill.App.3d at 172, 221 Ill.Dec. 385, 675 N.E.2d 292. Therefore, the appellate court found that unlike the defendants in Evans, Wilson was not required to withdraw his guilty plea and vacate the judgment in order to challenge his sentences. The court went on to consider the sentencing issues raised by defendant and found that two of the sentences did not conform to statutory requirements. 286 Ill.App.3d at 173-74, 221 Ill.Dec. 385, 675 N.E.2d 292.
We agree with the appellate court's determination that the sentences imposed on Wilson were improper. However, we find it unnecessary to reach the issue of whether Evans applies to sentencing cap agreements, as opposed to a specific sentence. In light of our recent decision in People v. Williams, 179 Ill.2d 331, 228 Ill.Dec. 176, 688 N.E.2d 1153 (1997), we find that Evans is inapplicable to this case and cannot bar defendant's challenge to his sentences. As we pointed out in Williams, the sentences in Evans conformed to statutory requirements and the defendants only claimed that their sentences were excessive. Williams, 179 Ill.2d at 333, 228 Ill.Dec. 176, 688 N.E.2d 1153. In contrast, in the instant case, Wilson argues that the trial court imposed sentences which violated statutory requirements. According to our reasoning in Williams, Wilson's claim of improper sentencing by the trial court is not barred and can be considered regardless of whether Wilson complied with the requirements of Evans. Williams, 179 Ill.2d at 333, 228 Ill.Dec. 176, 688 N.E.2d 1153. We find that under Williams, a challenge to a trial court's statutory authority to impose a particular sentence is not waived when a defendant fails to withdraw his guilty plea and vacate the judgment.
Therefore, we will address the merits of Wilson's claim of improper sentencing. First, Wilson contends that the trial court erred in imposing concurrent, rather than consecutive, sentences for the aggravated battery charges. As stated, Wilson was first charged with aggravated battery, a felony, and posted bond for the offense on December 17, 1994. While on release, he committed the felony of aggravated battery of a peace officer. *1109 Wilson points out that under section 5-8-4(h) of the Unified Code of Corrections (730 ILCS 5/5-8-4(h) (West 1994)) his sentences for the aggravated battery counts were mandatorily consecutive because he committed a separate felony, the aggravated battery of a peace officer, while on pretrial release. Section 5-8-4(h) provides that:
"If a person charged with a felony commits a separate felony while on pre-trial release * * *, the sentences imposed upon conviction of these felonies shall be served consecutively regardless of the order in which the judgments of conviction are entered." 730 ILCS 5/5-8-4(h) (West 1994).
Under section 5-8-4(h), the sentences had to be consecutive because defendant committed the second offense of aggravated battery of a peace officer while he was out on bond from the original count of aggravated battery. We agree that it was error for the trial court to impose concurrent sentences for the two aggravated battery felonies.
Defendant further claims that the trial court erred in sentencing him to nine years' imprisonment for unlawful possession of less than 15 grams of cocaine. This argument is also well taken. The subject offense is a Class 4 felony punishable by a nonextended term of one to three years' incarceration (730 ILCS 5/5-8-1(a)(7) (West 1994)) and an extended term of three to six years' incarceration (730 ILCS 5/5-8-2(a)(6) (West 1994)). Accordingly, the nine-year term of imprisonment imposed by the trial court plainly exceeded the authorized maximum extended term.
We conclude that the sentences imposed in this case violated statutory requirements. For the foregoing reasons, we affirm the judgment of the appellate court vacating the sentences imposed by the circuit court and remanding to the circuit court for resentencing.
Affirmed.
