delivered the opinion of the court:
Defendant, James Stadtman, appealed from the judgment of the circuit court of Sangamon County entered upon a jury verdict finding him guilty of theft (Ill. Rev. Stat. 1969, ch. 38, pars. 16 — 1(a), 16 — 1(d)). The appellate court affirmed (15 Ill. App. 3d 259), and we allowed defendant’s petition for leave to appeal. In a four-count indictment defendant and two co-defendants were charged with burglary (ch. 38, par. 19 — 1), possession of marijuana (ch. 38, par. 22 — 3), and two counts of theft (ch. 38, pars. 16 — 1(a) and 16 — 1(d)). At the close of the People’s case the trial court allowed defendant’s motion for directed verdict on the marijuana charge. The jury found defendant not guilty of burglary and guilty of theft.
The record shows that on the day before trial all four counts of the indictment were dismissed as to Michael Dagley, one of the co-defendants, and he was called by the People to testify at defendant’s trial. On direct examina*231tion he was asked, “Mr. Dagley, calling your attention to the week prior to November 17, 1970, did you ever see Mr. Stadtman smoke any marijuana?” Over defendant’s objection, the court permitted the witness to answer “yes.”
Defendant contends that the admission of evidence of his prior use and possession of marijuana was reversible error. Citing People v. Killebrew, 55 Ill.2d 337, the People argue that “in order to preserve error for review counsel must timely object on specific grounds,” and that in objecting to Dagley’s testimony only on the ground that it was “irrelevant” defendant waived objection to its admission on the ground that it was prejudicial. Evidence which tends to prove guilt is always prejudicial to a defendant charged with commission of a criminal offense, and we are aware of no authority for the People’s position that “prejudice” is a ground for objection to its admission. In objecting to the admission of the testimony as irrelevant defendant did not, as contended by the People, waive the error resulting from its being admitted.
The People argue that the evidence of the prior possession and use of marijuana was admissible to prove defendant’s “guilty knowledge” of the offense for which he was charged. The appellate court, citing People v. Cole, 29 Ill.2d 501, and People v. Wilson, 46 Ill.2d 376, stated: “It must be remembered that he [defendant] was charged at this time with the unlawful possession of narcotics and that issue was still before the court. It would seem that the evidence was admissible to establish conduct, motive and knowledge of the defendant on this particular charge.” 15 Ill. App. 3d 259, 262.
The general rule is that evidence of crimes other than those charged is inadmissible. (People v. Peto, 38 Ill.2d 45.) The exception to this rule applies when the evidence is independently relevant to prove motive, intent, identity or some other issue connected with the crime charged. (People v. Lehman, 5 Ill.2d 337.) Thus, in Cole, evidence *232of the unlawful sales of narcotics by defendant to a Federal agent on July 20 and September 26 was admitted in defendant’s trial for an unlawful sale to the same agent on October 10 to “explain and lend credence to the otherwise unrealistic ease with which the Federal agent managed the controlled sale on October 10.” (29 Ill.2d 501, 505.) In Wilson, evidence that the defendant had made an unlawful sale of narcotics at an apartment was admitted, in his trial for unlawful possession of narcotics found at the apartment one hour later, to refute defendant’s contention that he had no knowledge of the narcotics and that they belonged to other persons present in the apartment. Here the testimony concerning defendant’s prior possession and use of marijuana would prove nothing other than his propensity to commit the offense with which he was charged, and in admitting it into evidence the trial court erred. People v. Rivas, 5 Ill.2d 556.
The People contend that assuming, arguendo, that the trial court erred in admitting the testimony concerning defendant’s prior possession and use of marijuana, the error was harmless for the reason that it had no prejudicial effect on the theft count of which he was convicted. In support of this contention the People point out that the jury acquitted defendant of the burglary charge and argue that “the use of marijuana is accepted by a substantial portion of the community.” In rejecting defendant’s contention that the evidence was prejudicial, the appellate court said: “The dismissal of the narcotics charge by the court for insufficiency of evidence should eliminate any possible prejudice to the defendant attributable to this testimony.” (15 Ill. App.3d 259, 262.) We do not agree. “Where error is shown to exist, it will compel reversal, unless the record affirmatively shows that the error was not prejudicial.” (Duffy v. Cortesi, 2 Ill.2d 511, 517.) The erroneous admission of the testimony of defendant’s use of narcotics was clearly prejudicial (People v. Smith, 38 Ill.2d 237; People v. Battle, 24 Ill.2d 592) and the *233judgment must, therefore, be reversed.
The judgments of the Appellate Court for the Fourth District and the circuit court of Sangamon County are reversed, and the cause is remanded for a new trial.
Reversed and remanded.