A 16-year-old boy "was flashing two knives around" when he injured 19 students and a school police officer who eventually subdued him with the help of an assistant principal at a high school near Pittsburgh, a police chief said.
Murrysville police chief Thomas Seefeld said the bloody crime scene left behind at Franklin Regional High School in Pennsylvania is "vast" and may take a few days to process.
Police have not named the suspect, who was taken into custody, but said he is being treated for a minor hand wound.
Investigators have not determined a motive but say they are looking into reports of a threatening phone call between the suspect and another student the night before.
At least two of the victims were in critical condition, though doctors expect all victims to survive.
Two student victims were in critical condition, according to Dr Mark Rubino of Forbes Regional Medical Centre, the closest hospital to the school where eight victims were taken.
The University of Pittsburgh Medical Centre treated a dozen patients. Officials said a 17-year-old boy and 14-year-old boy were in critical condition, a 17-year-old boy and a 16-year-old boy were in serious condition, and a 17-year-old boy and two 17-year-old girls were in fair condition.
Five patients had been discharged, including three 15-year-old boys, a 16-year-old girl and an adult.
Mr Seefeld would not detail the carnage beyond saying: "The juvenile went down the hallway and was flashing two knives around and injured the people."
The chief said someone, possibly a student, set off a fire alarm after seeing some of the victims being stabbed. Although that created chaos, he said, it also resulted in students running out of the school to safety faster than they might have otherwise.
"The fire alarm being pulled probably assisted with the evacuation of the school and that was a good thing that that was done," Mr Seefeld said.