The FBI is investigating the ambush shooting of a Philadelphia police officer last week as an act of terrorism, Director James Comey said Wednesday.

Comey was attending an event in Pittsburgh when he was asked to comment on the Philadelphia mayor’s indication the shooting may have just been a crime of violence. 

Comey indicated he couldn’t comment on what the mayor said, but that the agency was investigating the incident as an act of terrorism. 

He added that ISIS has been "crowd-sourcing terrorism," using social media to encourage violence and its message "tends to resonate with troubled souls."

On Sunday, police in Philadelphia said they were investigating a tip that a man charged in the ambush shooting of Officer Jesse Hartnett is connected to a radical group that may continue to pose a threat to officers.

The police department said in a statement that someone approached an officer on the street last weekend and alleged that the man who attacked Hartnett "had an affiliation to a group with radical beliefs."

Police say they are working with the FBI to investigate the credibility of the information. They have alerted all department employees about the tip and will continue to require officers to work with a partner until further notice.

Harnett was last reported in stable condition at the hospital after a man charged his car on Jan. 7 as he patrolled his usual west Philadelphia beat shortly before midnight, firing at least 13 shots, hitting him three times. Hartnett got out of his car, chased the man and returned fire, wounding him in the buttocks before he was captured by other officers about a block away.

Edward Archer, 30, of Yeadon, was charged Saturday with attempted murder, aggravated assault, assault of a law enforcement officer and several firearms crimes. He is being held without bail pending a Jan. 25 preliminary hearing. 

Investigators said Archer told them he was "following Allah" and pledged allegiance to the Islamic State group, and he believed the police department defends laws that are contrary to Islam. Authorities believe Archer traveled to Saudi Arabia in 2011 and to Egypt in 2012 and are investigating the purpose of those trips. 

FBI special agent Eric Ruona said Sunday that as U.S. authorities work with partners overseas, it would take time to find any potential terror connections, and it was too early for any meaningful comment on the subject.

Fox News’ Matt Dean and The Associated Press contributed to this report.