In a show of force which included armored vehicles and police helicopters, hundreds of NYPD officers and federal agents hit two public housing areas in upper Manhattan late Monday and Tuesday to round up nearly three dozen members of rival gangs who plagued the communities with drug trafficking and violence, officials said.

Police and FBI SWAT teams arrested 29 people in the Washington Houses and East River Houses on federal charges they trafficked in heroin, crack cocaine, oxycodone and marijuana in the apartment complexes, terrorizing residents with shootings and threats of violence.

It was a shooting last year in the East River Houses area which precipitated a chase leading to the killing of police Officer Randolph Holder. NYPD chief of department James O’Neill told Newsday the killing in October sparked a probe into the drug organizations, which led to Tuesday’s roundup.

StoryAccused cop killer pleads not guiltyStoryBratton promotes fallen NYPD officer to detectiveStoryLI officer on fallen NYPD cop: 'He's our brother'

“This is going to do a lot to alleviate the problem of violence in the East River Houses,” O’Neill said of the arrests.

The latest police statistics show the area encompassing the 23rd Precinct, which includes the public housing complexes, has seen a 250 percent increase in shootings so far this year. Citywide, shootings are down about 12 percent.

“Residents of public housing — like all residents of New York City — deserve safe streets, free of drugs and violence,” Manhattan U.S. Attorney Preet Bharara said in a prepared statement.

advertisement | advertise on newsday

A total of 36 defendants were charged in two separate federal indictments. In one incident mentioned in the charges, a lead defendant known as Charles Kenyatta, 24, also known by the moniker “Charlie Cee, planned earlier this year to rob a victim in a barbershop while another suspect warned on social media that people not part of the East River drug organization would be targets.

Suspected gang member Antonio Boyce, 26, known on the street as “Fetty Baller,” bragged about having knocked someone unconscious, according to the charges.

Kenyatta and Boyce were among several people charged with conspiracy to distribute narcotics, which carries a maximum sentence of life in prison.

Get the Newsday Now newsletter!

The best of Newsday every day in your inbox.

Kenyatta, Boyce and the other defendants, all of whom resided in the city, were scheduled for appearances before a federal magistrate-judge late Tuesday.

Evidence seized in the raids was still being collected late Tuesday. But officials said some drugs and weapons were confiscated.