A Taft Union High School student -- who was suspected of shooting a fellow classmate at the Kern County, Calif., school -- was subdued by a quick-thinking teacher who talked him into putting down a shotgun.

The unnamed teacher was credited with preventing further tragedy at Taft, where the 16-year-old suspect interrupted the first period of classes on Thursday when he targeted a fellow student inside the school’s science building, Kern County Sheriff Donny Youngblood told the media. Police officers then arrested the suspect and took him into custody. He was being interrogated in nearby Bakersfield, they said.

The shooter, also unnamed, fired one round of a 12-gauge shotgun, hitting a 16-year-old classmate. The victim was in critical but stable condition at Kern County Medical Center, Youngblood said. The sheriff said the two classmates had contact prior to the shooting that may have led to the incident.

After firing at the student, the shooter then “tried to engage a second student that he named and tried to shoot him and missed,” the sheriff said.

A science teacher who was conducting a class at the time was able to convince the shooter to lay down his shotgun. The teacher was assisted by a campus supervisor at Taft, accounts of the incident said.

Youngblood said the teacher “started a dialogue” with the shooter to distract him and give the students time to head to safety.

The teacher “distracted him in a conversation ... and ultimately talked the student down,” the sheriff added, noting that he didn’t know exactly what was said between the two.

“The heroics of these two people [the teacher and campus supervisor] goes without saying,” Youngblood said. “To stand there and face someone who has a shotgun … speaks volumes for these two young men and what they prevented.”

“We’re very fortunate to have the kind of response that we did today,” Taft Police Department Chief Ed Whiting said. “We want to really commend the teacher and a campus supervisor for all they did to bring this to a very quick resolution before anybody else was harmed.”

The teacher suffered a “pellet wound” during the shooting but was not hospitalized, authorities said.

Neighbors said they saw the shooter walk into Taft carrying a gun around 9 a.m. local time. They then called 911.

The shooter had “multiple rounds” of ammunition, Youngblood said.

A female student was taken to a local hospital with possible hearing damage after the suspect fired the shotgun close to her ear, the sheriff said. Another student fell as they tried to flee the classroom.

U.S. Rep. Kevin McCarthy (R-Calif.) commended the teacher for preventing further tragedy.

“I think he saved many lives today,” the congressman said of the teacher, who also was not identified during a news conference.

Youngblood echoed that sentiment.

“If it weren’t for this teacher and a quick response, we don’t know what might have happened. This is a tragedy, but not as bad as it might have been,” he said.

There were reports that the shooter had a hit list, but neither Youngblood nor Whiting would confirm the speculation. They also could not confirm whether the shooter had been bullied.

“Obviously something occurred for this student to come in with a shotgun,” the sheriff said.

Whiting said the school usually has an armed officer from the Taft Police Department on duty, but the officer did not show up to work on Thursday because he was snowed in.

The incident prompted evacuations of the high school, with students being taken to the Taft auditorium, KABC-Los Angeles reported. Parents were told to pick up their children at the school’s football field.

An ABC-affiliate in the Bakersfield's area reported that the Kern County Sheriff’s Department was securing the school by conducting a room-by-room search. The news station reported that a news outlet received calls from people at Taft, who were hiding in closets during the shooting.

The Taft shooting occurred less than a month after Adam Lanza killed 20 children and six staff at Sandy Hook Elementary School in Newtown, Conn. The Newtown shooting has spurred calls for harsher gun-control legislation, including the reinstatement of the assault weapons ban. Lanza used an assault weapon during the attack, which ended after he shot himself.