OPINION OF THE COURT
Wachtler, J.A jury found the defendant guilty of robbery, burglary and assault. The Appellate Division reversed the conviction on the law and ordered a new trial. It held that the trial court abused its discretion in permitting the prosecutor to impeach the defendant’s credibility by questioning him about a prior conviction involving sodomy of an eight-•year-old girl. One Justice dissented and granted the People leave to appeal to this court.
The robbery occurred at a Brooklyn apartment on the evening of May 20, 1976. The complainant stated that on that date she left her fifth-floor apartment at approximately 7:00 p.m. and returned four hours later. When she turned her key she found that the door was not locked. At this point the defendant opened the door from the inside, told her in obscene terms that she did not need a key and pointed a gun at her. Complainant also noticed that defendant was carrying a toaster oven which her daughter had given her for Mother’s Day. As the complainant turned away the defendant struck her with the gun on the nape of the neck knocking her to the ground but not rendering her unconscious. He then ran into the adjoining apartment where he resided with his sisters.
*145Subsequent investigation by the complainant’s children and the police showed that her apartment had been ransacked. A door at the rear of the apartment, leading to a “terrace”, had been found open and a window next to the door had been broken. It was also noted that complainant’s terrace was separated from the adjoining terrace by a fiberglass partition.
At the trial, held in February, 1977, defendant testified on his own behalf. He admitted residing next to complainant’s apartment at the time of the crime but denied any involvement in it. He claimed that he had been in his apartment when he heard a scream. He then went out to the hall where he met several neighbors, one of whom knocked on the complainant’s door but received no response. He remained in the hall approximately 10 minutes talking with the neighbors and then returned to his apartment. He had not reported the incident to the police or the apartment security officers.
Before the defendant testified, his attorney applied to the court to preclude the prosecutor from questioning the defendant concerning a 1973 felony conviction for which he had received a four-year sentence and was, in fact, still on parole. Counsel noted that the conviction was for a sex offense involving a child “about ten years of age”. The application was “predicated solely on the inflammatory nature of the * * * crime that is involved”. After hearing the prosecutor, who opposed the application, the court denied the defendant’s request. The court held that the conviction showed that the defendant had previously advanced his interests at the expense of society; that it was therefore probative of the defendant’s honesty and integrity and that it would be “unfair” for the defendant to testify without permitting the jury to consider this conviction in assessing his credibility.
Thus at the trial the defendant admitted that he had previously pleaded guilty to a crime. On cross-examination he initially stated that the victim of that crime was a child “about 10 years old”, but later conceded that she was only eight. When asked what the conviction was for he simply stated “a sodomy act” and became evasive when the prose*146cutor asked him what he had done. The court then rephrased the prosecutor’s question as follows:
“The Court: What did you tell the judge when you pleaded guilty?
“The [defendant]: I told the judge that I committed a sexual act with a 10 year old.
“The Court: What kind of sexual act?
“The [defendant]: What do you mean.
“[The prosecutor]: Isn’t it correct you placed your penis in the mouth of an eight year old girl by force?
“[The defendant]: Yes.
“[The prosecutor]: No further questions.”
As noted, the Appellate Division reversed and ordered a new trial concluding that the trial court abused its discretion in permitting this line of questioning (80 AD2d 858). It also suggested (p 859) that the trial court had acted improperly by “interrupting] the prosecutor’s cross-examination to adduce the underlying facts of the prior crime”. The Appellate Division stated (p 859) that the “specific nature” of the prior conviction” “is such as would inflame a jury so as to render any probative worth it might have secondary to the prejudice which would be created by it§ divulgence”. The court also held (p 859) that the “prejudice created is apparent in view of the tenuousness of the People’s case.” The dissenting Justice perceived no abuse of discretion noting (p 859) that if evidence of the prior crime created a risk of undue prejudice it was only “because of the defendant’s choice of the victim”.
We have repeatedly emphasized that the question as to' whether a prosecutor should be precluded from impeaching a defendant’s credibility by reference to prior immoral, vicious or criminal acts “is largely, if not completely, a matter of discretion which rests with the trial courts and fact-finding intermediate appellate courts” (People v Shields, 46 NY2d 764, 765; see, also, People v Mackey, 49 NY2d 274, 281-282; People v Brown, 48 NY2d 921; People v Sandoval, 34 NY2d 371, 375). In this instance, however, *147the Appellate Division did not rest its determination upon the exercise of its discretionary powers, but chose instead to decide the question as a matter of law. Its order specifically recites that the reversal is “on the law” and its memorandum opinion confirms the fact by establishing what appears to be an inflexible rule prohibiting the prosecutor from impeaching the defendant’s credibility by cross-examination on prior sexual offenses involving a child, at least where some weaknesses are evident in the prosecutor’s case. While we agree that those factors might properly serve as a basis for excluding evidence of a prior crime, we do not agree that the trial court was bound to do so as a matter of law.
Initially we recognize, as we have in the past, that evidence of the defendant’s criminal record necessarily presents some risk of prejudice to his case (People v Sandoval, 34 NY2d 371, 376, supra). When the prior crime is identical or similar to the offense charged the jury may, improperly, consider it as evidence of the defendant’s predisposition to commit the crime charged (People v Sandoval, supra, pp 377-378; People v Caviness, 38 NY2d 227, 232-233; People v Dickman, 42 NY2d 294; People v Carmack, 44 NY2d 706; but, also, People v Hendrix, 44 NY2d 658; People v Greer, 42 NY2d 170). Even when, as here, the prior crime is essentially different in nature from the offense charged the defendant may be prejudiced if the jury views him as a person worthy of punishment because of his past record (People v Davis, 44 NY2d 269, 274). Undoubtedly this risk is most pronounced when the defendant’s criminal conduct is more serious than usual. Nevertheless we have declined to prescribe fixed rules prohibiting or allowing the use for credibility purposes of prior offenses based solely upon the potentially inflammatory impact of the crime or the victim involved, even in the sensitive area of sex offenses (see, e.g., People v Greer, 42 NY2d 170, 175-176, supra). These are factors which may limit or enlarge the trial court’s discretion but they do not eliminate it. The court must also consider the potential prejudice to the prosecution and the fact-finding process of denying the jury access to probative, perhaps even crucial, evidence of the defendant’s credibility.
*148In this case the defendant’s credibility was an important issue at the trial. As noted, there was other evidence pointing to the defendant’s guilt, but it was not conclusive. In essence the jury had to decide whether to credit the victim’s identification or the defendant’s claim of innocence.
The defendant’s conviction for sodomy was not irrelevant to the question of his veracity. Although sodomy is not the type of crime which necessarily involves an act of dishonesty — like perjury, fraud, bribery and similar offenses — it may, as the trial court recognized, indicate a willingness or disposition by the defendant to voluntarily place “advancement of his individual self-interest ahead of principle or of the interests of society” and thus “may be relevant to suggest his readiness to do so again on the witness stand” (People v Sandoval, supra, p 377). Of course an impulsive or uncontrollable act may have little or no relevance to a defendant’s credibility; but in this case there was no suggestion, at trial or on appeal, that the defendant did not act voluntarily and deliberately when he committed the act of sodomy. A person ruthless enough to sexually exploit a child may well disregard an oath and resort to perjury if he perceives that to be in his self-interest.
The probative value of this evidence was not diminished by the passage of time. This was not an incident buried deep in the defendant’s past. It was, as the prosecutor noted, a recent conviction. Indeed at the time of trial the defendant was still on parole as a result of this conviction. In addition this is not a case where the defendant’s credibility had been or was capable of being impeached by the use of other less sensitive incidents. Thus it cannot be said that it was unnecessary for the prosecutor to bring this particular conviction to the jury’s attention. In sum, despite the inflammatory nature of the proof there were legitimate and perhaps compelling reasons for permitting the People to cross-examine the defendant concerning his prior conviction for sodomy and thus justification for the exercise of discretion by the trial court.
The scope of the cross-examination was also subject to the trial court’s discretion (see, e.g., People v Greer, 42 NY2d 170,176, supra), which of course should be carefully *149exercised in such a case. When evidence of a prior crime is relevant only to the defendant’s credibility, extensive inquiry into all or most of the details of a sordid offense would not be justified and would be unduly prejudicial. On the other hand, the prosecutor need not immediately cease cross-examination on the point once the defendant supplies the title of the offense for which he was found guilty. The court may — as it did in this case — permit further questioning for the purpose of determining, at least in general terms, what conduct gave rise to the conviction. And despite the Appellate Division’s suggestion to the contrary, the court in this case did not act improperly in addressing a few questions to the defendant on this subject. As noted earlier the defendant became evasive when questioned by the prosecutor on this point and the court simply and legitimately rephrased the question in order to obtain a more responsive answer.
Accordingly, the order of the Appellate Division should be reversed and the case remitted to that court for review of the facts.
Chief Judge Cooke and Judges Jasen, Gabrielli, Jones and Fuchsberg concur; Judge Meyer taking no part.
Order reversed and case remitted to the Appellate Division, Second Department, for further proceedings in accordance with the opinion herein.
The District Attorney’s Appellate Division brief and the Appellate Division memorandum state that the defendant was previously convicted of sexual abuse. It appears however, as the defendant himself stated at trial, that he actually pleaded guilty to sodomy.