Of the 19 students injured, four suffered serious wounds, but all were expected to survive, hospital officials said. The injured officer was discharged.
Murrysville police Chief Thomas Seefeld said the bloody crime scene at Franklin Regional High School, some 15 miles east of Pittsburgh, was "vast" and may take a couple days to process.
Police haven't named the suspect, who was taken into custody for questioning and later driven from the police station in the back of a cruiser for treatment for a minor hand wound.
Investigators haven't determined a motive, but Seefeld said they're looking into reports of a threatening phone call between the suspect and another student the night before. Seefeld didn't specify whether the suspect reportedly received or made the call.
Two student victims were in critical condition, according to Dr. Mark Rubino of Forbes Regional Medical Center, the closest hospital to the school where eight victims were taken.
The University of Pittsburgh Medical Center 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 UPMC patients had been discharged, including three 15-year-old boys, a 16-year-old girl and an adult.
Seefeld wouldn't 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, pulled 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," Seefeld said.
The district serves about 3,600 students who live in the bedroom communities of Murrysville, Export and Delmont.
Parents and former students say the school, which doesn't have metal detectors but does spot searches when security officials deem it necessary, generally does a good job of keeping students safe.
"I think the school reacted as fast ... as possible," said Rich Nickel, whose daughter, Jenna, 16, is a sophomore. "It's obviously a (lone) individual's act."