A male juvenile is in custody after a lengthy standoff with Lompoc police.
Police were sent to the 600 block of North Fourth Street at 8:21 a.m. Friday after a report of a boy with a gun threatening to kill someone.
When officers arrived, the juvenile ran into a nearby alley and went into an apartment.
A police SWAT team and Santa Barbara County Sheriff's deputies established a perimeter around the apartment.
During the standoff, officers learned the juvenile had escaped from Los Prieto Boys Camp.
Police say numerous attempts were made to contact the juvenile by a loudspeaker, but he did not communicate back.
After repeated failed attempts of communication, the SWAT team deployed non-lethal chemical agents into the apartment.
The juvenile then came out and was taken into custody.
Police say no one was hurt during the standoff that lasted approximately 6 hours.
The juvenile was booked into the Santa Maria Juvenile Hall.
Because the suspect is a juvenile, his identity was not released.
Officers are still searching for the firearm used in the incident.
During the standoff, nearby Fillmore Elementary School went into lockdown.
Lompoc Unified School District tells KSBY that at 9:00 a.m., district officials received information from the Lompoc Police Department that led the school to lockdown.
School officials communicated with police throughout the lockdown and coordinated the release of students in the afternoon. District officials did not specify what time the lockdown ended.