A Brooklyn man sold cocaine Wednesday to undercover detectives in Elmont, Nassau County police said.

Trevor Torres, 26, of 288 Vermont St., was contacted by detectives through Craigslist as part of a narcotics investigation and agreed to sell an undisclosed amount of cocaine, police said.

Detectives set up a meeting Wednesday on Locustwood Boulevard, and "when the defendant arrived . . . he was in possession of cocaine and placed under arrest without incident," according to a news release.

Torres is charged with third-degree criminal sale of a controlled substance and is scheduled to be arraigned Thursday at First District Court in Hempstead.