Zawahiri was hospitalized for psychiatric evaluation in 2006 after the discovery, according to officials who are trying to piece together the troubled history that may have sparked the Santa Monica shootings.
Police in 2006 searched the house where Zawahri lived with his father after the teen made repeated violent threats against students, teachers and campus security officers at Olympic High School.
Retired police officer Cristina Coria, who helped execute the search warrant, said Tuesday she didn't know what was found at the house or the outcome of the mental evaluation.
The Santa Monica-Malibu Unified school board was briefed at the time by school administrators after police found Zawahri was learning to make explosives by downloading instructions from YouTube, school board member Oscar de la Torre said.
"It was some type of devices or materials that would be able to make explosives, and the word 'pipe bombs' was what was referred to," he told The Associated Press. "If it was guns and stuff like that it would have been more serious, but because it was explosives, it wasn't deemed 'Oh my God,' just that this guy had a fascination."
Investigators are looking at his police history, along with a stormy family life, to determine what led to the chaotic shooting Friday on a Southern California college campus. The encounter seven years ago appeared to be the last reported run-in Zawahri had with police until he died in a shootout with officers Friday.
Santa Monica police Sgt. Richard Lewis said a pipe was found in the home, but declined to provide more details because Zawahri was a juvenile at the time.
Zawahri wasn't expelled, but he didn't finish classes at Olympic High — a school for students who have academic or disciplinary issues. Lyon said Zawahri attended the school for six months during 2006.
Zawahri, 23, shot his father, Samir Zawahri, 55, and his brother Christopher Zawahri, 25, on Friday, leaving their home in flames before shooting at strangers in cars and at Santa Monica College, in a 15-minute rampage that occurred as students were taking final exams and ended with John Zawahri fatally shot by officers in the college library.
The victims included a campus groundskeeper and his daughter, who was a student at the college, and a woman collecting cans outside the library.
Graduation was held Tuesday at the college where jittery students returned Monday. Commencement ceremonies were punctuated by a moment of silence as graduates and their families, along with administrators and faculty, stood and paused on the campus football field.
"We have come together as a community to heal and to pay homage to the victims," said the school's president, Chui L. Tsang, according to City News Service.
Meanwhile, two unrelated shootings on Tuesday kept the beachside community on edge.
Many questions remained for returning students as investigators examined how Zawahri had access to an assault-style rifle, an old revolver and 1,300 rounds of ammunition that he'd carried with him.
De la Torre, who was a neighbor of Zawahri, said the gunman's father told him he was having problems with his son eight months ago.
"They didn't talk to a lot of people, they were very reserved," de la Torre said. "One time he did tell me he had problems with his younger son, knowing I work with youth. He never went into detail about anything."
Zawahri took classes in video game design, animation, and other technology-related subjects at Santa Monica College in 2009 and 2010. He had no disciplinary issues at the school.
Coria was a campus resource officer teaching a seminar on bullying and reporting threats at Olympic High in 2006 when she first took notice of Zawahri sitting at the back of a classroom.
"I remember him specifically because he had the long hair," Coria said. "He had the black outfit on, the black trench coat, the black boots. He was very thin. He just had that isolated look."
She said another campus officer warned her afterward to keep an eye on Zawahri because he had been taken in by campus police for making threats.
A teacher saw "disturbing behavior, conversations around weapons and violence," district superintendent Sandra Lyon said.
Zawahri was held by a hospital for psychiatric evaluation after the search of his home, Coria said. Once a person is held for such an exam, they cannot access or possess firearms for five years.
In the case of Zawahri, that prohibition would have expired in 2011.
Investigators were trying to determine whether problems in the Zawahri family played a role in the killings.
Zawahri's mother, Randa Abdou, said in a 1998 court filing seeking a restraining order that her husband had threatened to kill her twice and became abusive five years into their marriage after she had moved from Lebanon to join him in the U.S. Abdou has not spoken to the media.
Wendy Parise, who had Zawahri in her preschool class, remembers the 4-year-old as a "sad little boy" who was "very timid, withdrawn and very sensitive."
In 1993, Zawahri's mother contacted the school terrified and desperate. She told them "her husband had pulled a knife on her and her boys," Parise said. The school sent her to a local battered women's shelter.
"Now I look back and I think he was traumatized as a child, he was living through all of that, and part of me thinks, what happened to this boy in subsequent years?" Parise said. "That family was poisoned and he lived in a poisonous environment, and that was devastating."
Associated Press writers Amy Taxin, Michael R. Blood, Anthony McCartney contributed to this story. Tami Abdollah can be reached at http://www.twitter.com/latams.
Copyright 2013 The Associated Press.