SANTA CLARITA, Calif. – Two people were killed and four others injured – including the gunman – in a shooting rampage Thursday at a local high school, authorities in Los Angeles County said.

The suspect, a student at Saugus High School, was taken into custody and was being treated at a hospital, Sheriff Alex Villanueva said. He described the suspect as a 16-year-old Asian male whose birthday was Thursday. The student was in “grave” condition, he said.

The gunman shot five fellow students in the school’s quad area with a semi-automatic weapon, then shot himself in the head, said Kent Wegener, a captain in the Los Angeles County Sheriff’s Department. He said there were no more bullets in the weapon when the suspect stopped shooting.

A female student, 16, and a male student, 14, died at a local hospital, officials said. A 14-year-old boy, two girls – 14 and 15 – and another boy, 14, were injured.

Wegener also said reports of a possible online threat before the attack are being investigated.

“I know there are rumors out there about social media posts and different videos that may have been posted from this,” Wegener said. “We will be looking into that. At this point I don’t have any information about that.”

The shooting took place shortly before 8 a.m. at the 2,500-student school about 30 miles from downtown Los Angeles in the town that is home to Six Flags Magic Mountain.

Video from the scene showed law enforcement officials swarming the area around the school and multiple victims being wheeled on gurneys from the scene to waiting ambulances.

The White House said President Donald Trump was monitoring events. Mayor Eric Garcetti tweeted support for the victims, their loved ones and first responders working to “bring this horror to an end.”

“The shocking incident at a high school in Santa Clarita is tragic and heartbreaking,” he said.

Sophomore Elijah Mims, 15, said he was about 20 feet away from a tall person in black clothes when he began shooting.

“We were right there. We were scared out of our mind,” she told USA TODAY via Facebook. “We were lucky to have not been shot in that moment.”

Troy Grant, 15, a 10th-grader at the school, said he heard what sounded like balloons popping.

“Then I heard it multiple times and saw a herd of students running, so I then knew it was a shooting,” Grant wrote to USA TODAY on Facebook. “I don’t know what to feel right now, just hoping everyone’s safe and OK.”

Lines of students could be seen walking away from the school under police direction. Students were being loaded onto school and city buses to take them a half-mile to where they could be reunited with parents.

Charlotte Jinkins, 36, said she had just dropped off her son Joseph, a 14-year-old freshman, at about 7:30 a.m. local time when she saw a large group of students running toward a nearby church at the east end of Centurion Way.

“I heard a group of kids saying, ‘They are shooting!’” as sheriff’s deputies began to arrive. “It all happened so quick.”

Her son fled to a classroom, and they were reunited a short time later.

George Atilano said his trombonist daughter Raquel, 14, texted him that she was trapped in the band room. He said the band director went outside to confirm that there was indeed a shooter, then went back in and started finding places where students could be kept out of sight, including an office and library.

“He rounded kids up and shoved them in there,” Atilano said. He said he called the sheriff’s department, and the kids were rescued about 20 minutes later.

In the minutes after the shooting, authorities had said they were searching for a male suspect in black clothing, believed to be a student at the school. A weapon had been recovered, but officials would not provide details.

“This is still a very active situation,” the sheriff’s office tweeted shortly after the rampage unfolded. “Reports of approximately 5 victims being treated. Parents, deputies are on scene everywhere protecting your children.”

The school was locked down along with all schools in the William S. Hart district. The public was urged to stay away from the area.

“If you live in neighborhoods anywhere near Saugus High, PLEASE LOCK DOORS and stay inside,” the sheriff’s office tweeted. “If you see suspect, male dark clothing, in backyards, etc. CALL 911″

Former congresswoman Katie Hill, who resigned her seat this month, graduated from Saugus High School in 2004. She told USA TODAY she was “really, really concerned” for the students.

“We had countless interns and volunteers on the campaign that were current and former Saugus students,” she said. “We were really, really terrified of who we might know that has been impacted.”

The shooting comes days after the Secret Service issued a report examining more than three dozen attacks over 10 years.

In nearly every case, the report concluded that attackers had engaged in threatening or other suspicious behavior that caused people to raise concerns prior to the assault.

The review largely tracks an analysis of mass casualty attacks in 2018, which was published earlier this year. And it affirms a chilling conclusion: Much of the violence could have been averted.

In 80% of the cases, according to the report, the attackers’ behavior was so alarming that it “elicited concern from bystanders regarding the safety of the attacker or those around them.”

“In many of these cases, someone observed a threatening communication or behavior but did not act,” the Secret Service concluded. “These findings continue to highlight the importance of encouraging students, school personnel and family members to report troubling or concerning behaviors in order to ensure that those in positions of authority can intervene.”

Bacon reported from McLean, Va. Contributing: Grace Hauck, Nicholas Wu and Kevin Johnson, USA TODAY; The Associated Press