BOSTON — A Lowell man who sold 20 grams of fentanyl to an undercover police officer was sentenced in federal court Friday, according to the U.S. Department of Justice.

Edilberto Calle-Alvarez, 24, a Colombian national with a legal permanent residence in Lowell, was sentenced to six months of time served, six months of home confinement and three years of supervised release. In January he pleaded guilty to one count of conspiracy to distribute and possess with intent to distribute 400 grams or more of fentanyl. He also pleaded guilty to one count of distribution of and possession with intent to distribute fentanyl.

Federal prosecutors say Calle-Alvarez was part of an organization distributing large quantities of fentanyl throughout Merrimack Valley.

He was one of dozens charged in a federal sweep in October of last year. The effort targeted “impact players” and repeat offenders in the Lawrence area, who had prior violent, firearm or drug trafficking convictions and people with criminal records who are undocumented, according to the U.S. Department of Justice.

Follow Elizabeth Dobbins on Twitter @ElizDobbins