A man claiming allegiance to Islamic State militants was charged on Saturday with attempted murder in the shooting of a Philadelphia police officer this week, the prosecutor said.
Edward Archer, of Philadelphia, is accused of ambushing an officer in his squad car shortly before midnight on Thursday.
He is also charged with several other crimes and is being held without bond, the Philadelphia District Attorney's Office said on its Twitter account.
Police released still images from surveillance video that showed the gunman dressed in a long white robe walking toward the car and firing, eventually getting close enough to shoot at point-blank range through the window.
The city's police commissioner said on Friday that Archer told authorities that he ambushed the patrol car "in the name of Islam."
U.S. officials have been on high security alert following a series of Islamic State-linked attacks at home and abroad over the last few months.
(Reporting by Brendan O'Brien; Editing by Frank McGurty and James Dalgleish)