A suspect in the shooting at Saugus High School is in custody and is being treated at a hospital, Los Angeles County Sheriff Alex Villanueva said on Twitter.
Details about how the suspect was captured weren’t immediately available.
Six patients — three in critical condition — have been taken to hospitals, officials at the facilities said. At least five were shot, a sheriff’s department official said.
Emergency workers took at least three people out of the school on gurneys, and large groups of people walked out single-file with armed escorts, aerial footage from CNN affiliates shows.
The shooting happened about 20 minutes before the start of school, according to Hannah de Caussin, whose daughter attends Saugus.
Some students fled the building immediately, and others took cover inside rooms, another student told CNN affiliate KTLA.
“It was one and then four quick ones, so bang, and then bang, bang, bang, bang,” the student, a girl, told CNN affiliate KTLA, after leaving the building.
Students are trained to take cover in classrooms, but she and some others ran out because they thought the shooter was near where they would have hidden, she said.
“We ran through the fence, luckily it was open, and we got as far away from campus as we could,” she said.
“We were texting all our friends and making sure they were safe. They said they were hiding and they were scared. It scared us because they’re our friends and we didn’t want anything bad to happen to them.”
Saugus High School, about 30 miles northwest of Los Angeles, has about 2,400 students, according to the district.
CNN’s Sarah Aarthun, Brian Ries, Chuck Johnston, Konstantin Toropin, Evan Perez, Whitney Wild and Scottie Andrew contributed to this report.