Two East End residents have been arrested as part of an investigation into narcotics sales in Southampton Town, police said Thursday, one of them after leaving more than 100 packets of heroin on a train.

Southampton Police Lt. Susan C. Ralph said the suspects were arrested July 27 by authorities involved in a “long term” probe by the East End Drug Task Force — a multi-jurisdictional drug enforcement unit funded by the Suffolk County District Attorney’s Office.

Sebastian Demartini, 30, of East Hampton, was charged with criminal possession of a controlled substance with intent to sell and fourth degree criminal possession of a controlled substance.

Xavier Gee, 30, of Southampton, was charged with two counts of third degree criminal sale of a controlled substance.

Both were arraigned July 28 in Southampton Town Justice Court. Bail was set at $10,000 cash or $40,000 bond for Demartini; it was unclear if he had posted bail. Gee was released on $2,000 cash bail. The defendants are due back in court Sept. 27.

advertisement | advertise on newsday

Ralph said Demartini was arrested after he was spotted “acting suspiciously” on an eastbound Long Island Rail Road train as it was traveling through Southampton and authorities later discovered he had “abandoned” 135 glassine envelopes of heroin before getting off the train in East Hampton, where he was arrested by MTA Police.

The circumstances surrounding Gee’s arrest and other details were not immediately available.

The task force includes authorities from the New York State and Suffolk County police departments, Suffolk County Sheriff’s Office, Suffolk County Department of Probation, Suffolk County District Attorney’s Office investigators and police from Southampton Town, Riverhead, East Hampton Town, Easthampton Village, Southampton Village, Sag Harbor Village and Southold.