PHILADELPHIA (AP) _ A high school assistant principal was shot in the thigh Monday while confronting a 17-year-old student suspected of carrying a gun.

William Burke, 61, was hospitalized but was not badly hurt in the shooting at John Bartram High School in southwest Philadelphia, a racially mixed, blue-collar part of town.

Metal detectors had been delivered recently to the 3,100-student school but were not yet in operation.

Police said that a teacher suspected the student had a gun and called Burke. Burke told the boy to leave class and go into the hallway, where the two began struggling, police said. A gun in the boy's pocket went off, Police Commissioner John Timoney said.

The student fled and was caught by police a block away. The student, whose name was not released because he is a minor, was charged with simple and aggravated assault, possession of an instrument of cime and related offenses.

Sixteen city schools are scheduled to begin using detectors in the next few weeks.