OPINION OF THE COURT
Simons, J.These two unrelated appeals concern the admissibility, under the rule in People v Molineux (168 NY 264), of evidence of prior crimes to establish intent in the prosecution of charges in which the gist of the offense is guilty knowledge. In People v Alvino, defendant was charged with issuing a false certificate (Penal Law § 175.40) and bribe receiving, second degree (Penal Law former § 200.10). During their direct case, the People offered evidence of 15 similar crimes to establish that defendant knew an amended driver’s license was false when he issued it and that it was issued because of an agreement between defendant and another to issue amended drivers’ licenses for money. In People v Hernandez, defendant was charged with various drug counts, including criminal sale, possession and possession with intent to sell. Evidence of prior drug sales was offered on rebuttal, after defendant had admitted possession of the drugs but denied that he intended to sell them or that he had ever sold drugs in the past, to establish his intent to sell. The evidence was properly received in both cases and the convictions should, therefore, be sustained.
I
A
Defendant Alvino was a cashier employed by the New York *238State Department of Motor Vehicles in Manhattan. His duties included processing, approving and issuing various licenses, permits and, as in this case, amended drivers’ licenses for which no fee is charged. The principal witness for the prosecution was Mario Falto, a man, who by his own admission, had spent the last 10 years of his life illegally obtaining various licenses and other documents by bribing officials of the Department of Motor Vehicles. On July 19, 1982, he was arrested on one such charge and agreed to work undercover for the District Attorney in hopes of obtaining a more lenient sentence.
Falto testified at defendant’s trial that, while working with the District Attorney on September 10, 1982, he gave defendant $100 in cash in return for defendant’s processing and issuing a false amended driver’s license in the name of Victor Lopez. An investigator for the District Attorney’s office, standing nearby at the time of the transaction, testified that he saw Falto hand defendant five bills in United States currency. The People also introduced two tape recordings of conversations between Falto and defendant on the day of the charged crimes. On one tape, which recorded the transaction when Falto received the amended license, Falto stated he was handing defendant money. The other recorded a conversation between defendant and Falto later in the day. Although the tape was barely audible, the People claim that the second conversation relates to the Lopez license transaction and that statements made by defendant and recorded on the tape constituted an admission by him that he received money from Falto. Over defendant’s objections, Falto was also permitted to testify that he had engaged in 15 prior transactions with defendant in which defendant had issued similar false documents to Falto or his partner in return for money.
Before receiving this evidence, the court held an extensive inquiry in the absence of the jury, as we have suggested a court should (see, People v Ventimiglia, 52 NY2d 350, 361-362). At the hearing, the prosecutor contended that the evidence was admissible either on the issue of intent or absence of mistake. Defense counsel opposed reception of the evidence asserting that intent or mistake was not in issue because defendant would not claim that he had taken the money by mistake or without any criminal intent but that he had not taken it at all. Indeed, that was defendant’s testimony at trial. Counsel claimed, therefore, that the evidence was not relevant and that the prejudice resulting from its reception far ex*239ceeded its probative value. The court admitted the testimony and the jury found defendant guilty as charged. A divided Appellate Division affirmed the judgment.
B
In People v Hernandez, defendant was convicted after trial of criminal sale of a controlled substance in the third degree (Penal Law § 220.39), criminal possession of a controlled substance in the third degree (Penal Law § 220.16 [intent to sell]) and criminal possession of a controlled substance in the seventh degree (Penal Law § 220.03). The charges arose from an incident observed by a four-man police team during their surveillance of a Manhattan schoolyard. From the roof of a nearby building, two officers observed defendant engage in two suspicious transactions which appeared to be drug sales. No arrests were made, however, until they observed a third transaction. After the third buyer left the scene, the two officers on the roof notified two officers on the ground who then followed the buyer and arrested him. They found a glassine envelope marked "Force 44” in his shoe and 37 hypodermic needles on his person. The officers on the roof then descended, followed defendant and arrested him. They found in his possession 21 envelopes containing cocaine, each stamped with the logo "Force 44”.
After the People had presented this evidence at trial, defendant took the witness stand. He testified that he was an unemployed pauper and had been addicted to cocaine for the last 10 years. He claimed that to support his habit he had become a professional shoplifter who stole clothing from department stores and then sold it on the streets. He admitted several prior larceny arrests and convictions and one arrest on May 1, 1984, after which he had pleaded guilty to criminal possession of a controlled substance. Defendant testified that on the day of his arrest he had purchased drugs from a seller and paid $105 for 21 $5 glassines of cocaine. The money for the purchase had come from his sale of six pairs of jeans and five shirts, all stolen. He stated that the "nickel bags” in his sneakers were for his own consumption and he estimated that they would last him no more than an hour. He was an addict, he claimed, not a drug seller; he had not intended to sell the drugs to anyone. Indeed, he claimed he had never sold drugs to anyone.
In light of defendant’s claim, the People were permitted on *240cross-examination to question him about three recent episodes on May 1, 12 and 15, 1984, when he allegedly had sold drugs. He denied the People’s accusations and repeated his claim that he had never sold drugs. The People then recalled Officer Bisogna, one of the arresting officers who testified, on rebuttal, that on May 1, 1984 he saw defendant on the street holding glassine envelopes in his hand and surrounded by a crowd. When defendant sighted him, Officer Bisogna said, he threw the glassine envelopes to the ground. Defendant was arrested and, as defendant had admitted, pleaded guilty to criminal possession of a controlled substance. Officer Bisogna and Officer Orlando also testified on rebuttal that they watched from the rectory of a neighborhood church on May 12, 1984 at 6:00 p.m., disguised in clerical garb, as defendant appeared some 15 feet away holding a clear glassine bag containing about 50 glassine envelopes. Customers lined up in front of defendant exchanging money for glassine envelopes. The officers arrested one of the buyers, who possessed glassine envelopes, but defendant escaped before they could arrest him. Officer Orlando also testified he observed three other sales by defendant on May 15, 1984, which resulted in his arrest and the arrest of a buyer, both of whom were found in possession of glassine envelopes containing cocaine.
This rebuttal evidence of prior crimes was received over defendant’s objection and after an extended colloquy at which the People first urged that it was admissible on the issue of credibility. Defendant contended, however, that the People were bound by defendant’s answers on cross-examination and could not introduce collateral evidence to impeach him (see, People v Crandall, 67 NY2d 111, 118; People v Pavao, 59 NY2d 282, 288; People v Schwartzman, 24 NY2d 241, 245, cert denied 396 US 846). The People then urged that defendant had sought to controvert his intent to sell — a material fact in the prosecution — by his bizarre testimony and that the evidence of uncharged crimes was admissible on rebuttal to disprove it. The court admitted the rebuttal evidence solely to impeach defendant’s credibility and he was convicted of criminal sale, possession with intent to sell, and possession.
The Appellate Division, basing its holding on our decision in People v Crandall (67 NY2d 111, supra), modified on the law by reversing the convictions for criminal sale and possession with intent to sell and ordering a new trial on those counts. It affirmed the count charging criminal possession in the seventh degree inasmuch as defendant had admitted possession. The *241Appellate Division stated that the rebuttal testimony could not be justified on the theory that it was appropriate to show defendant’s intent to sell, because to be admissible for such purpose the evidence would have to be tendered as part of the People’s direct case. It held, therefore, that the only possible basis for admission of the evidence was to impeach defendant’s credibility. It held that defendant’s denial that he ever sold drugs did not permit the prosecution to cross-examine defendant about specific instances of alleged prior drug sales and to introduce, through extrinsic evidence, such prior sales. Two Judges dissented. They contended that the evidence was not collateral evidence, used only to impeach credibility, and it should have been received as evidence of guilt because defendant had not merely denied guilt but had tried to prove a material fact in exoneration of the charge, that he had never sold drugs and did not intend to sell those in his possession in this instance. Before this court the People contend the evidence of prior crimes was admissible as evidence of guilt and under the circumstances, properly received on rebuttal. We reverse and reinstate the judgment of conviction.
II
We recently reaffirmed the well-established rules that evidence is relevant if it has "any ' " 'tendency in reason to prove any material fact’ ” ’ ” and that all relevant evidence is admissible at trial unless admission violates some exclusionary rule (People v Lewis, 69 NY2d 321, 325, citing Richardson, Evidence § 4, at 2 [Prince 10th ed], quoting Uniform Rules of Evidence, rule 1 [2]). Evidence of similar uncharged crimes has probative value, but as a general rule it is excluded for policy reasons because it may induce the jury to base a finding of guilt on collateral matters or to convict a defendant because of his past (see, People v Lewis, supra; People v Allweiss, 48 NY2d 40, 46). Therefore, the rule is stated that if the only purpose of the evidence is to show bad character or propensity towards crime, it is not admissible. Evidence of prior uncharged crimes may be received, however, if it helps to establish some element of the crime under consideration or is relevant because of some recognized exception to the general rule (People v Lewis, supra; People v Beam, 57 NY2d 241, 250; People v Allweiss, supra; People v Carmack, 44 NY2d 706, affg 52 AD2d 264, 265-266, 53 AD2d 1017). In People v Molineux (168 NY 264, 293, supra), we stated that evidence of unc*242harged crimes may be relevant to show (1) intent, (2) motive, (3) knowledge, (4) common scheme or plan, or (5) identity of the defendant. The list, of course, is not exhaustive (People v Jackson, 39 NY2d 64). Even when admissible for such purposes, however, the evidence may not be received unless its probative value exceeds the potential for prejudice resulting to the defendant (People v Ely, 68 NY2d 520, 529; People v McKinney, 24 NY2d 180, 184).
Whether evidence of prior crimes may be admitted under the Molineux rule is a question of law, not discretion (see, People v Fiore, 34 NY2d 81, 84; People v Grutz, 212 NY 72, 77). If the evidence of prior crimes is probative of a legally relevant and material issue before the court, and for that reason not automatically barred under the general rule, admissibility turns on the discretionary balancing of the probative value and the need for the evidence against the potential for delay, surprise and prejudice (see, People v Ventimiglia, supra, at 359; People v Allweiss, supra, at 47).
Evidence of prior criminal acts to prove intent will often be unnecessary, and therefore should be precluded even though marginally relevant, where intent may be easily inferred from the commission of the act itself (see, e.g., People v Crandall, 67 NY2d 111, supra [criminal sale of drugs]; but see, People v Jackson, 39 NY2d 64, supra; People v Bristow, 106 AD2d 510; People v Molineux, supra [homicide committed by concealing poison in a common headache salt]; People v McKinney, supra [assault by strangling and stabbing victim]). It may be admitted to prove intent, however, when proof of the act falls short of demonstrating that the defendant acted with a particular state of mind and where proof of a prior act is relevant to that issue. We explained the distinction in People v Katz (209 NY 311, 328): "Simple proof showing that A. shot B. at one time and place throws no light upon the charge that A. poisoned C. at another time and place. In either of these cases guilty knowledge or intent is inferable from the nature and surroundings of each act, and each must be judged on its own circumstances. Quite another principle is to be invoked, however, when guilt cannot be predicated upon the mere commission of the act charged as a crime. In such a case the general rule gives way to the exception under which guilty knowledge of a defendant may be proved by evidence of his complicity in similar offenses under such circumstances as to support the inference that the act charged was not innocently or inadvertently committed.” An example of the latter case is where the *243act itself is equivocal and, unless accompanied by some guilty knowledge, the transaction would not be criminal. In such a case, evidence that defendant did the act may allow no ready inference of defendant’s guilty state of mind. Thus, as a matter of necessity, evidence of prior uncharged crimes is more likely to be admissible to create an inference of guilty knowledge in such cases (see, e.g., Matter of Brandon, 55 NY2d 206 [obtaining property by false representations]; People v Schwartzman, 24 NY2d 241, supra [obtaining property by false representation]; People v Dales, 309 NY 97 [forgery]; People v Marrin, 205 NY 275 [knowingly filing a false certificate]; People v Molineux, 168 NY 264, 297, supra [knowingly passing counterfeit money (dicta)]).
m
We conclude the evidence of prior uncharged crimes was admissible to establish intent in these prosecutions.
A
In People v Alvino, admissibility on the false certificate charge is controlled by our holding in People v Marrin (205 NY 275, supra). In Marrin, the defendant, an attorney, received from his client a sum of money to invest for her. He delivered in exchange a mortgage purportedly executed by one James Cahill and acknowledged before the defendant as a Commissioner of Deeds. James Cahill was fictitious and had no connection with the title to the property. To prove that fact, and that defendant had willfully and falsely certified the mortgage, the People were permitted to show that defendant had certified eight similar mortgages for the client and received money in return. The evidence was held admissible to show intent, knowledge and absence of mistake.
The evidence of prior uncharged crimes was similarly admissible on the false certificate charge in this case. Although defendant admitted that he issued an amended driver’s license and that it was false, he claimed that, because he handled 50 to 60 transactions a day, he did not have the time to check the details of each request for an amended license. Moreover, his counsel attempted to establish, by cross-examination of the People’s witnesses and by defendant’s testimony, that the duty of checking the accuracy of the material on the *244application for an amended license belonged to the examiner, not the cashier, and defendant testified that there was nothing on the application papers for an amended license which would cause him, or any cashier, not to process them. In light of this defense, the evidence of prior uncharged crimes was unquestionably admissible to establish defendant’s intent and the absence of mistake.
Defendant contends, however, that because the evidence was not admissible to prove intent on the bribery charge it was reversible error to admit it at all. We know of no such rule, but more to the point, we disagree with defendant’s underlying premise, accepted by the dissent, and find the evidence admissible on the bribe receiving charge also.
Before a public servant may be convicted of bribe receiving, second degree, there must be proof of a corrupt agreement. The People must establish that defendant solicited, accepted or agreed to accept a benefit "upon an agreement or understanding” that his conduct would be influenced by the benefit (Penal Law former § 200.10; see also, People v Charles, 61 NY2d 321). Thus, it was not enough for the People to prove defendant issued a false certificate to Falto and that he received $100 from him. The essence of the crime was not the issuing of the license or the receipt of the money; it was the doing of one in exchange for the other. Thus, defendant’s mental state was directly in issue because the People had to establish that defendant knew at the time he issued the license that he was doing so in exchange for a bribe — that he later took the money knowing it was paid for that purpose. The point is illustrated by comparing bribe receiving, which involves accepting a reward in exchange for performing an official act, with the lesser offense of receiving a reward for official misconduct (Penal Law § 200.25) which involves accepting a reward for past official misconduct. Reward receiving is criminal although the misconduct occurs without any understanding that it will be rewarded later. Thus, unless the People proved a corrupt bargain existed at the time defendant issued the false certificate to Falto, he could be guilty at most of receiving a reward in violation of section 200.25. Moreover, even if the jury believed Falto, it might, in the absence of proof of defendant’s mental state when he issued the license, find him guilty of the lesser offense of receiving a reward. Thus, evidence showing that defendant had issued false documents for Falto in the past helped to prove that the two men made their bargain when Falto first approached defendant *245and asked, "Charlie, can I get this one done here.” It helped to prove that at the very same time that defendant issued the amended license, he was motivated to do so by knowledge that he would subsequently receive a monetary award of $100. The case is thus distinguishable from the crime of bribe giving, cited by the dissent, in which the act of giving money to a certain public official was conclusive of the criminal intent and proof of similar unrelated bribes to other officials had no probative value (see, People v Sharp, 107 NY 427). Accordingly, the People were properly permitted to offer proof of similar crimes not to prove that defendant accepted the money but to prove the operation of his mind at the time he issued the false license.
Finally, it is immaterial that the People could establish a prima facie case without the disputed evidence. They were not bound to stop after presenting minimum evidence but could go on and present all the admissible evidence available to them, regardless of the trial strategy defendant adopted (see, People v Marrin, 205 NY 275, 280, supra).
B
In People v Hernandez, the evidence was legally admissible to prove defendant’s intent. This was plainly so with respect to the charge of possession with intent to sell and became so on the sale count of the indictment after defendant testified.
Evidence of uncharged crimes was legally admissible on the People’s case to prove that defendant possessed drugs because defendant’s possession of the drugs, standing alone, did not provide a clear indication of whether he held the drugs for sale or for his own use. The People normally might rest on the inference available, from defendant’s possession of such a substantial quantity of drugs, that he intended to sell them. They were not required to do so, however, and evidence of prior uncharged crimes was admissible to show the necessary mental state required for the crime.
The evidence became admissible on the sale count, on rebuttal, when defendant went beyond denying he sold cocaine on the day in question, stated that he never sold drugs and then supported his claim with bizarre testimony designed to convince the jury of his innocence. Faced with the strong likelihood that the jury would infer from the evidence, and particularly his possession of 21 glassines, that he was a seller *246of cocaine, defendant took the stand and painted himself as a hapless addict and petty thief. To construct this image, he testified to those parts of his criminal record, involving larceny and possession of narcotics, that would comport with it but he emphatically denied that he was a drug seller. He insisted that he possessed the 21 glassines of cocaine only to feed his own habit and he supported this claim by asserting that he was consuming 25 to 35 "nickel” bags of cocaine per day, a figure one witness testified was 5 to 10 times the average user’s daily consumption. He maintained that he could consume the 21 bags found in his possession at the time of his arrest in one hour. The implication of this testimony was that defendant’s background was wholly inconsistent with his having sold narcotics in this instance and it was plainly material evidence in contradiction of the charges against him.
Thus, the record presents a situation similar to that in People v Schwartzman (24 NY2d 241, supra) in which defendant, on trial for fraudulently selling an account receivable, admitted the transaction during his direct testimony but denied any fraudulent intent. On cross-examination, the prosecutor confronted the defendant with numerous uncharged instances of similar misconduct and, when the defendant denied one of those instances, introduced documentary evidence to prove it. We rejected the defendant’s claim that the prosecutor’s cross-examination and introduction of documents on rebuttal constituted an impermissible use of extrinsic evidence on collateral issues. Rather, we held that the defendant’s prior fraudulent acts were admissible under the rule of People v Molineux (168 NY 264, supra) to establish his intent in the transaction on trial and also because the witness had testified on a material matter, presenting "a novel and unexpected explanation”, which the People were entitled to rebut (24 NY2d, at 250, supra).
People v Crandall (67 NY2d 111, supra), on which the majority at the Appellate Division relied, is not to the contrary. Crandall was charged only with criminal sale of a controlled substance. Testifying in his own defense, he claimed that he was the victim of a police frame-up. Because of this claim, the trial court permitted the People to submit evidence of prior uncharged crimes on rebuttal. In most cases involving criminal sale of drugs, intent is readily inferable from the sale itself and evidence of prior uncharged crimes is neither necessary nor permissible to establish it (cf., People v Jackson, 39 NY2d 64, supra; People v Bristow, 106 AD2d 510, supra). *247Accordingly, we found in Crandall that notwithstanding defendant’s claim that he had been framed, the evidence was not properly received either as evidence of intent or as rebuttal evidence (id., at 118-119). Although Crandall had introduced a new consideration into the case and tried to prove it, the facts which he sought to prove had nothing to do with selling drugs. Thus, refutation of Crandall’s frame-up claim lay in proof that his story was false and that the officers’ motives in arresting him were proper. The People’s evidence of his prior uncharged drug sales did not contradict or disprove Crandall’s frame-up story and it could serve no purpose except to show he was predisposed to sell drugs. Accordingly, we held the reception of evidence of uncharged crimes constituted reversible error. In this case, however, defendant did not merely rest on his claim that he was not guilty of selling drugs; he testified to facts in the nature of confession and avoidance, admitting the lesser crime of possessing drugs but denying the greater crime of selling them (cf., People v Calvano, 30 NY2d 199 [entrapment]). By doing so, he reframed the dispute before the court and affirmatively attempted to convince the jury of his innocence not just in this instance but because his entire history was inconsistent with guilt. The People were entitled to rebut that testimony by evidence of prior crimes suggesting otherwise.
Accordingly, we hold that in both Alvino and Hernandez the evidence of prior uncharged crimes was generally admissible to prove intent, and that balancing the probative value of the evidence against its potential prejudicial effect was a matter to be determined by the trial court in each case in the sound exercise of its discretion. Although the courts below could have found the evidence in the Alvino case prejudicial and of questionable probative value because Falto, the same witness whose credibility was crucial to the jury’s acceptance of the underlying charges, was its source, we find no abuse of discretion in the court’s reception of the evidence in either case.
IV
Finally, we conclude in People v Hernandez that the court properly exercised its discretion in admitting the evidence of prior uncharged crimes during rebuttal. The general rule is that a party may not introduce extrinsic evidence on a collateral matter solely to impeach credibility (People v Har*248ris, 57 NY2d 335, 345, cert denied 460 US 1047; People v Ventimiglia, 52 NY2d 350, supra; People v Schwartzman, 24 NY2d 241, 246, supra). The purpose of this rule is judicial economy, to prevent needless multiplication of issues in a case, and to insure that the jury is not confused with irrelevant evidence. Rebuttal evidence, however, is not merely evidence which contradicts defendant’s evidence and corroborates that of the People. Rebuttal evidence is evidence which overcomes some affirmative fact which defendant has tried to prove (see, People v Crandall, supra, at 118; People v Harris, supra, at 345). Thus, although the evidence in dispute here could have been offered during the People’s direct case on the possession with intent to sell charge, and perhaps it should have been, the trial court was authorized to vary the order of proof (see, CPL 260.30 [7]) and it properly exercised its discretion to admit the evidence on rebuttal after defendant testified.
Accordingly, the order of the Appellate Division in People v Alvino is affirmed; the order of the Appellate Division in People v Hernandez is reversed, the judgment of Supreme Court, New York County, reinstated and the matter remitted to the Appellate Division for a review of the facts.