More than 80 thugs who “wreaked havoc” throughout borough neighborhoods for years were nabbed in the biggest drug gang takedown in Bronx history, officials said Thursday.

A total of 84 perps from four gangs known as The Eden Boys, Miami Ave, UGZ and RGZ were charged in a 386-count indictment that included conspiracy to commit murder, conspiracy to distribute narcotics, attempted murder and weapons charges, officials said.

They are allegedly connected to 22 shootings in the west Bronx that resulted in the wounding of three bystanders.

The gang members — with nicknames like “Problem,” “Crash,” “Bully,” “Whiteboy” and “Casper” — flooded towns in Massachusetts, New Hampshire and New Jersey in a drug pipeline pedaling crack cocaine, heroin and Fentanyl for quadruple the street price in the city, officials said.

Fifty-eight of the alleged drug pushers were charged as major traffickers, which carries up to life in prison if convicted. A sole gang member — identified as Wilfred Lora — is being charged in connection with 11 attempted murders, according to officials.

In announcing the charges, Police Commissioner Bill Bratton said the gangsters “wreaked havoc” on the Bronx neighborhoods of Fordham, Tremont and Highbridge and “went to great lengths to push their narcotics poison outside New York, preying on countless addicted users in my home state of Massachusetts and as far north as New Hampshire.”

“It’s ironic these characters, some of them chose the name ‘Eden Boys’ for themselves, because while they were a long way from paradise, their behavior was certainly forbidden,” Bratton said.

Cops from the 44th Precinct, along with the Bronx District Attorney’s Office, launched an investigation into the street crews connected to the shootings in November 2014 and the DEA’s New York Organized Crime Drug Enforcement Strike Force joined the investigation in February 2015.

The investigation revealed that crew members were transporting crack cocaine and heroin as far north as Manchester, NH, and trading the drugs for weapons that were being bought back to the Bronx from Manchester.

Crew members were selling about $10,000 worth of crack a week, officials said.

“They battled on the streets over drug profits or purely for the sake of aggression itself,” said Bronx District Attorney Darcel Clark.

In May 2015, the investigation revealed that the crew had been transporting heroin and cocaine from the Bronx for sale in the area from 2012 until late 2014.

A total of 31 gang members were arrested Wednesday by members of the DEA Strike Force and NYPD. Thirty-five gang members have already been incarcerated on related charges and 18 are still being sought.

In total, authorities seized 15 guns, 9 kilos of cocaine, 4 kilos of heroin, 2 kilos of Fentanyl, 12 pounds of cutting agents and manufacturing equipment, $260,000 in cash, 889 grams of crack cocaine, seven cars and hundreds of rounds of ammunition.

Additional reporting by Matt Allan