U.S. Attorney Preet Bharara said Patrick Morgan, 23, of Buffalo, was charged with one count of conspiring to distribute narcotics and another count of distributing narcotics. The counts each carry a maximum sentence of 20 years in prison.

Morgan was released on $100,000 signature bond Wednesday afternoon and ordered to return to court on Monday. His attorney’s information was not immediately available.

Authorities say Morgan sold about 80 pills of MDMA, or ecstasy, to three other men in August 2013. The men later attended the Electric Zoo music festival on Randall’s Island in New York City at the end of that month. One of the men, 23-year-old recent Syracuse graduate Jeffrey Russ of, Rochester, New York, died at the festival. Authorities ruled his death was caused by an overdose of MDMA combined with hyperthermia.

Russ was one of two people who died at the festival, along with 20-year-old Olivia Rotondo of Providence, Rhode Island, also from an overdose combined with hyperthermia. Rotondo was a junior at the University of New Hampshire.

Several others were also hospitalized because of drug issues, authorities said.

The spate of drug-related problems prompted city officials to call on the festival’s organizers to cancel the last day of performances, which had been slated to include high-profile performers including Avicii and David Guetta.

“The founders of Electric Zoo send our deepest condolences to the families of the two people who passed away this weekend. Because there is nothing more important to us than our patrons, we have decided in consultation with the New York City Parks Department that there will be no show today,” the organizers with the Long Island City, Queens-based group Made Event said in a statement the day the event was cancelled.

The festival had been held in the city since 2009, drawing sizeable crowds.