A dozen people were charged with various narcotics offenses Thursday for allegedly peddling drugs to undercover officers in a public housing development in Brooklyn, District Attorney Ken Thompson said.

The 12 alleged dealers were charged with selling crack, cocaine, heroin and marijuana over nine months at the Samuel J. Tilden Houses in Brownsville, Thompson said in a statement. The investigation followed several complaints of violence and drug trafficking, he said.

"These arrests should put the criminal element that plies its trade around the law-abiding residents of the Tilden Houses on notice: we will simply not tolerate drug dealing anywhere in our communities, especially around our schools," Thompson said in a statement.

During the investigation, officers completed 180 buys from the alleged dealers, including one in which a dealer was allegedly selling while with his young daughter, he said. Additionally, the majority of the buys were made within 1,000 feet of two public schools that housed elementry-aged children, Thompson said.

Many of the men charged lived in the housing complex.

A loaded .38 caliber weapon was also recovered during the bust.

All 12 alleged dealers were awaiting arraignment in Brooklyn Criminal Court on Thursday, Thompson said.