MURRYSVILLE, Pa. — Flailing away with two kitchen knives, a 16-year-old boy with a ‘‘blank expression’’ stabbed and slashed 21 students and a security guard in the crowded halls of his suburban Pittsburgh high school Wednesday before an assistant principal tackled him.
At least five students were critically wounded, including a boy whose liver was pierced by a knife thrust that narrowly missed his heart and aorta, doctors said.
The rampage — which came after decades in which US schools geared much of their emergency planning toward mass shootings, not stabbings — set off a screaming stampede, left blood on the floor and walls, and brought teachers rushing to help the victims.
Police shed little light on the motive.
The suspect, Alex Hribal, was taken into custody and treated for a minor hand wound, then was brought into court in shackles and a hospital gown and charged with four counts of attempted homicide and 21 counts of aggravated assault. Authorities said he would be prosecuted as an adult.
The attack unfolded in the morning just minutes before the start of classes at 1,200-student Franklin Regional High School, 15 miles east of Pittsburgh. It was over in about five minutes, during which the boy ran wildly down about 200 feet of hallway, slashing away with knives about 8 to 10 inches long, police said.
Nate Moore, 15, said he saw the boy tackle and stab a freshman. He said he was going to try to break it up when the boy got up and slashed his face, opening a wound that required 11 stitches.
‘‘It was really fast. It felt like he hit me with a wet rag because I felt the blood splash on my face,’’ he said.
The attacker ‘‘had the same expression on his face that he has every day, which was the freakiest part,’’ Moore said. ‘‘He wasn’t saying anything. He didn’t have any anger on his face. It was just a blank expression.’’
Assistant Principal Sam King tackled the boy and disarmed him, and a Murrysville police officer who is regularly assigned to the school handcuffed him, police said.
Doctors said they expect all the victims to survive.
King’s son said his father was treated at a hospital, though authorities have said he did not suffer any knife wounds.
‘‘There are a number of heroes in this day. Many of them are students,’’ Governor Tom Corbett said in a visit to the town. ‘‘Students who stayed with their friends and didn’t leave their friends.’’
He also commended cafeteria workers, teachers, and teacher’s aides who put themselves at risk to help.
As for what set off the attack, Murrysville Police Chief Thomas Seefeld said investigators were looking into reports of a threatening phone call between the suspect and another student the night before. Seefeld didn’t specify whether the suspect received or made the call.
The FBI joined the investigation and went to the boy’s house, where authorities said they planned to confiscate and search his computer.
While several bloody stabbing rampages at schools in China have made headlines in the past few years, schools in the United States have concentrated their emergency preparations on shooting rampages.
Nevertheless, there have been at least two major stabbing attacks at US schools over the past year, one at a community college in Texas last April that wounded at least 14 people, and another, also in Texas, that killed a 17-year-old student and injured three others at a high school in September.
On Wednesday, Mia Meixner, 16, said the rampage touched off a ‘‘stampede of kids’’ yelling, ‘‘Run! Get out of here! Someone has a knife!’’
Meixner and Moore called the attacker a shy boy who largely kept to himself, but they said they had no reason to think he might be violent.
‘‘He was never mean to anyone, and I never saw people be mean to him,’’ Meixner said. ‘‘I never saw him with a particular group of friends.’’
Someone, possibly a student, pulled a fire alarm during the attack, Seefeld said. Although that created chaos, the police chief said, it emptied out the school more quickly, and ‘‘that was a good thing that that was done.’’
Also, a girl with ‘‘an amazing amount of composure’’ applied pressure to a schoolmate’s wounds and probably kept the victim from bleeding to death, said Dr. Mark Rubino at Forbes Regional Medical Center.