Nathaniel Berhow died in a hospital one day after shooting himself in the head at the end of a 16th birthday rampage that left two fellow students dead.
Berhow had been in critical condition since police officers storming the campus found him lying among the wounded.
The Los Angeles sheriff's department confirmed Berhow died shortly after 3:30 pm on Friday.
Three killed, at least 15 injured in US festival shooting
The puzzle of what led him to open fire at Saugus High School, a short commute from Los Angeles, deepened as a picture emerged of a quiet yet sociable teen who was familiar with guns but had no history of troubled behavior.
"We know it was a planned attack, it was deliberate... The motive? We don't have it yet," Los Angeles County Sheriff Alex Villanueva told a news conference.
The victims - a boy and a girl died while another three students were wounded- appeared to have been chosen at random, he said.
"There's no relationships that we can tell (between) the suspect and the victims," Villanueva added, scotching rumors that an ex-girlfriend had been his target.
There was also no history of the teen being bullied.
The FBI earlier said there is no evidence that the suspect had any ideological motives or acted on behalf of any organisation. No manifesto or suicide note has been found.
Deepening the riddle, Berhow's late father had owned six registered guns - but none of them matched the .45 caliber semiautomatic the suspect used.
His proficiency with the weapon during his short, deadly ambush suggested he had been firing guns for some time.
"In 16 seconds he cleared a malfunction and was able to shoot five people and himself, so he seemed very familiar with firing the weapon," said Villanueva.
Jared Axen, 33, a next door neighbor, described Berhow as an introvert who was usually quiet and reserved but who had friends and could readily be engaged in conversation.
"I would see him go back and forth between scouting. I'd see him do a lot of sports-related activities," he told the Los Angeles Times.
School records show Berhow was a keen middle-distance track runner.
Aidan Soto, a fellow scout and student at Saugus, described the suspect as a "good kid," and the last person he would expect to carry out a mass shooting.
"The younger scouts really looked up to him. He was there when they needed him with anything. I'm bewildered and looking for answers."
Although Berhow had no evident history of violence, his family life over the past few years had been difficult.
His father, divorced from his mother not long before, died of a heart attack in December 2017.
The father had reportedly suffered from alcohol-related problems, and was at one point suspected of domestic violence but never prosecuted for lack of evidence.
Two decades of school mass shootings in the US
Nonetheless, the father and son were seemingly close.
"He would tell me that he missed his father and that he loved him," Axen said.
The father was a keen hunter whom neighbors would see manufacturing ammunition in his garage. Investigators said they found additional arms at the home, beyond the six registered weapons.
Berhow would sometimes accompany his father on hunting trips, according to Axen - accounting for the deadly accuracy of his shooting.
He also "knew how many rounds he had," noted Villanueva, the sheriff. The teen gunman saved his final bullet for himself.
The students slain by Berhow were identified as Gracie Anne Muehlberger, 15, and a 14-year-old boy.
Messages on Muehlberger's Instagram page read "I miss you so much already love," and "It's so sad that another innocent person has to die."
Another wounded teenager was able to return home Friday morning, and two girls -- both operated on for gunshot wounds - should be able to leave the hospital in a few days, say medics.
Tearful prayer vigils were held Thursday night, and all schools in the district remained closed Friday in a mark of respect, Deputy Superintendent Mike Kuhlman said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ