A man tried to execute a Philadelphia police officer late Thursday, firing a total of 13 shots at officer Jesse Hartnett. The attack has spawned a slew of questions, and amid the ongoing gun control debate in the U.S., people are wondering how the Philadelphia attacker got his gun. As it turns out, the Philadelphia attacker used a stolen 9mm police handgun previously taken from a home in a robbery, Inside Edition reported.

Fortunately, Hartnett was wearing his bulletproof vest and survived the attack. He fired back at the gunman, who was then apprehended by other officers. Hartnett is now in critical but stable condition at the Presbyterian Hospital, according to The Washington Post, with a broken left arm that sustained three gunshot wounds.

The suspect being held for questioning is Edward Archer, 30, of Yeadon, Philadelphia. Police Commissioner Richard Ross said in a press conference that Archer confessed to the crime and did it "in the name of Islam," but that Archer "stopped short of implicating anyone else in the attack," according to ABC6 News Philadelphia. Ross said that the suspect was being very evasive, and there is still a lot to be uncovered in the bizarre midnight shooting.

Officials said Archer pledged his allegiance to ISIS, although Philadelphia Mayor Jim Kenney was quick to distance the attack from "being a Muslim or the Islamic faith," according to ABC6. The mayor tweeted a reminder to Philadelphians to remember the difference between the two: "Last night’s shooting had nothing to do with any faith. It was a violent assault by a criminal. I urge all Philadelphians to stand together."

The Philly Inquirer spoke to Archer's mother, Valerie Holliday, who shed some light on the situation. She explained that Archer had suffered head injuries in the past, from his time laying football and as a result of a moped accident. "He's been acting kind of strange lately. He's been talking to himself . . . laughing and mumbling. He's been hearing voices in his head. We asked him to get medical help," Holliday told The Philly Inquirer.

She claimed that her son is a committed Muslim believer, and said Archer believed he'd been targeted by police lately — he was set to be sentenced in a Delaware County case on Monday for forging documents, driving carelessly, and several other offenses. "I don't know how he got the gun," she said. "I'm still hoping they have the wrong child."

Image: Mark Makela/Getty Images