KEENE — A Vermont man is facing criminal drug charges after he was snagged by city police working with federal law enforcement agents in an investigation into the so-called “dark web.”

Marcus Shapiro, 21, of Vermont, became the target of the joint Keene police and Homeland Security investigation after a Keene-based cooperating witness known as JL identified Shapiro as a drug buyer, according to the affidavit filed in the Cheshire Superior Court.

The “dark web” is the name for websites, usually not available through ordinary computer browsers, where drugs are bought and sold, and where other illegal activity takes place.

Police turned to JL in January after they were able to pinpoint drug shipments to two properties owned by JL, according to the affidavit. From there, JL told the investigators about Shapiro, who is accused of having bought drugs like MDMA from JL, according to the affidavit.

Shapiro then allegedly reached out to JL to inquire about available drugs, according to the affidavit. Through a series of messages on social media, JL and Shapiro allegedly negotiated the purchase of $750 of MDMA and another $750 of Ecstasy, both considered party drugs, and Shapiro allegedly also wanted $1,500 of the painkiller Percocet, according to the affidavit.

According to the affidavit, Shapiro was arrested on April 4 after he allegedly bought sham drugs from JL, which were provided by the Homeland Security agent.

Shapiro’s case was headed for arraignment on Tuesday in the Keene Superior Court, but the case was dropped by the Cheshire County Attorney’s office. Instead, federal prosecutors brought a case against Shapiro in the United States District Court in Concord. He has yet to be indicted, and is currently free on personal recognizance bail.