Police say a 16-year-old boy who killed two teenagers after opening fire on students at a high school in California has died.

The gunman, named as Nathaniel Tennosuke Berhow, began his attack at Saugus High School in Santa Clarita after being dropped off by his mother on Thursday morning.

Those killed were 15-year-old Gracie Anne Muehlberger and 14-year-old Dominic Blackwell, while two other female victims aged 14 and 15 and a male victim aged 14 were also injured.

Image: Students were evacuated by police in the aftermath of the deadly attack

Sheriff Alex Villanueva of the Los Angeles County Sheriff's Department said it "remains a mystery" why Berhow carried out the shooting, which came on his birthday.

He said the youngster, who shot himself in the head at the scene of his 16-second rampage, did not appear to have written a manifesto, diary or suicide note.

Berhow was pronounced dead at 3.32pm local time on Friday, with his mother by his side in hospital after he was taken there in a "grave condition" by ambulance crews.

Security footage from the school had shown him opening fire after walking into an outdoor plaza, with his targets described as "random" by police.

Investigators are still trying to find out where he got the gun from, with Berhow said to have handled it with a degree of expertise and counted the rounds he fired.

The weapon was a semi-automatic pistol, but its origins are still unknown.

Image: Parents and children reunite after the shooting

Mr Villanueva said the attack was out of character for Berhow, who was "nothing out of the ordinary" and described as a quiet and smart child who had previously been a boy scout.

The sheriff added: "He's a cookie cutter kid that you could find anywhere."

Following the attack, helicopter footage aired on US television showed lines of youngsters with their hands in the air as they filed out of school buildings behind police officers.

Image: Aerials over Saugus High School in Santa Clarita, California

Teresa Figueira, one of around 2,300 students at the school, said: "I was walking with my sister and we were walking into school and then I heard a shot. All of a sudden I saw kids running and I thought it was a joke.

"Then I saw my sister running saying 'go go go', so I ran and my friend told me to go to his house because he lives on the street. It was terrifying."

The two girls who were injured during the shooting are still in hospital but are said to be doing well, while the boy who was hurt has already been released.