Appellant was convicted of the offense of selling marijuana. On appeal, he contends that the trial court erred in refusing to declare a mistrial after a witness stated that he bought marijuana from appellant on occasions unrelated to the present prosecution. Appellant also contends that his conviction was improper because it resulted from entrapment. Finding no merit in either contention, we affirm the conviction.
1. The trial court did not err in refusing to declare a mistrial in this case. In response to a question by the prosecuting attorney asking whether the witness had been in contact with the appellant since high school, the witness replied, "Yes. Well, I’ve bought pot from him since high school.” Appellant then moved for a mistrial. The trial judge denied the motion, instructing the jury as follows: "I’m going to instruct the jury based on the statement of the District Attorney that he did not know the contents of the answer. I’ll ask you to disregard the statement concerning any prior indication of any violation of any kind on the part of this defendant. He is on trial for this offense as charged in the presentment which will be before you and for no other offense, and any other evidence not admissible in this trial should not in any manner be considered by you in determining his guilt or innocence of the charge in this case. That is your only function... and you should not let anything outside of the evidence pertaining to the charge in this presentment influence your verdict in any manner ...” Following this, the motion for mistrial was renewed. Appellant argues that the prejudicial effect of the statement was not overcome by the trial judge’s instruction and therefore it was an abuse of discretion to deny the motion for mistrial. We do not agree.
"Ordinarily, when illegal testimony is placed in evidence, it is not an abuse of discretion to refuse to grant a mistrial if sufficient corrective instructions are given in ruling the testimony out... This is true even if the illegal testimony has the effect of placing the defendant’s character in issue . . . especially when the testimony is *80volunteered by the witness and not directly elicited by the solicitor . . .” Brown v. State, 118 Ga. App. 617, 620 (165 SE2d 185) (1968). We conclude that the corrective instruction given by the trial judge in the instant case was sufficient to overcome the prejudicial effect of testimony relating to alleged past criminal activity on the part of appellant.
Argued April 5, 1979 Decided September 4, 1979. Marson G. Dunaway, Jr., for appellant. William A. Foster, III, District Attorney, Barbara V. Tinsley, Assistant District Attorney, for appellee.2. Appellant’s entrapment defense is without merit. "The defendant who interposes an entrapment defense may not controvert the allegations of the indictment.” Reed v. State, 130 Ga. App. 659, 661 (204 SE2d 335) (1974). In asserting the defense of entrapment, the accused necessarily admits committing the offense in question, while denying that he would have committed it without the intervention of law enforcement agents. Appellant, in his testimony, denied committing the offense for which he was convicted. He may not, consistent with this testimony, raise a defense based on entrapment.
Judgment affirmed.
Quillian, P. J., and Birdsong, J., concur.