A teenage gunman opened fire at a Southern California high school Thursday morning, killing two students and wounding three others, before shooting himself in the head, officials said.

The suspect, whom authorities described as an Asian male who turned 16 on Thursday, was in critical condition at a hospital, the Los Angeles County Sheriff's Department said Thursday night. Surveillance video showed the shooter pull a gun from his backpack in the quad area of Saugus High School, shoot five people and then shoot himself, it said.

"Within approximately 16 seconds, it was over," sheriff's Capt. Kent Wegener said.

Multiple law enforcement sources told NBC News that the suspect was identified as Nathaniel Tennosuke Berhow.

A 16-year-old girl and a 14-year-old boy died, authorities said. Three other students — two girls, 14 and 15, and a 14-year-old boy — were also shot before classes began, officials said. They were listed as stable on Thursday night.

All of the victims and the suspect attended Saugus.

"I hate to have Saugus be added to the names of Columbine, Parkland, Sandy Hook, but it's a reality that affects us all throughout the nation, something we're going to have to deal with," Sheriff Alex Villanueva said at a news conference after finding out that the second student had died.

First responders arrived at the school within two minutes of the initial report of the shooting just after 7:30 a.m., Villanueva said.

A .45 caliber semi-automatic pistol with no rounds left in it was recovered, and investigators obtained a search warrant for the suspect's home and were interviewing his girlfriend and his mother.

Investigators said that they had not determined a motive but that they believed the shooter acted alone. Authorities had said earlier that they were investigating an Instagram account belonging to the suspect, but the account turned out not to be associated with him, Instagram told NBC News late Thursday.

Authorities searched for the suspect after the shooting, not immediately realizing that he was one of the six people wounded.

"If you live in neighborhoods anywhere near Saugus High, PLEASE LOCK DOORS and stay inside," the sheriff's Santa Clarita Valley station tweeted before the suspect was identified. "If you see suspect, male dark clothing, in backyards, etc. CALL 911."

"Parents, deputies are on scene everywhere protecting your children," the sheriff's station said.

The Santa Clarita Valley station tweeted just before 8 a.m. that the public should avoid the area of Saugus High School, about 40 miles north of Los Angeles. Minutes later, the office said people were reporting that shots had been fired at the school.

Download the NBC News app for breaking news

A student, Sharon Orelana Cordova, told NBC Los Angeles that she was doing homework when she saw people running, so she started running, too. "When I got out, I saw this person lying down on the ground, and I saw blood all over. It was really scary. I was really, really scared. I didn't know what was going on," she said.

Saugus was placed on lockdown, as were neighboring elementary schools and all of the schools in Saugus' William S. Hart Union High School District, officials said.

Aerial video showed students, with their hands raised, being escorted by deputies away from the school of about 2,300 students, NBC Los Angeles reported. They were transported from the campus on school buses with armed deputies on board.

An area was set up reunify parents with their children at a park about 3 miles away.

Deputy School Superintendent Mike Kuhlman said in a statement that school officials were "in the process of formulating a plan to care for our school and our community — and will continue sharing updates as we learn more — including the plan for the days ahead."

"Our hearts go out to the families of those affected by this terrible incident. Words are insufficient in times such as these," the statement said.

Gov. Gavin Newsom mentioned a stalled bill on universal background checks for gun sales on Twitter on Thursday, adding that President Donald Trump and Senate Majority Leader Mitch McConnell, R-Ky., "sicken" him.

"260 days of McConnell and Trump doing NOTHING while America continues to mourn," Newsom said. "To bury loved ones. To witness our neighbors, friends, and children gunned down at our malls, churches, and schools."

CORRECTION (Nov. 14, 2019, 3:13 p.m. ET) An earlier version of this story misstated the status of the suspect in the shooting at Saugus High School in Santa Clarita, California. The suspect shot himself in the head and was in critical condition in a hospital; he has not died.