Appeals by the defendant from a judgment of the Supreme Court, Queens County (Calabretta, J.), rendered August 15, 1989, convicting him of criminal sale of a controlled substance in the third degree and criminal facilitation in the fourth degree under Indictment Number *84511059/88, upon a jury verdict, and imposing sentence, and from an amended judgment of the same court, also rendered August 15, 1989, revoking a sentence of probation previously imposed by the same court (Demakos, J.), under Indictment Number 4011/84, upon a finding that he had violated a condition thereof, upon his admission, and imposing a sentence of imprisonment upon his previous conviction of attempted criminal possession of a weapon in the third degree.
Ordered that the judgment and the amended judgment are affirmed.
We find, contrary to the defendant’s contention, that the inquiry by the trial court here was sufficient to assure that his right to a public trial was not sacrificed for less than "compelling reasons” as required by the Court of Appeals in People v Jones (47 NY2d 409, 415, cert denied 444 US 946), and we conclude that the courtroom was properly closed during the undercover officer’s testimony. Prior to closure, the undercover officer testified that she had been working in an undercover capacity since March 1988. She was assigned to the Manhattan North Tactical Narcotics Task Force in October 1989 and was actively engaged as an undercover officer at the time of trial. She expected to continue working in the same capacity following completion of the trial. She also made a point of advising the court that she had applied for a transfer back to the Queens office, which she believed might be imminent. She joined in the People’s request to close the courtroom during her testimony, expressing her fear that disclosing her identity would jeopardize her safety and compromise her ability to work as an undercover officer free of concern over someone on the street being able to identify her.
As noted by our learned colleague in his dissent, this court has sanctioned closure during the testimony of an undercover police officer who had pending cases, or continued to work actively as an undercover officer in the community or geographic area where he or she was testifying (see, e.g., People v Weaver, 162 AD2d 486; People v Planes, 158 AD2d 481; People v McLennon, 156 AD2d 478; People v Bowden, 156 AD2d 372). Active engagement in the community as an undercover narcotics officer is itself a compelling reason that justifies excluding the public from the courtroom, "at least when the fact of such engagement is elicited from the witness [herjself ’ (People v Santos, 154 AD2d 284, 285; see, People v Carter, 162 AD2d 218). The rationale in such cases is to "shield the identity of the witness from the public and to preserve not only her *846future usefulness, but also her life” (People v Hinton, 31 NY2d 71, 75, cert denied 410 US 911).
The same rationale applies to this case where the witness continues to work actively as an undercover officer, and reasonably expected that she would be working in the same community where she was about to testify. Under the circumstances, disclosure of the undercover officer’s identity to the public posed an articulable threat to her safety and her ability to continue working in such a capacity in the future. We see no need to address the People’s proposition that the concept of "community” within this context be construed to include the entire New York metropolitan area.
We have considered the defendant’s remaining contentions and find them to be either unpreserved for appellate review or without merit. Miller, O’Brien and Ritter, JJ., concur.