BANGOR — A Greenbush man has pleaded guilty to charges connected to his role in the distribution of the synthetic drug known as bath salts.

Federal prosecutors say Ryan Ellis pleaded guilty this week in U.S. District Court of Bangor to the possession and intent to distribute MDPV, a chemical compound more commonly referred to as bath salts.

Prosecutors say Ellis was part of a drug ring that illegally distributed large quantities of bath salts in Penobscot, Aroostook and Knox counties in 2011. Ellis obtained bath salts from others, processed, repacked it, and distributed it for resale. In 2011, officials found Ellis in possession of two handguns, one shotgun and almost 400 grams of the drug.

Ellis faces up to 20 years in prison at sentencing at a later date.