¶1*865Parks N. Small, Federal Public Defender, Columbia, S.C., for appellant.
¶2Douglas H. Westbrook, Asst. U.S. Atty., Greenville, S.C. (Henry Dargan McMaster, U.S. Atty., Columbia, S.C., on brief), for appellee.
¶3Before WIDENER and CHAPMAN, Circuit Judges, and MERHIGE, District Judge.*
¶6This is an appeal from a conviction for receipt of a firearm by a convicted felon under 18 U.S.C. § 922(h)(1). On appeal, the defendant asserts that the court committed reversible error in admitting testimony that the defendant on a prior occasion had been seen in possession of a gun. We agree with the defendant, and vacate the conviction and remand for a new trial.
¶7On or about June 13,1981, the defendant, while driving his wife’s car, was stopped by police who had a warrant to search the defendant’s home for drugs. The police searched the trunk of the car and discovered a .38 caliber pistol and a .32 caliber pistol.1 At trial, the defendant testified that he did not know that either gun was in the trunk. The defendant further testified that the .38 caliber pistol belonged to a passenger in the car and the .32 caliber pistol belonged to his wife. On rebuttal in the order of proof at the trial,2 the prosecution put on evidence that the defendant had been seen in possession of a pistol some time during the first part of 1981, before June of that year. That pistol was not, however, one of the guns found in the car when the defendant was stopped in June 1981, and the .32 found in the car and the subject of count 2 of the indictment was the same .32 the defendant was charged with receiving in count .1, also in June 1981.
¶8Evidence of other crimes or wrongs is not admissible for the purpose of proving that the defendant possesses a criminal character or otherwise had the propensity to commit the crime with which he is charged. Fed.R.Evid. 404(b). Lovely v. United States, 169 F.2d 386 (4th Cir.1948), *866is our leading case. If offered for certain other purposes, however, such evidence is admissible if the risk of undue prejudice is outweighed by its probative value. See, e.g., United States v. Masters, 622 F.2d 83, 86-87 (4th Cir.1980) (evidence admissible as a part of a complete conversation showing the context of the crime and the setting of the case); United States v. Sparks, 560 F.2d 1173, 1175 (4th Cir.1977) (evidence admissible to prove knowledge and intent); United States v. DiZenzo, 500 F.2d 263, 265 (4th Cir.1974) (evidence admissible to prove knowledge and intent); United States v. Samuel, 431 F.2d 610, 612 (4th Cir.1970), cert, denied, 401 U.S. 946, 91 S.Ct. 964, 28 L.Ed.2d 229 (1971) (evidence admissible to prove knowledge).
¶9The government argues that the evidence at issue was admissible to show guilty knowledge on the part of the defendant. This argument, however, must be rejected. The possession by the defendant of a different gun on a previous occasion has no relevance to the issue of whether the defendant knew on the day he was stopped that the two pistols were in the trunk of his wife’s car, or that he knew that the chattel he received and was charged with in count 1 was a pistol. But the commission of the same bad act on a previous occasion is bound to have had the effect of tending to show that the defendant had the propensity to commit the crimes for which he was on trial.
¶10We therefore conclude that it was error to admit the evidence. Moreover, because it cannot be said with fair assurance that the verdict “was not substantially swayed by the error, Kotteakos v. United States, 328 U.S. 750, 765, 66 S.Ct. 1239, 1248, 90 L.Ed. 1557 (1946), we must vacate the defendant’s conviction and remand for a new trial.
¶11VACATED AND REMANDED.