(Reuters) - Twenty students were injured after a stabbing attack, apparently by a male student, at a Pennsylvania high school on Wednesday, and four of the victims were flown to area hospitals, officials said.

The suspected attacker, a student at the school, was in custody, local media reported, citing police.

The incident occurred at Franklin Regional High School in Murrysville, about 20 miles east of Pittsburgh, county emergency management officials told reporters.

It wasn't clear how many students were stabbed and how many injured while scrambling to get away from the attacker.

"The students' conditions seem to be non-life threatening. It's important that parents realize the scene is contained, the students that are here are safe," Dan Stevens, deputy emergency management coordinator for the Westmoreland County told reporters.

The school district posted an emergency message on its website on Wednesday.

"A critical incident has occurred at the high school," the message said. "All elementary schools are canceled, the middle school and high school students are secure."

(Reporting by Jonathan Allen; Editing by Scott Malone and Bernadette Baum)