A high-school student in central California opened fire with a shotgun Thursday morning in a science classroom, wounding one student and leaving two others with minor injuries, officials said.

The shooter was taken into custody at Taft Union High School in the 10,000-person town of Taft, Calif., after the teacher convinced him to put down the gun.

Officials...