(CNN) — A Brooklyn man charged in the overdose death of actor and producer Michael K. Williams pleaded guilty Wednesday to drug distribution charges.

Irvin Cartagena, who also goes by “Green Eyes,” was one of four men charged for being part of a drug trafficking organization that sold deadly fentanyl-laced heroin to Williams. Cartagena pleaded guilty to one count of conspiracy to distribute fentanyl, heroin and other drugs.

Prosecutors allege that Cartagena was the person who conducted the “the hand-to-hand transaction” with Williams just before the actor, best known for his role as Omar Little on HBO’s “The Wire,” died of an accidental overdose.

Williams was found dead in his New York City apartment in 2021 in what the New York City Medical Examiner’s Officer ruled an accidental overdose. He was 54.

In this surveillance image released by the Department of Justice, Irvin Cartagena completes a hand-to-hand transaction with Michael K Williams.

“Irvin Cartagena sold fentanyl-laced heroin in broad daylight in New York City, feeding addiction and causing tragedy,” the US Attorney’s Office for the Southern District of New York said in a statement Thursday. “In doing so, he dealt the fatal dose that killed Michael K. Williams.”

Cartagena, 39, faces a mandatory minimum of five years in prison but could face up to 40 years behind bars when he is sentenced by a federal judge.

CNN reached out to Cartagena’s lawyer for comment.

One of Cartagena’s codefendants, Carlos Macci, pleaded guilty to conspiracy to distribute narcotics on Tuesday, according to the court docket. The two other men charged, Hector Robles and Luis Cruz, have pleaded not guilty.