Appeal by the defendant from a judgment of the Supreme Court, Kings County (Brennan, J.), rendered August 7, 2002, convicting him of criminal sale of a controlled substance in the third degree, criminal possession of a controlled substance in the third degree, and criminal possession of a controlled substance in the seventh degree, upon a jury verdict, and imposing sentence.
Ordered that the judgment is affirmed.
Contrary to the defendant’s contention, the closing of the courtroom during the testimony of the undercover police officer did not deprive him of his rights to due process and a public trial. The trial court providently exercised its discretion in closing the courtroom during the officer’s testimony (see People v Hinton, 31 NY2d 71 [1972], cert denied 410 US 911 [1973]). The officer testified, inter alia, that she continued to work in undercover operations and had “lost” subjects in the area of the defendant’s arrest. She stated that she would feel unsafe if her identity was revealed. The officer also testified that she always used the non-public entrance to the courtroom, always testified in a closed courtroom, on one occasion was threatened by a subject, and on another occasion was assaulted by a subject (see People v Ramos, 90 NY2d 490 [1997], cert denied sub nom. Ayala v New York, 522 US 1002 [1997]; People v Hargett, 293 AD2d 757 [2002]; People v Rodriguez, 258 AD2d 483 [1999]; People v Garcia, 239 AD2d 599, 600-601 [1997]; People v Feliciano, 228 *639AD2d 519 [1996]). Santucci, J.P., Luciano, Schmidt and Rivera, JJ., concur.