PHILADELPHIA Three young people robbed a Mastbaum High School student at gunpoint in the school Friday afternoon, authorities said.

The North Philadelphia school was locked down for more than an hour.

Chief Inspector Carl Holmes of the Philadelphia Police Department said three people held up the student, taking a cellphone and a PlayStation Portable device, around 3 p.m., just as school was letting out for the day.

The student recognized two of the alleged robbers as fellow students, Holmes said.

Police are still trying to identify the third assailant, who was wearing a mask and carrying a gun or BB gun, Holmes said.

It's not clear whether he was a student, Holmes said.

On video obtained by school police, the three appeared to be "acting in concert," Holmes said. After the robbery, they fled in different directions.

"I don't think this was well thought out," he said, adding that arrests of the two suspects known to police were expected.

It's unclear how the third managed to get inside. Police believe the others - both juveniles - were inside the school when he arrived.

School police officers are routinely stationed at the front doors of the school, and students passing through those doors are subject to a weapons screening, Holmes said.

But in the chaos of a Friday-afternoon dismissal, the man may have been able to slip in through a side door as students exited, he said.

"This person did not go through a screening area," Holmes said. "It obviously appears to be people who knew the school."

He said changes in dismissal protocols may be in order.

Holmes called the incident "a targeted attack on a student" and encouraged other students to leave electronics at home.

He said school police occasionally confiscate weapons from students, but incidents involving firearms are rare.

"It's traumatic for anyone to be victimized, especially in a place that's supposed to be safe," he said.