The court correctly determined that an overriding interest warranted a closure of the courtroom during the testimony of two undercover officers (see Waller v Georgia, 467 US 39 [1984]; People v Ramos, 90 NY2d 490, 497 [1997], cert denied 522 US 1002 [1997]). The People made a sufficiently particularized *850showing that the officers had an ongoing connection with narcotics operations in the vicinity of the courthouse, which was also the location of defendant’s arrest. Both officers testified that they had active narcotics investigations and cases involving lost subjects in the area around the courthouse, and that they had been threatened in the past as a result of performing undercover operations. Accordingly, the court properly found that the officers’ safety and effectiveness would be jeopardized by testifying in an open courtroom.
The court permitted several of defendant’s relatives to be present for the undercover officers’ testimony, and properly exercised its discretion in excluding three other relatives, all of whom both resided a few blocks from the courthouse and had drug-related arrests. Given the officers’ ongoing connection to the courthouse area, the excluded family members could have compromised the officers’ safety and effectiveness (see People v Campbell, 16 NY3d 756 [2011]).
The court properly exercised its discretion in denying defendant’s mistrial motion made after a police witness briefly referred to an uncharged crime. The offending testimony caused little or no prejudice in the context of the case, and the court took prompt curative action by immediately striking the testimony (see People v Santiago, 52 NY2d 865, 866 [1981]). Concur— Saxe, J.E, Friedman, Freedman and Richter, JJ.