More than a dozen people were busted on Thursday for selling and having drugs in two Brooklyn housing projects, the Brooklyn district attorney's office said.

The 13 defendants were charged with the selling and possession of drugs around the Bushwick Houses and the Borinquen Plaza Housing Developments in East Williamsburg.

"Members of the community reached out to law-enforcement with complaints about narcotics and related violence, leading to this successful investigation," Brooklyn District Attorney Ken Thompson said in a statement. "We will not allow hard-working people to be held hostage by violent gangs and drug dealers who operate in their midst and these arrests will bring a measure of safety to residents in these housing developments."

Investigators made 27 purchases of crack cocaine, heroin and marijuana from six of the defendants.

During one search, 68 glassine envelopes of heroin, up to 10 grams of crack-cocaine and more than $2,000 were recovered. In another, 49 grams of heroin were found.

The investigation started in October 2014 after people complained about the drug activity.