A 17-year-old boy was in critical but stable condition Friday night after he allegedly reached for a gun in his waistband during a pat down in North Philadelphia and was shot three times by a Philadelphia police officer.

Just before the shooting, officers were surveying the area of 28th and Newkirk Streets just after 9 p.m. in response to an armed robbery that occurred earlier, when they spotted the teen, said Staff Inspector Sekou Kinebrew.

The officers, a man and a woman, conducted a pedestrian investigation and were patting down the teen when one of them felt an object in his waistband, Kinebrew said. The teen then allegedly reached for a revolver in his waistband and the 35-year-old male officer fired three times, wounding the teen once in the lower back and twice in the legs.

Police transported the teen to Temple University Hospital.

Police Commissioner Danielle Outlaw, still in her first week on the job in Philadelphia, showed up at the scene to monitor the investigation.

The gun was still on the ground at the scene as the investigation continued late into the night, Kinebrew said.

The earlier robbery occurred at 22nd and Somerset Streets at 8:42 p.m. The female victim was not injured.