Kern County sheriff Donny Youngblood said at a news conference Thursday night that the 16-year-old used a shotgun that belonged to his brother and went to bed Wednesday night with a plan to shoot two fellow students.
"He believed that the two people he targeted had bullied him, in his mind. Whether that occurred or not, we don't know yet," Youngblood said.
Youngblood added that the suspect came to Taft Union High School with ammunition stuffed in his pockets.
According to Youngblood, surveillance video shows the teen trying to conceal the gun as he nervously enters the building through a side entrance after school had started Thursday morning.
The boy went into a classroom, shot one student, then fired on but missed others before a teacher and another staff member talked him into surrendering, Youngblood told reporters.
Morgan Allredge, 16, calmly described what happened to CBS Los Angeles station KCBS. To see the interview, click on the video at left.
The wounded student was flown to a hospital in Bakersfield and was listed in stable but critical condition. He is also 16, reports CBS Bakersfield, Calif. affiliate KBAK-TV.
When the shots were fired, teacher Ryan Heber tried to get the 28 students out a back door and engaged the shooter in conversation to distract him, Youngblood said.
Some students got out the back door, while some barricaded themselves in a classroom storage closet, KBAK says.
A third and final shotgun blast was directed to the windows of the classroom, KBAK reports.
Campus supervisor Kim Lee Fields responded to a call of shots fired and also began talking to the teen.
"(Heber and Fields) talked him into putting that shotgun down. He in fact told the teacher, "I don't want to shoot you,' and named the person that he wanted to shoot," Youngblood said.
"The heroics of these two people goes without saying. ... They could have just as easily ... (have) tried to get out of the classroom and left students, and they didn't," the sheriff said. "They knew not to let him leave the classroom with that shotgun."
The shooter didn't show up for first period, then interrupted the class.
Youngblood did not release the student's disciplinary record, saying he didn't have it.
The Sheriff's Department did not release the boy's name because he was a juvenile and had yet to be charged.
But many students and community members said they knew the boy and said he was often teased, including Alex Patterson, 18, who went to Taft with the suspect before graduating last year.
"He comes off as the kind of kid who would do something like this," Patterson said. "He talked about it a lot, but nobody thought he would."
Trish Montes, who lived next door to the suspect, said he was "a short guy" and "small" who was teased about his stature by many, including the victim.
"Maybe people will learn not to bully people," Montes said. "I hate to be crappy about it, but that kid was bullying him."
Montes said her son had worked at the school and tutored the boy last year, sometimes walking with him between classes because he felt sorry for him.
"All I ever heard about him was good things from my son," Montes said. "He wasn't Mr. Popularity, but he was a smart kid. It's a shame. My kid said he was like a genius. It's a shame because he could have made something of himself."
Officials said a female student was hospitalized with possible hearing damage because the shotgun was fired close to her ear, and another girl suffered minor injuries during the scramble to flee when she fell over a table.
Officials said there's usually an armed officer on campus, but the person wasn't there because he was snowed in. Taft police officers arrived within 60 seconds of first reports.
The alleged shooter apparently lives close to the school, and neighbors saw him carrying the gun into school and called 911, KBAK says.
Wilhelmina Reum, whose daughter Alexis Singleton is a fourth-grader at a nearby elementary school, got word of the attack while she was about 35 miles away in Bakersfield and immediately sped back to Taft.
"I just kept thinking this can't be happening in my little town," she told The Associated Press.
"I was afraid I was going to get hurt," Alexis said. "I just wanted my mom to get here so I could go home."
Taft is a community of fewer than 10,000 people amid oil and natural gas production fields about 120 miles northwest of Los Angeles.
About 900 students are enrolled at the high school, which includes ninth through 12th grades.
The attack there came less than a month after a gunman massacred 20 children and six women at Sandy Hook Elementary School in Newtown, Conn., then killed himself.
That shooting prompted President Obama to promise new efforts to curb gun violence. Vice President Biden, who was placed in charge of the initiative, said he would deliver new policy proposals to the president by next week.
Sen. Dianne Feinstein, D-Calif., said in a statement that her father had attended Taft Union and she has visited the school over the years.
"At this moment my thoughts and prayers are with the victims, and I wish them a speedy recovery," Feinstein said. "But how many more shootings must there be in America before we come to the realization that guns and grievances do not belong together?"