Police Commissioner Richard Ross said the attacker claimed to have been inspired by the Islamic State terror group, also known as ISIS. Ross said the targeted officer was shot three times and that it was something of a miracle that he survived such a direct attack.

"I don't know how this officer survived," Ross said.

The alleged attacker was identified as Edward Archer.

The still images appear to show him approaching a police-car window as he fired his gun, and then hurrying away. They can be seen below:

PHILADELPHIA, PA - JANUARY 8: A headshot of Police Officer Jesse Hartnett, 33, who was ambushed and allegedly shot at 13 times by Edward Archer, 30, last night on January 8, 2016 in Philadelphia, Pennsylvania. Surveillance footage reveals the suspect was dressed in Muslim clothing and wearing a mask. Following his arrest, suspect Edward Archer stated, 'I follow Allah and pledge allegiance to the Islamic State and that is the reason I did what I did.' (Photo by Mark Makela/Getty Images)

PHILADELPHIA, PA - JANUARY 8: A photograph of a video survelliance image shows Edward Archer, 30, the suspect in a shooting ambush last night of 33-year-old Police Officer Jesse Hartnett, who was shot 13 times at close range on January 8, 2016 in Philadelphia, Pennsylvania. Surveillance footage reveals the suspect was dressed in Muslim clothing and wearing a mask. Following his arrest, suspect Edward Archer stated, 'I follow Allah and pledge allegiance to the Islamic State and that is the reason I did what I did.' (Photo by Mark Makela/Getty Images)

PHILADELPHIA, PA - JANUARY 8: A headshot of Edward Archer, 30, the suspect of a shooting ambush last night of 33-year-old Police Officer Jesse Hartnett, who was shot 13 times at close range on January 8, 2016 in Philadelphia, Pennsylvania. Surveillance footage reveals the suspect was dressed in Muslim clothing and wearing a mask. Following his arrest, suspect Edward Archer stated, 'I follow Allah and pledge allegiance to the Islamic State and that is the reason I did what I did.' (Photo by Mark Makela/Getty Images)

PHILADELPHIA, PA - JANUARY 8: Reese Scott, 25, sweeps the scene of a shooting ambush last night of 33-year-old Police Officer Jesse Hartnett, who was shot 13 times at close range on January 8, 2016 in Philadelphia, Pennsylvania. Surveillance footage reveals a suspect dressed in Muslim clothing and wearing a mask. The suspect was arrested. (Photo by Mark Makela/Getty Images)

PHILADELPHIA, PA - JANUARY 8: Blood stains are seen at the scene of a shooting ambush last night of 33-year-old Police Officer Jesse Hartnett, who was shot 13 times at close range on January 8, 2016 in Philadelphia, Pennsylvania. Surveillance footage reveals a suspect dressed in Muslim clothing and wearing a mask. The suspect was arrested. (Photo by Mark Makela/Getty Images)

PHILADELPHIA, PA - JANUARY 8: Pedestrians walk past police tape near the scene of a shooting ambush last night of 33-year-old Police Officer Jesse Hartnett, who was shot 13 times at close range on January 8, 2016 in Philadelphia, Pennsylvania. Surveillance footage reveals a suspect dressed in Muslim clothing and wearing a mask. The suspect was arrested. (Photo by Mark Makela/Getty Images)

PHILADELPHIA, PA - JANUARY 8: A police officer holds barrier tape several blocks away from the scene of a shooting ambush last night of 33-year-old Police Officer Jesse Hartnett, who was shot 13 times at close range on January 8, 2016 in Philadelphia, Pennsyvania. Surveillance footage reveals a suspect dressed in Muslim clothing and wearing a mask. The suspect was arrested. (Photo by Mark Makela/Getty Images)

PHILADELPHIA, PA - JANUARY 8: A man walks past police tape near the scene of a shooting ambush last night of 33-year-old Police Officer Jesse Hartnett, who was shot 13 times at close range on January 8, 2016 in Philadelphia, Pennsylvania. Surveillance footage reveals a suspect dressed in Muslim clothing and wearing a mask. The suspect was arrested. (Photo by Mark Makela/Getty Images)

PHILADELPHIA, PA - JANUARY 8: Police walk through the scene of a shooting ambush last night of 33-year-old Police Officer Jesse Hartnett, who was shot 13 times at close range on January 8, 2016 in Philadelphia, Pennsylvania. Surveillance footage reveals a suspect dressed in Muslim clothing and wearing a mask. The suspect was arrested. (Photo by Mark Makela/Getty Images)