— Appeal by the defendant from a judgment of the Supreme Court, Kings County (Greenberg, J.), rendered September 25, 1989, convicting him of criminal possession of a weapon in the third degree, upon a jury verdict, and imposing sentence. The appeal brings up for review the denial, after a hearing, of that branch of the defendant’s omnibus motion which was to suppress physical evidence.
Ordered that the judgment is affirmed.
On the evening of February 24, 1988, Police Officers Salvatore Costa and Douglas Greenwood were patrolling a Brooklyn apartment building known for drug trafficking activity. When the officers reached the second floor, they observed the defendant, standing face-to-face with a second man in a narrow hallway. Upon observing the defendant’s companion, later identified as Noel Velasquez, drop four vials of cocaine to the ground, the officers directed both men to "freeze” and stand *212against the wall. As Officer Costa was handcuffing Velasquez, he observed the defendant attempting to hide what appeared to be a gun. The officers then recovered a gun from the defendant, resulting in his arrest.
Contrary to the defendant’s contention, we find that the officers’ limited detention of him was reasonable under these circumstances (see, People v Prochilo, 41 NY2d 759, 761). Although the officers may not have reasonably suspected that the defendant was engaged in any illegal activity (see, People v Ballejo, 114 AD2d 902), the officers were engaged in the arrest of the defendant’s companion in a narrow hallway in a building known for drug trafficking and their initial stop of the defendant was proper to ensure their safety (see, People v Salaman, 71 NY2d 869; People v Green, 103 AD2d 362, 365; People v Jenkins, 87 AD2d 526; People v Branch, 134 Misc 2d 705). Moreover, the officers’ subsequent observation of the defendant’s gun provided probable cause for his arrest (see, People v McRay, 51 NY2d 594).
We have examined the defendant’s remaining contentions and find that they are unpreserved for appellate review, and in any event, without merit. Thompson, J. P., Eiber, Balletta and Ritter, JJ., concur.