The 16-year-old boy had just wounded a classmate he claimed had bullied him, fired two more rounds at students fleeing their first-period science class, then faced teacher Ryan Heber.
"I don't want to shoot you," he told the popular teacher, who was trying to coax the teen into giving up the shotgun he still held.
Recounting the suspect's words, Kern County Sheriff Donny Youngblood said the confrontation was enough of a distraction to give 28 students time to escape their classroom Thursday at Taft High School.
The violence came just minutes after administrators had announced new lockdown safety procedures prompted by the Newtown, Conn., school massacre.
"Just 10 minutes before it happened our teachers were giving us protocol because of what happened in Connecticut," said student Oscar Nuno, who was across campus from the science building when an announcer on the speaker system said the school was under lockdown "and it was not a drill."
The teen victim, who classmates said played football last year for the Taft Wildcats, was in critical but stable condition at a Kern County hospital Thursday night. He was expected to undergo surgery on Friday.
The suspect surrendered his shotgun to Heber and campus supervisor Kim Lee Fields. His pockets were stuffed with more ammunition, Youngblood said.
"This teacher and this counselor stood there face-to-face not knowing if he was going to shoot them," Youngblood said. "They probably expected the worst and hoped for the best, but they gave the students a chance to escape."
Heber's forehead was grazed by a stray pellet, but Youngblood said the teacher who had graduated from the Taft school two decades ago was unaware he had been hit and didn't need medical attention.
"He's the nicest teacher I know," Nuno said. "He loves his students and he always wants to help."
Administrators closed the school Friday as residents of this remote town of 9,400 that sits amid tumbleweeds and oil fields about 120 miles northwest of Los Angeles tried to make sense of what happened.
"We know each other here," said former Mayor Dave Noerr. "We drive pickups and work hard and hunt and fish. This is a grassroots town. This is the last place you'd think something like this would happen."
The 16-year-old suspect's name is on the lips of everyone in town, but authorities aren't releasing it because he's a juvenile. He had felt bullied by the victim for more than a year, said Youngblood, who added that the claim was still being investigated.
Trish Montes described her neighbor as "a short guy" and "small" who was teased about his stature by many.
Montes said her son had worked at the school and tutored the boy last year.
"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."
On Wednesday night the teen went home and plotted revenge against two students, Youngblood said. He found a gun that authorities believe belonged to the suspect's older brother and went to bed that night plotting revenge against two students.
"He planned the event," Youngblood said. "Certainly he believed that the two people he targeted had bullied him, in his mind. Whether that occurred or not, we don't know yet."
The suspect arrived after 9 a.m. Thursday, and video surveillance cameras captured him looking nervous as he entered through a side door, Youngblood said. He made his way to the second floor of the school's science building, where Heber's class with 28 students inside was under way.
The suspect walked in a door close to the front of the classroom and shot his classmate. When the shots were fired, Heber tried to get the more than two dozen students out a back door and engaged the shooter in conversation to distract him, Youngblood said.
"The heroics of these two people goes without saying. ... They could have just as easily ... 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."
"When your son does the right thing, you have to feel fantastic," said the teacher's father, David Heber, who also lives in Taft.
He described his son as a "teacher who knows every single one of his students and not just by name."
He said his son had been teaching science to different grade levels for seven or eight years. The younger Heber was student body president when he went to Taft, his father said.
Heber couldn't remember any other time when a confrontation turned so violent. "I don't think he's ever been in a fight in his life. He can always talk himself out of it."
Youngblood said that the suspect would be charged with attempted murder. The district attorney will decide whether he's charged as an adult, Youngblood said.
Authorities 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.
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.
Officials said there's usually an armed officer on campus, but the person wasn't there because he was snowed in.
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 Barack Obama to promise new efforts to curb gun violence. Vice President Joe Biden, who was placed in charge of the initiative, said he would deliver new policy proposals to the president by next week.