SANTA CLARITA, Calif. – As gunshots at Saugus High School sent frightened students fleeing the building, a detective and two off-duty officers who were dropping off their own kids ran toward the sound of gunfire, providing life-saving first aid to the victims, Los Angeles County Sheriff Alex Villanueva said.

In only 16 seconds, two teenagers — a 16-year-old girl and a 14-year-old boy — were killed and three were wounded Thursday at the suburban Los Angeles high school in Santa Clarita.

The attacker, a fellow student who turned 16 on Thursday, was hospitalized in grave condition after shooting himself in the head, according to surveillance video, authorities said.

Officials said the teenager, armed with a .45-caliber semiautomatic weapon, apparently acted alone. There was no indication that he was affiliated with a group or ideology, said Paul Delacourt, the agent in charge of the FBI’s Los Angeles field office.

What we know:The latest on the Saugus High School suspected gunman, victims

Villanueva told reporters that lives were saved by the quick action of off-duty officers who rushed into the school to try to confront the attacker and tend to the victims.

“Off-duty first responders were there and did not hesitate, turned around and went right into the source of the gunfire to attempt to neutralize it, and they rendered first aid immediately,” he said.

They realized immediately that the shooter was down and quickly grabbed the school’s trauma kits to begin treating the victims.

“Their actions definitely saved lives, and my hat’s off to them,” the sheriff said.

‘He doesn’t seem like the kind of kid to do this:Classmates, neighbors surprised by suspected Santa Clarita shooter’s identity

Detective Daniel Finn, of the Los Angeles county station in Santa Clarita, was the first one in. He had just dropped off a family member when the shooting began, the sheriff said.

He “was exiting, driving away from the school along the perimeter, when he saw all of the children running away from the sound of the gunfire,” Villanueva said. “He turned around and became the very first person on scene.”

He was joined by Officer Sean Yanez from the Inglewood Police Department and Officer Gus Ramirez from Los Angeles Police Department.

“So the three of them were the very first on scene and they entered the school literally within seconds of the shooting,” he said.

Other uniformed deputies from the local sheriff’s station also arrived within a minute, including Deputy James Callahan, who works as a school resource officer at the high school.

“As soon as they saw the six victims, they saw the handgun was there, they realized there was not a pending threat immediately and they tended to the care of all of the victims and got the first aid rolling,” the sheriff said.

Shauna Orandi, 16, was in her Spanish class when she heard four gunshots and a student burst in to say he had seen the shooter.

“My worst nightmare actually came true,” she said. “This is it. I’m gonna die.”

At a vigil Thursday evening, Lea Reas said her nephew, a 14-year-old freshman, ran after watching his friend shot to death. A teacher pulled him to safety into a room.

“At first he thought it was a graze” but later was told his friend had died, she said. “He lost it.”

Classmates have identified the boy to USA TODAY, although law enforcement has yet to name him publicly because he is a minor.

Sheriff’s Capt. Kent Wegener said at a news conference that video of the incident shows that the attack took place quickly and in one location in the school quad.

“From the time that he withdrew the handgun from his backpack to the time that he was on the ground with a gunshot wound to his head was about 16 seconds,” Wegener said.

Brooke Risley, 16, described the shooter as a nice, normal student who was on the cross-country team and was a member of the Boy Scouts.

“He doesn’t seem like the kind of kid to do this,” she said.

Though he was the quiet sort, Risley said he had tight friends and was deeply hurt by the death of his father when he was in ninth grade.

“He was open to his close friends. When his dad passed, that was really hard for him,” said Risley, a junior who said she worked on an engineering class project with the suspect last year.

Contributing: The Associated Press