"The student said he was only joking, but deputies later found two semiautomatic rifles, two handguns and 90 high-capacity magazines at the student's home". WATCH: Sheriff's spokesman discusses school shooting in Palmdale Student Pauline Guijaro said she heard a volley of "around 10 gunshots".
Investigators were still trying to determine a specific motive.
Authorities were called to the school at 7:05 am, and officials said that the male suspect was apprehended at a nearby Vons grocery store after the shooting.
She said the suspect was found in the shopping center. "At first I didn't believe them, but then I heard a gunshot".
Agents with the Department of Alcohol, Tobacco, Firearms and Explosives (ATF) were heading to the scene, the agency said.
Deputies also responded to reports of gunfire near the Manzanita Elementary School, near the Highland High School, but the sheriff's department tweeted that the school was clear and there was no evidence of a crime.
Harris says the school is safe but remains on lockdown as officials worked to reunite students with their parents.
"Those shots, in some cases, went into an area adjacent to the courtyard where they were being fired from, so the potential was for anyone to be able to take a stray round there, whether they were aimed at or not", McDonnell said.
Student Pualani Revis told KABC-TV that students ran into her classroom saying there were gunshots going off. Both individuals are said to be attending the high school.
A person was detained after deputies responded to a report of a man with a gun at Highland High School, which is about 7 miles (11 kilometers) away. While police searched for the suspect and secured the area, the school was on lockdown.
In March, a teacher accidentally discharged a gun during a public safety class at Seaside High School in Seaside, California, injuring a student.
Sheriff's Sgt. Aura Sierra could not immediately provide more information about the person detained Friday morning said there has been no confirmation of a shooting.
Palmdale, a city of about 150,000 people, is in Los Angeles County, about 40 miles north of downtown Los Angeles.