Police: A man who allegedly shot a Philadelphia police officer pledged allegiance to ISIS

A man who allegedly shot a police officer in Philadelphia carried out the attack in the name of Islam and pledged allegiance to ISIS, police said Friday.

The suspect used a police firearm that had been reported stolen in 2013, Philadelphia police said. The police officer the gunman shot, identified as Jessie Hartnett, survived.

The gunman, who has not been named, ambushed Hartnett as he sat in his marked cruiser at an intersection, striking him three times in the arm during a barrage of bullets and fleeing before being apprehended, officials said Friday.

The gunman was specifically targeting police officers, Philadelphia police said.

Police Commissioner Richard Ross said the suspect fired at least 13 shots late Thursday as he walked toward Hartnett and eventually got up next to the car and reached through the driver’s-side window.

The officer returned fire, hitting his attacker at least three times. Hartnett was in stable condition.

“I don’t know how this officer survived,” Ross said.

“This is absolutely one of the scariest things I’ve ever seen,” the commissioner said. “This guy tried to execute the police officer. The police officer had no idea he was coming.”

The gunman “just came out of nowhere and started firing,” Ross continued. “I don’t even know when Hartnett first noticed it. You could see it across the street, he had already started firing.”

The officer’s father, Robert Hartnett, said his son was in good spirits.

“He’s a tough guy,” he said.

Hartnett, 33, had served eight years in the Coast Guard and joined the police five years ago. He always wanted to be a police officer, his father said.

“I’m bleeding heavily!” Hartnett shouted into his police radio when he called in to report shots fired.

The suspect ran away but was quickly apprehended by other officers, authorities said.

Jim Kenney, in his first week as mayor of the nation’s fifth-largest city, said, “There are just too many guns on the streets, and I think our national government needs to do something about that.”

His statement comes on the heels of President Barack Obama’s announcement Tuesday of his plan to tighten gun control laws.

NOW WATCH: ‘Affluenza’ teen and his mother detained in Mexican resort town