A dispute between two students led to a shooting that sparked panic and drew a massive law enforcement response to a Palmdale high school in California,USA.

Authorities say they are trying to figure out why a 14-year-old boy went to his former high school Friday morning and began shooting a semiautomatic rifle shortly before classes were scheduled to begin.

A 15-year-old male student who was struck in the shoulder by gunfire was in surgery Friday afternoon but expected to recover fully, according to officials.

The shooting happened on the campus of Highland High School in Palmdale, California, around 7 a.m. on Friday.

The former student, who transferred in recent months, took out an SKS-style carbine and fired about 10 shots,  according to Los Angeles County Sheriff, Jim McDonnell.

The gun was found later at an open field west of the school.

According to sheriff, Jim McDonnell, it is unclear what the suspect was aiming for.  The sheriff said the boy is accused of attempted murder.

The incident is the 21st school shooting in the United States this year.