Judgment of the Supreme Court, New York County (Daniel P. FitzGerald, J., at hearing; Luis M. Ñeco, J., at trial and sentence), rendered September 23, 1986, after a jury trial, convicting the defendant of grand larceny in the third degree and sentencing him, as a predicate felon, to an indeterminate term of incarceration of 2 to 4 years, unanimously reversed, on the law, and the matter remanded for a new trial.
In support of the defendant’s conviction for grand larceny in the third degree, the People presented evidence at trial that the defendant had picked the pocket of an undercover officer. While the suppression ruling was proper and the evidence sufficient, the ruling of the trial court which precluded the defendant from cross-examining certain police officers respecting the confession obtained by them from his codefendant was erroneous and requires reversal. The defendant contended that he had been coerced into making an inculpatory statement and that the police, in effect, read him the script of his statement. We note that the People commendably concede that the confessions of the defendant and his codefendant are "highly unusual because [they are] similar in their form and content”, and that the officers’ testimony concerning the manner in which the codefendant’s confession was obtained was relevant and material to defendant-appellant’s claim that his own statement had been involuntary. It is also conceded that the error was not harmless. As the erroneous ruling *275palpably interfered with the defendant’s fundamental right to present a defense, the conviction must be reversed and a new trial ordered (see, e.g, People v Gilliam, 37 NY2d 722, revg 45 AD2d 744).
Reversal is additionally required by the failure of both the trial court and the prosecutor to abide by the court’s Sandoval ruling. When asked to rule upon the defendant’s Sandoval motion, the court, while initially refusing to rule unless the defendant would commit to testifying, then stated: "[I]’ll rule the People can’t inquire into his past convictions. * * * [T]he People may not inquire as to whether the defendant has had any past convictions unless he opens the door himself.” Thereafter, in reliance upon this ruling, the defendant took the witness stand, only to find himself subjected, with the court’s approval, to cross-examination covering the whole of his criminal background. The information thus placed before the jury was then used by the prosecutor in his summation wherein he urged that the appellant was an "experienced person” well aware of the workings of the criminal justice system and fully cognizant of what he was doing when he signed his confession.
By this time, it is well established that the purpose of what has come to be known as a Sandoval ruling is to provide a defendant with "definitive advance knowledge of the scope of cross-examination as to prior conduct to which he will be subjected” when testifying on his own behalf. (People v Sandoval, 34 NY2d 371, 375.) Obviously, a defendant need not commit to testifying in advance of obtaining a Sandoval ruling since the very purpose of the ruling is to enable the defendant intelligently to assess the effect of his testimony on his defense and, in light of that assessment, to decide whether he should testify. Although the court was apparently unclear as to the purpose and significance of the ruling which it undoubtedly made, the ruling cannot in fairness to the defendant be viewed as anything but a Sandoval ruling. The defendant then had a right to rely on the court’s ruling when he took the witness stand and to expect that the court would not permit cross-examination to extend to matters apparently precluded by the ruling. We see no way of avoiding the conclusion that when, contrary to the court’s ruling, cross-examination was permitted as to the defendant’s criminal background, the defendant was seriously prejudiced. This is particularly true in light of the use of the improperly admitted evidence to undermine the defendant’s central contention that his confession had been coerced. Concur—Murphy, P. J. Carro, Ellerin, Wallach and Smith, JJ.