OAKLAND (CBS SF) — Sheriff’s deputies raided a building in East Oakland Wednesday morning and arrested 20 people living there as part of an ongoing investigation into drugs and weapons trafficking, an Alameda County sheriff’s sergeant said.

Among those removed from the scene was a 5-year-old child. The child was taken into protective custody.

READ MORE: UPDATE: Air Attack, Calming Winds Aid Firefighters Battling Wildfire Near Big Sur; Containment Grows To 25 Percent

The conditions inside were crowded and unsafe, with raw sewage leaking and illegal wiring, so the 28 people who were living there will be unable to return, sheriff’s Sgt. Ray Kelly said.

“The place was in complete disarray,” Kelly said.

The sheriff’s SWAT team served the warrant in the 6600 block of Bancroft Avenue at about 4 a.m., according to Kelly. Not only did they find guns and drugs, mainly methamphetamine, but evidence that the building had been used as an illegal gambling and prostitution parlor.

Investigators were still there on Wednesday afternoon searching the place, so Kelly could not immediately say how much drugs or how many guns were found.

The 20 people arrested are being held on a variety of offenses, from being under the influence of drugs to felony probation violations, Kelly said. They will be unable to return there because the building — including three separate storefronts — is being red-tagged as unsafe to enter.

READ MORE: PG&E Still Restoring Power to Over 2,000 Customers in East Bay

Anyone living there will need to find other places to live, and the sheriff’s office is working with the city of Oakland to provide assistance to anyone there who needs it.

Because of the unsafe conditions, Kelly said that the space needed to be shut down before potentially turning into a disaster like the fire at the Ghost Ship warehouse last month in East Oakland where 36 people were killed.

“Say we didn’t do anything about this and it burned down and people died, we would be negligent in our duties if we didn’t follow through on this case,” Kelly said.

The building had illegal wiring that allowed residents to bypass the electric meter. Kelly said that that unsafe wiring which is visible from the outside, led investigators to the building.

The warrant was served as part of an ongoing investigation by the sheriff’s office, Kelly said. Oakland police were aware of the operation but it remains a sheriff’s investigation.

MORE NEWS: San Francisco Bay Area Tops Average Gas Price Per Gallon in the U.S.

© Copyright 2017 by CBS San Francisco and Bay City News Service. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.