A gunman claiming to have pledged allegiance to Islamic State militants shot and seriously wounded a Philadelphia police officer while he sat in his patrol car in an ambush-style attack, the city's police commissioner said on Friday.Gunman Edward Archer of Philadelphia, 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."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.Philadelphia Police Captain James Clark added, "He said he pledges his allegiance to Islamic State, he follows Allah and that was the reason he was called on to do this."US officials have been on high security alert following a series of Islamic State-linked attacks at home and abroad over the last few months.In November, gunman and suicide bombers affiliated with Islamic State killed 130 people in a series of coordinated attacks in Paris. Last month a married couple fatally shot 14 people in San Bernardino, California, in an attack inspired by Islamic State militants.There was no evidence as yet that the shooter had worked with anyone else, Ross said.