Police say 16-year-old suspected gunman opened fire on southern California high school before shooting himself.

A California high school student has pulled a 0.45 caliber semiautomatic handgun from his backpack and fired on fellow students as classes began, killing two and wounding three others, according to authorities.

He then turned the gun on himself. It was his 16th birthday.

The teenaged gunman survived the self-inflicted gunshot to the head and was in grave condition, law enforcement officials said. Investigators were still searching for what drove the student to perpetrating the rampage at Saugus High School in Santa Clarita, about 65km (40 miles) north of Los Angeles.

Saugus now joins an ever-growing list of schools remembered as sites of gun tragedies, such as Sandy Hook Elementary School in Connecticut, Columbine High School in Colorado, and Marjory Stoneman Douglas High in Florida.

“How do we come out of tragedy? We need to say ‘No more!’ This is a tragic event. It happens too frequently,” said Captain Robert Lewis of Santa Clarita Valley sheriff’s station, striking an emotional note in an otherwise somber news conference.

The suspected gunman remained unidentified. Police said he acted alone.

They searched his family home and found no further danger.

Students are evacuated from Saugus High School after a shooting at the school left two students dead and three wounded [Mario Tama/Getty Images/AFP]

The two students killed were a 16-year-old girl and a 14-year-old boy. Two other girls, aged 14 and 15, were wounded, as was a 14-year old boy, Captain Kent Wegener of the Los Angeles County Sheriff’s Department told a news conference.

“Video clearly shows the subject in the quad, withdraw a gun from his backpack, shoot and wound five people and then shoot himself,” Wegener said.

The incidence of yet another mass shooting in the United States in recent years has intensified the debate about gun control and the constitutional right of citizens to keep and bear arms.

This is at least the 85th incident of gunfire on school grounds this year, according to Everytown, an advocacy group for stricter gun laws.

‘Drills don’t prepare you for the real thing’

Sean Murillo, 17, a football player at Saugus High School, said he was walking toward his coach’s office when he heard shots about 3 metres (10 feet) away and ducked into a classroom.

Murillo later met his mother at a designated point for parents and students to reunite at Santa Clarita’s Central Park.

“There’s no feeling of safety until he’s in your arms,” said his mother, Mercedes Rodriguez.

Marco Reynoso, right, hugs his son, 11th-grader Dylan Reynoso, after reuniting near Saugus High School [Mario Tama/Getty/AFP]

Taylor Hardges reported seeing people running in the hallways shouting “Run!” She raced into a classroom, where a teacher barricaded the door.

“We’ve had drills. It doesn’t prepare you for the real thing,” she said after reuniting with her father.

Her father, Terrence Hardges, said Taylor texted him from inside the classroom. He said he had seen her message while casually scrolling through his texts and it made his heart race.

“She said ‘I love you. I’m pinned in a room. We’re locked in,'” Terrence Hardges said.

Reminiscent of Parkland

The scene at Saugus High School was reminiscent of recent mass shootings at schools across the US, including the massacre at Marjory Stoneman Douglas High School in Parkland, Florida, where a former student with an assault gun killed 17 people on February 14, 2018.

The Valentine’s Day massacre at Stoneman ignited a nationwide student-led movement calling for school and gun safety. In August, survivors of that shooting released a sweeping gun-control plan that would ban assault-style rifles and take other steps with the aim of halving US firearms deaths and injuries within a decade.

This year marks the 20th anniversary of the shooting at Columbine High School, where two teenagers went on a rampage, fatally shooting 12 students and a teacher and wounding more than 20 others before killing themselves.

“Speechless about the shooting in Southern California,” tweeted Cameron Kasky, a survivor of the Parkland shooting, who was one of the students who organised rallies and lobbying efforts in Florida’s capital Tallahassee and Washington, DC, following the shooting.

“Sending love and strength to the whole community,” Kasky added.