(CNN) -- The teacher stood in the classroom, face-to-face with his 16-year-old student, who was holding a shotgun.
Ryan Heber, 40, talked to the teen, trying to persuade him to end an armed assault in which one student had already been shot.
Heber had no idea whether the student -- whose pockets were filled with ammunition -- would put the gun down or pull the trigger.
Campus supervisor Kim Fields helped distract the teen, allowing other students in the classroom to escape, while Heber talked to him, according to CNN affiliate KGET.
Eventually, the teen let go of the gun, and police took him into custody.
That was how police described the frightening situation Thursday at Taft Union High School, about 30 miles outside Bakersfield, California.
"To stand there and face someone that has a shotgun, who's already discharged it and shot a student, speaks volumes for these two young men and what they may have prevented," Kern County Sheriff Donny Youngblood said Thursday.
Heber, however, hates the term hero. He told CNN Friday that he doesn't want to be labeled anything except "teacher."
Classes were canceled for Friday, the school website said, and on-campus counseling was being made available for students in the morning.
The wounded student was in critical but stable condition Thursday night, and the shooter was in custody, police said. Heber and his wife, who also works at the school, visited the hospital Friday and met with the father of the victim.
The name of the student in custody was not released. He will be charged as a juvenile with attempted murder, according to Youngblood, who added that prosecutors will decide whether he should be charged as an adult. Authorities searched his home, according to sheriff's spokesman Ray Pruitt.
Heber, who teaches science, is known as a well-liked teacher at the school, according to his father, David Heber. He is himself a graduate of Taft, where he played football and served as student body president.
David Heber wasn't surprised that his son played a key role in defusing the situation, saying Ryan Heber makes a point of getting to know his students -- including the suspected gunman -- on a personal level.
"Because he knows the boy and the boy knows him ... I attribute that to why the boy talked and listened to my son," David Heber said. "It's all about kindness. It's all about my son being kind and caring about his students that makes this successful."
David Heber also said his son, who was standing just a few feet away from the student who was shot, had been hit in the head with a shot pellet, but was fine and didn't seek treatment for it.
Nonetheless, Ryan Heber will be coping mentally with a difficult situation, his father said, adding his son slept little Thursday night.
"This was a very upsetting incident," David Heber said, describing his son as "emotionally worn out."
"It was hard for him. ... but he's come to the conclusion that he did everything he could do."
Ryan Heber told CNN that it wasn't just his students he was worried about as he faced the gunman -- it was also his wife, who works in the business office of the school, and his two sons, ages 5 and 3, at home.
As the school went into lockdown amid the shooting, Heber's wife texted him from her office, reminding him to lock his classroom door. His response, according to his father, "The shooter is in my room."
Ryan Heber said the ordeal has really made him want to come home to his family.
The Taft shooting is the latest incident of gun violence that launched a fiery national debate over whether teachers should be armed.
Last month the National Rifle Association called on communities to arm teachers or place armed guards in schools as a solution following a Newtown, Connecticut, shooting spree in which a 20-year-old gunman killed seven adults and 20 children at an elementary school.
"The only thing that stops a bad guy with a gun is a good guy with a gun," said the NRA's Wayne LaPierre. The idea has been rejected by teacher's groups and mayors, including New York's Michael Bloomberg, Boston's Thomas Menino and Philadelphia's Michael Nutter.
The debate prompted CNN commenter Adika to weigh in Thursday, saying, "So let me get this straight. The NRA wants to have police officers in schools ... yet an unarmed teacher talked a student into surrendering his gun. Besides being one heck of a hero, that teacher just might have some advice for the NRA."
Another CNN commenter, Frank455444, countered: "Well if the schools are armed and another nut shows up HE GETS SHOT! PROBLEM SOLVED!"
In Utah it's been legal for a dozen years for teachers to be armed in class. Since the law took effect, there have been no school shootings in the state, nor accidents or incidents involving educators' firearms.
Immediately after the Taft shooting Thursday, amid the frenzy of desperate parents coming to the school to retrieve their children, parents expressed concern about school security.
"It just goes to show you that we're going to have to do a lot more to protect our students in this small town," an unidentified parent told KGET. "It might be a small environment, but there's always that one bad apple."
CNN's Kyung Lah, Sarah Aarthun, Michael Martinez, Kate Bolduan and Steve Brusk contributed to this report.