A major takedown of armed drug dealers across the D.C. region last year has resulted in three dozen convictions, capped Friday with the guilty plea of a high-ranking leader in an offshoot of the Bloods gang.

During a hearing in federal court in Alexandria, Tarvell Vandiver, 29, admitted to distributing heroin and cocaine while armed. His agreement with prosecutors calls for a 20-year prison sentence.

He also agreed to plead guilty in D.C. Superior Court to involvement in a murder.

“You’ve got a lot going on,” Judge Liam O’Grady said. “You’re going to be asked a lot of questions.”

The 2015 D.C. killing is one of six that law enforcement linked to the sprawling investigation, along with an August double homicide in Lorton, Va., and a shooting at a hotel in Alexandria last May.

The operation began with an informant nicknamed “Platinum,” described in court papers as the regional treasurer for the Imperial Gangsta Bloods.

Platinum told law enforcement that Vandiver was getting cocaine and heroin mixed with fentanyl from his stepfather, Rashourn Niles, and selling it through gang members in the area. Vandiver and Niles are both from Woodbridge, Va.

Niles, 37, has also pleaded guilty to drug charges and faces a mandatory minimum of 20 years in prison.

The investigation grew to encompass two networks of armed drug dealers, with the goal of combating a spike in violence in Prince William County. Over 40 people were charged in federal court and several more in various local jurisdictions; about half of them were arrested on the same day in December. Defendants have received sentences ranging from two to 15 years.

Prosecutors say the takedown took off the street more than 95 firearms, $150,000 in cash, 10 pounds of cocaine, about three pounds of crack, seven pounds of crystal methamphetamine, five pounds of heroin, four pounds of ecstasy, 227 pounds of marijuana and 79 pounds of edibles.

Law enforcement began tracking marijuana and THC edibles sent through the Postal Service from California to Northern Virginia and Maryland, where they were sold on the street.

Nasiru Carew, 35, of Dale City, Va., has admitted running that scheme; he faces at least 10 years in prison.

In the middle of those investigations, Prince William County police got a tip from a citizen that a man named Bassam Ramadan was selling meth from his home in Woodbridge. An undercover federal agent, nicknamed “Mountain Man” by Ramadan, began buying meth from the dealer and eventually bought a gun.

Ramadan, 31, ultimately pleaded guilty and faces at least 15 years in prison; Marcus Harris, a 27-year-old from the District who provided him with security, has already been sentenced to 15 years. A distributor for Ramadan, 36-year-old Frederick Turner of Woodbridge, was convicted at trial for his involvement and faces at least 40 years in prison for his role. Four connected meth dealers are serving sentences from four to 11 years in prison.