A Philadelphia police officer was shot and seriously wounded in an ambush-style attack while sitting in his patrol car and the shooter admitted to committing the assault “in the name of Islam,” the city’s police commissioner said on Friday.

The 30-year-old shooter, who has been arrested, fired about 11 shots through the window of the officer’s car, Philadelphia Police Commissioner Richard Ross told reporters. He walked toward the car as he fired, eventually getting close enough to reach in the window.

ADVERTISEMENT

“He has confessed to committing this cowardly act in the name of Islam,” Ross told a press conference, adding that the man also referenced Islamic State militants.

There was no evidence as yet that the shooter had worked with anyone else, Ross said.

“He was savvy enough to stop just short of implicating himself in a conspiracy,” Ross said. “He doesn’t appear to be a stupid individual, just an extremely violent one.”

Officer Jesse Hartnett, 33, who pursued the shooter, was taken to Penn Presbyterian Hospital and will require several surgeries.

“We’re just lucky, that’s all I can say,” Ross told reporters. “I can’t even believe that he was able to survive this.”

ADVERTISEMENT

The attack comes a month after a married couple fatally shot 14 people in San Bernardino, California, in an attack inspired by Islamic State militants.

The shooter used a gun that had been stolen from a Philadelphia police officer’s home several years ago, but not by the shooter, Ross said.

“We know it was stolen, how many hands it may have passed through in the last couple of years, we do not know,” Ross said.

ADVERTISEMENT

(Reporting by Daniel Kelly; Writing by Scott Malone; Editing by Bill Trott and Tom Brown)