A high school student was wounded Thursday morning near Bakersfield, Calif., after a 16-year-old with a shotgun walked into a science class and opened fire, authorities said.

The wounded Taft Union High School student was listed in critical but stable condition. The Taft Midway Driller, citing multiple sources, said the student, Bowe Cleveland, was shot in the chest.

The shooter missed a second student he was targeting, and apparently intended to shoot others, Kern County Sheriff Donny Youngblood said at an afternoon news conference.

The science teacher, identified by family as Ryan Heber, and a campus supervisor persuaded him to let the other students go and to put down his weapon, The Bakersfield Californian reported. Heber suffered a minor pellet wound to the head and declined treatment.

The unidentified student was taken into custody, and a .12-gauge shotgun and several shells were recovered. The motive has not been announced.

Youngblood said an armed Taft Police Department officer who is usually on campus was absent because he was snowed in.

One other student may have suffered hearing damage from the gunfire, and another was hurt tripping over a desk as the class evacuated.

The shooting took place around 9 a.m. PT (noon ET) in the physical sciences building of the school in Taft, an oil-and-gas town of 10,000 residents 30 miles southwest of Bakersfield, in the San Joaquin Valley.

The student shooter was absent when school began Thursday morning. A neighbor spotted him carrying a shotgun into the school and called 911. The student then walked into his science class and opened fire. Authorities believe he fired two to four rounds.

Taft police said officers arrived within a minute of the 911 call. Kern County Sheriff's deputies, FBI agents and California Highway Patrol officers swarmed the school and conducted room-by-room searches before declaring the situation under control.

KERO-TV's Christine Dinh reported that at least two terrified students - including one who had locked herself in a closet - called their parents as the shooting unfolded. One student told her parents she saw a classmate on the floor in a pool of blood.

Youngblood said the gunman told Heber he didn't want to shoot him.

Heber's father told the Bakersfield paper, "His students like him a whole bunch. He's not the kind of teacher a student would try to hurt. He's definitely someone who could talk a kid down in an emergency."

Taft is represented in Congress by Republican Rep.Kevin McCarthy, the majority whip, which is the No. 3 position in the U.S. House leadership.

On Twitter, McCarthy said he was "deeply saddened and troubled by the news of the shooting."