A suspect was in custody, officials said, and residents near the building in Santa Maria were told to “avoid the area.”

A suspect is in custody after an "improvised explosive device” rocked a California courthouse Wednesday morning, authorities said.

Several injuries were reported after the blast in Santa Maria.

Residents near the court in the city, about 150 miles northwest of downtown Los Angeles, were told to “avoid the area” as the scene “has not been deemed safe,” a Santa Barbara County Sheriff’s spokesperson said.

“Explosion was from an intentionally set improvised explosive device,” the sheriff’s repsaid.