Appeals by the defendant from (1) a judgment of the Supreme Court, Queens County (Friedmann, J.), rendered October 15, 1990, convicting him of criminal possession of stolen property in the third degree, and unauthorized use of a motor vehicle in the third degree under Indictment No. 1851/90, upon a jury verdict, and imposing sentence; and (2) an amended judgment of the same court, also rendered October 15, 1990, revoking a sentence of probation previously imposed under Indictment No. 1116/85, upon a finding that he had violated a condition thereof, and imposing a sentence of imprisonment upon his previous conviction of grand larceny in the third degree.
Ordered that the judgment and amended judgment are affirmed.
The police observed the defendant, Kevin Jay, driving a stolen vehicle in which another individual named Terry Coleman was riding as a passenger. The defendant jumped from the moving vehicle and fled on foot. He was arrested after a chase and Coleman was arrested in the vehicle. The defendant had previously been convicted of grand larceny in the third degree in connection with a purse snatching he perpetrated *455with the same Terry Coleman who was riding as a passenger in the stolen car. The trial court, in its pretrial Sandoval ruling, determined that the prosecution would be permitted to cross-examine the defendant only with regard to the existence of this prior felony conviction, without eliciting any of the underlying facts thereof. The court’s ruling thus precluded any inquiry by the prosecution on cross-examination of the defendant as to his having been twice arrested with the same accomplice. As a caveat to that ruling, however, the court determined that if the defendant testified concerning Coleman’s presence in the stolen car, that would open the door to the prosecution to cross-examination of the defendant concerning Coleman’s participation in the prior purse-snatching incident. The defendant assails this Sandoval ruling as erroneous. We disagree.
It is axiomatic that the nature and extent of cross-examination is a matter within the sound discretion of the trial court (see, People v Sandoval, 34 NY2d 371). A defendant may be cross-examined concerning past criminal conduct where such evidence is relevant to his credibility and the probity of this evidence outweighs its prejudicial impact (People v Sandoval, supra). In this regard, it is generally recognized that a defendant may be cross-examined with evidence of past crimes of larceny because such evidence is relevant to his credibility (see, e.g., People v Branch, 155 AD2d 475). It is equally well recognized, however, that where a defendant specializes in a particular type of crime, he is not entitled to be shielded from cross-examination regarding prior crimes of that type merely because they are similar to the crimes on which he is being tried (see, People v Delgado, 180 AD2d 693; People v Adams, 174 AD2d 626; People v Morgan, 171 AD2d 698; People v Faulkner, 170 AD2d 691). So too, a defendant who specializes in criminal activity with a particular co-perpetrator is not automatically entitled to a more favorable Sandoval ruling shielding his criminal acts from inquiry on cross-examination merely because, as here, he is tried on charges related to a crime involving the same accomplice.
In the instant case, the defendant did receive a favorable ruling in the form of a "Sandoval compromise” pursuant to which the prosecutor was permitted to inquire only as to the existence of a felony conviction. The court’s caveat to that ruling, however, was not improvident. The theory of the defense was that the defendant was merely a passenger in the car and that the actual driver jumped from the moving car prior to the defendant’s accidental fall from that vehicle as he *456attempted to bring it under control. Coleman was also apprehended in the car. The court’s ruling merely restricted the defendant’s ability to testify with impunity as to Coleman’s presence in the car by permitting the prosecutor to elicit the fact that the defendant and Coleman had prior convictions based upon a joint criminal act. Clearly this evidence was relevant to the jury’s assessment of the defendant’s credibility. Although we agree with the defendant that the prosecutor thereafter attempted to circumvent the court’s Sandoval ruling by asking questions about Coleman despite the defendant’s adherence to the court’s ruling, in light of the overwhelming evidence of the defendant’s guilt, we find the prosecutor’s misconduct constituted harmless error (see, People v Crimmins, 36 NY2d 230).
We have reviewed the defendant’s remaining contentions and find them to be without merit. Mangano, P. J., Harwood, Miller and Santucci, JJ., concur.