The defendant first assigns error to the denial of his motion to dismiss on the ground that there was not sufficient evidence for a rational trier of fact to find the defendant guilty beyond a reasonable doubt. He bases this argument on what he contends is the unreliability of the undercover agent’s identification of him during the trial. The undercover agent had an adequate opportunity to observe the man who sold her the heroin when the negotiations and sale of the heroin took place. The credibility of her testimony was for the jury. This assignment of error is overruled.
The defendant next assigns error to the admission of testimony that he had sold drugs almost two years before the offenses for which he was being tried. We believe this assignment of error was merit. The general rule is that in a prosecution for a particular crime, the State cannot prove that the accused has committed another crime. See State v. McClain, 240 N.C. 171, 81 S.E. 2d 364 (1954). In McClain our Supreme Court ordered a new trial in a case in which testimony was admitted that the defendant had committed larceny while she was being tried for engaging in prostitution. The Court in that case listed eight exceptions to the general rule, among which are evidence to show a “specific mental intent or state which is an essential element of the crime charged,” and evidence “to establish the requisite guilty knowledge.” In his treatise on evidence Professor Brandis comments that the rule is commonly supposed to be difficult to apply. He simplifies the rule, and states it as follows:
Evidence of other offenses is inadmissible on the issue of guilt if its only relevancy is to show the character of the accused or his disposition to commit an offense of the nature of the one charged; but if it tends to prove any other relevant *362fact it will not be excluded merely because it also shows him to have been guilty of an independent crime.
1 H. Brandis, Brandis on N.C. Evidence § 91 (2d rev. ed., 1982).
The State argues that the testimony was admissible under the two above cited exceptions listed in McClain. It also argues that this testimony is admissible under the rule as stated by Professor Brandis as proving intent and guilty knowledge which are relevant facts to the crime of possession with intent to sell and the sale of heroin. The defendant does not contend that whoever possessed and sold the heroin did not have the specific mental intent to do so or that he did not have guilty knowledge. He contends he was not the person who possessed or sold it. There was little need for this evidence to prove the State’s case as to intent and guilty knowledge. If we were to hold that testimony of a similar crime committed almost two years previously is admissible to prove intent or guilty knowledge we believe there would be little left of the rule. We believe the evidence of the previous crime proved only the defendant’s character or disposition to commit the offense with which he was charged and should have been excluded. We hold this was error which requires a new trial.
New trial.
Judges BECTON and PARKER concur.