Appeal by the defendant from a judgment of the Supreme Court, Kings County (Spodek, J.), rendered October 20, 1983, convicting him of criminal sale of a controlled substance in the third degree, upon a jury verdict, and imposing sentence.
Ordered that the judgment is affirmed.
The defendant was accused of selling cocaine to an undercover police officer. The trial court submitted the defense of agency to the jury after the defendant testified that he was not the seller but had purchased the drugs merely as a favor to the officer. Viewing the evidence in the light most favorable to the People, and crediting the testimony of the People’s witnesses, any rational trier of fact could have found beyond a reasonable doubt that the defendant was not acting merely as an agent for the undercover police officer (see, People v Contes, 60 NY2d 620). The court’s instructions to the jury regarding the agency defense do not constitute reversible error.
There is no merit to the remaining contentions raised by the defendant. Mollen, P. J., Lazer, Bracken and Kooper, JJ., concur.