—Appeal by the *806defendant from a judgment of the Supreme Court, Kings County (DeLury, J.), rendered June 10,1991, convicting him of criminal possession of a controlled substance in the fourth degree, upon his plea of guilty, 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.
Contrary to the defendant’s argument, the People may raise on appeal the issue of his standing, or lack thereof, to challenge the police entry into the building in which he and his codefendants were found with drugs, cash and a weapon, since it was the defendant’s burden, in the first instance, to establish that he had standing (see, People v Jones, 182 AD2d 1066; People v Sanchez-Reyes, 172 AD2d 1034; People v Vasquez, 97 AD2d 524; CPL 710.60). Moreover, since the criminal possession charges were not "rooted solely in a statutory presumption attributing possession to [the] defendant” (People v Tejeda, 81 NY2d 861, 863 [emphasis in original]), the hearing court erred in conferring automatic standing on him. Rather, the defendant was required to establish that he had a legitimate expectation of privacy in the premises searched (see, People v Tejeda, supra; People v Wesley, 73 NY2d 351). Since the defendant had no connection whatsoever with the building in which he was found and, therefore, no legitimate expectation of privacy in those premises, he had no standing to challenge the police entry and search (see, People v Melendez, 160 AD2d 739; People v Castellar, 159 AD2d 312). Balletta, J. P., Miller, Lawrence and Goldstein, JJ., concur.