"Subject is 14 year old male and student of Highland High School, detained off campus. Rifle recovered off campus," the sheriff’s office said in a Twitter message.
The victim, who has been hospitalized after being shot in the arm, is also a 14-year-old male student of the high school.
Shooting at Highland High School took place around 7 a.m. local time, and was followed by reports of gunshots at the nearby Manzanita Elementary School.
Multiple sheriff deputies responded to the reports of shooting in Palmdale and cleared both schools, according to the sheriff’s office. The Bureau of Alcohol, Tobacco, Firearms and Explosives also responded to the high school shooting in California.