A California student with a shotgun opened fire in a classroom, wounding one classmate, says Kern County, Calif., Sheriff Donny Youngblood.

Updated at 4:45 p.m. ET: A high school teacher and a campus supervisor talked a student into surrendering after he opened fire in a classroom, wounding a classmate at a school in California's southern San Joaquin Valley on Thursday morning, police said.

The student had intentional targets when he brought a 12-gauge shotgun into the Taft Union High School classroom halfway through the first period, Kern County Sheriff Donny Youngblood said in a news conference. The incident happened around 9 a.m. local time and students were evacuated to the football field, NBC affiliate KGET of Bakersfield reported.

The shooter targeted and hit a 16-year-old student in the classroom of 28, and missed firing on another student he named, Youngblood said. The wounded victim was airlifted to the hospital, where the 16-year-old remains in critical, but stable, condition.

The teacher in the classroom, along with a campus supervisor, "engaged" the shooter with conversation as students were evacuating, according to Youngbood. At one point the shooter put the shotgun down, and officers were able to take him into custody. The gunman's identity has not been released, however he was described as a 16-year-old male student who lives near the school, NBCLosAngeles.com reported.

"We want to commend the teacher and a campus supervisor to bring this to a quick resolution," Taft Police Chief Ed Whiting said. "They did a great job in protecting the kids."

The teacher, who has not been named by officials, was grazed by a pellet to the head, Youngblood said. A second student suffered minor injuries while falling over a table during the evacuation, and a third student was taken to a hospital for possible hearing loss from the gun blast sound, Youngblood said, according to Reuters.

The shooter had as many as 20 shotgun rounds in his pocket, but it's not clear how many rounds were fired, Youngblood said.

Police say the suspect reportedly had "a dialogue" with the victim before Thursday morning, NBCLosAngeles.com reported.

KGET reported that at least three ambulances and a medevac helicopter had been sent to the scene.

Earlier, Taft police told NBC News they responded to the situation and the school was on lockdown. Deputies conducted a room-to-room search, according to KGET. The Kern County Sheriff's Department told NBCLosAngeles.com the shooting happened on the second floor of a science building on campus.

The school will be closed Friday, as authorities continue the investigation, KGET reported. Officials say the high school usually has an armed police officer, but the officer was not on site at the time.

Taft is in California's southern San Joaquin Valley, about 30 miles southwest from Bakersfield.

Thursday's shooting comes just a month after the Dec. 14 shooting at Sandy Hook Elementary School in Newtown, Conn., which claimed the lives of 20 children and six adult staffers and renewed a nationwide debate about gun control.

In February 2010, a math teacher tackled a gunman who wounded two middle school students in Littleton, Colo., just miles away from the scene of the 1999 Columbine High School massacre.

Stay informed with the latest headlines; sign up for our newsletter

NBCLosAngeles.com's Jonathan Lloyd and Nyree Arabian, as well as Reuters, contributed to this report.