May 24 (UPI) -- Rapper Fetty Wap, legal name William Junior Maxwell II, was sentenced to six years in prison Wednesday for drug trafficking.

He pleaded guilty to conspiracy to distribute and possess nearly 500 grams of cocaine.

Facing possible life in prison, he reached a plea deal with prosecutors in August that called for a minimum five-year prison sentence.

U.S. District Judge Joanna Seybert sentenced Maxwell to six years in prison and five years of post-release supervision. New Jersey corrections officer Anthony Cyntje was sentenced in March to 72 months in prison for his role in the drug distribution.

According to court filings, Maxwell and four co-defendants distributed more than 100 kilos of cocaine, fentanyl and heroin from June 2019 through June 2020 across Long Island and New Jersey.