The 16-year-old,armed with a shotgun, walked into a rural California school, shot one student and fired at others before a teacher and another staff member talked him into surrendering, officials said.
The teenage victim was in a critical but stable condition, and the suspect, whose pockets were stuffed with ammunition, was being interrogated, Sheriff Donny Youngblood said at a news conference.
The suspect used a shotgun that belonged to his brother and went to bed on Wednesday night with a plan to shoot two fellow students, Mr Youngblood said.
Surveillance video shows the accused trying to conceal the gun as he nervously entered Taft Union High School through a side entrance after school had started on Thursday morning.
When the shots were fired, teacher Ryan Heber tried to get the more than two dozen students out of a back door and engaged him in conversation to distract him, Mr Youngblood said.
Campus supervisor Kim Lee Fields responded to a call of shots fired and also began talking to the pupil. "They 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," Mr Youngblood said.
"The heroics of these two people goes without saying."
Mr Youngblood said the suspect alleged the two students he targeted had bullied him for more than a year.
l A judge has ruled that there is enough evidence for James Holmes to face trial on charges that he killed 12 people and injured 70 others in a Colorado cinema last summer.
Judge William Sylvester said prosecutors have established probable cause to proceed with 166 charges, including murder and attempted murder.
Holmes, 25, was due to be arraigned yesterday, but his defence lawyers filed papers saying he was not ready to enter a plea.