#### THE PEOPLE OF THE STATE OF ILLINOIS, Plaintiff-Appellee, v. MITCHELL McGEE, Defendant-Appellant.

Third District

No. 3—98—0996

Opinion filed July 7, 2000.

Sherry R. Silvern, of State Appellate Defender’s Office, of Ottawa, for appellant.

Paul Mangieri, State’s Attorney, of Galesburg (John X. Breslin and Richard T. Leonard, both of State’s Attorneys Appellate Prosecutor’s Office, of counsel), for the People.

JUSTICE HOLDRIDGE

delivered the opinion of the court:

The defendant, Mitchell McGee, pled guilty to theft. 720 ILCS 5/16 — 1 (West 1998). He was sentenced to a two-year term of imprisonment. He later filed a motion to withdraw his guilty plea, which was denied. On appeal, the defendant argues that the trial court abused its discretion in denying his motion to withdraw the guilty plea because the court accepted his plea without requiring the State to establish a factual basis.

The record reflects that on September 29, 1998, the trial court held a hearing on the defendant’s guilty plea. During the hearing, the court asked defense counsel whether the defendant was prepared to stipulate that there were witnesses that would testify to the matters alleged in the information. Defense counsel said he would so stipulate. The court then noted that it found a factual basis based upon the stipulation, accepted the plea, and said it would sentence the defendant to a two-year term of imprisonment. The defendant was advised of his appeal rights and the requirement to file a motion to withdraw the *1038plea within 30 days. On October 2, 1998, the court filed an order indicating that the defendant received a two-year term of imprisonment. On November 12, 1998, the defendant filed a motion to withdraw his plea. After a hearing, the court denied the motion.

On appeal, the defendant argues that the trial court abused its discretion in denying his motion to withdraw his plea. He contends that he could not have voluntarily and knowingly entered into the plea when no factual basis was established. In response, the State argues that we cannot reach the merits of this case because we lack jurisdiction pursuant to Supreme Court Rule 604(d). 145 111. 2d R. 604(d). Specifically, the State points out that the defendant did not file his motion to withdraw his plea within 30 days after he was sentenced.

Supreme Court Rule 604(d) in pertinent part provides:

> “No appeal from a judgment entered upon a plea of guilty shall be taken unless the defendant, within 30 days of the date on which sentence is imposed, files in the trial court a motion to reconsider the sentence, if only the sentence is being challenged, or, if the plea is being challenged, a motion to withdraw his plea of guilty and vacate the judgment.” 145 111. 2d R. 604(d).

Compliance with Rule 604(d) is a condition precedent to a defendant’s appeal. People v. Jamison, 181 Ill. 2d 24, 690 N.E.2d 995 (1998). Therefore, the appellate court must dismiss the appeal of a defendant who fails to file a timely written motion to withdraw his plea of guilty. Jamison, 181 Ill. 2d 24, 690 N.E.2d 995. The failure of a defendant convicted on a plea of guilty to file a Rule 604(d) motion is a jurisdictional defect that prevents the appellate court from entertaining an appeal from that judgment unless the defendant had not been properly admonished pursuant to Supreme Court Rule 605(b). People v. Feltes, 258 Ill. App. 3d 314, 629 N.E.2d 1172 (1994). Supreme Court Rule 605(b) requires that, at the time a sentence is imposed, a trial court shall advise the defendant of his appeal rights. 145 Ill. 2d R. 605(b). Here, we agree with the State that we have no jurisdiction over this case. Although the trial court clearly erred when it accepted the defendant’s guilty plea without requiring the State to establish a factual basis, we cannot change, however, the fact that the defendant violated Supreme Court Rule 604(d) (145 Ill. 2d R. 604(d)) when he filed his motion to withdraw the plea more than 30 days after he was sentenced and after he had been admonished about the time limits in which to file such a motion. Additionally, after accepting the faulty plea, the trial court again erred in holding a hearing on the defendant’s motion when it had been divested of jurisdiction by the defendant’s failure to file a timely motion. See People v. Williams, 53 Ill. App. 3d 335, 368 N.E.2d 706 (1977) (the lapse of more than 30 days from *1039imposition of sentence divests a trial court of jurisdiction to entertain a defendant’s motion to vacate his guilty plea). The fact that the State did not object to the trial court’s lack of jurisdiction is irrelevant. Williams, 53 Ill. App. 3d 335, 368 N.E.2d 706. Accordingly, since the defendant failed to comply with the requirements of Rule 604(d), we must dismiss this appeal for lack of jurisdiction. 145 Ill. 2d R. 604(d).

Appeal dismissed.

LYTTON and KOEHLER, JJ., concur.