—Appeal by the defendant from a judgment of the Supreme Court, Queens County (Cohen, J.), rendered November 21, 1990, convicting him of attempted murder in the second degree, assault in the first degree (two counts) and criminal possession of a weapon in the *499second degree, and criminal possession of a weapon in the third degree, upon a jury verdict, and imposing sentence.
Ordered that the judgment is reversed, on the law and as a matter of discretion, and a new trial is ordered. No questions of fact have been raised or considered.
On appeal, the defendant contends that he was deprived of a fair trial by several improper comments that were made by the prosecutor during her summation. We agree. In view of the prosecutor’s comments regarding two defense witnesses and a prosecution witness, we conclude that the prosecutor did not stay within “the four corners of the evidence” (People v Ashwal, 39 NY2d 105, 109). Because the instances of prosecutorial misconduct were flagrant and closely related to the credibility issues presented at trial, they substantially prejudiced defendant’s case (see, People v Dombrowski, 163 AD2d 873).
The defendant also contends that he was unfairly prejudiced by the admission of evidence of uncharged criminal conduct. We agree. The prosecution was allowed, over objection, to introduce evidence that the defendant was involved in a shooting nearly two years before the case at bar. This alleged shooting was not charged in the indictment and evidence of it could only have tended to persuade the jury that the defendant had a propensity towards violence. It is well settled that evidence of crimes that are not charged in the indictment must be excluded when they are offered solely to show such propensity (see, People v Hudy, 73 NY2d 40, 54-55; People v Miguel, 146 AD2d 808, 809).
The defendant further contends in his supplemental pro se brief that he was denied a fair trial when the trial court foreclosed his cross-examination of a prosecution witness and prevented him from eliciting evidence supporting his own defense. We agree. Even if this issue is not preserved for appellate review, as the prosecution argues, appellate review is warranted as a matter of discretion in the interest of justice. We conclude that the trial court improperly restricted the defendant’s right to confront the witness against him and impeded the defendant’s efforts to provide a viable defense (see, People v Gregg, 90 AD2d 812).
The foregoing errors cannot be regarded as harmless under the circumstances of this case (see, People v Crimmins, 36 NY2d 230). The judgment appealed from is, therefore, reversed. Bracken, J. P., Lawrence, Joy and Goldstein, JJ., concur.