Twenty-two people were injured when a 16-year-old boy went on a stabbing rampage at a Pennsylvania high school early Wednesday, leaving five students in critical condition, authorities said.

Sophomore Alex Hribal allegedly brandished two large knives in the bloody attack as he darted between several classrooms and down a hallway at Franklin Regional High School in Murrysville — a typically peaceful community about 18 miles east of Pittsburgh.

Twenty-one students and an adult security guard were wounded, officials said.

Witnesses said the boy, who was wearing a “blank expression” on his face, first tackled a freshman and stabbed him in the belly before getting up and running wildly down the hall, slashing other students.

One boy suffered a pierced liver after being thrust with one of the 8-to-10-inch knives, narrowly missing his heart and aorta, doctors said.

The teen was finally tackled by an assistant principal and a security guard, who were able to subdue him until police arrived.

Alex Hribal is accused of using two 8-to-10-inch knives in the stabbing.

Hribal was charged Wednesday night as an adult with four counts of attempted homicide and 21 counts of aggravated assault.

A motive wasn’t immediately known but police said they were investigating reports of a threatening phone call between the suspect and another student the night before.

“I’m going to f— you up,” freshman Hope Demont told the Pittsburgh Post Gazette Hribal was rumored to have told an upperclassman by phone the night before.

She said the call was allegedly made using a restricted number.

Mia Meixner, a sophomore at the school who witnessed the attack, told USA Today that the suspect was “really shy” and “always kept to himself.

“He didn’t talk to many people,” she said.