In this frame from a Thursday, Jan. 7, 2016 video provided by the Philadelphia Police Department, Edward Archer runs with a gun toward a police car driven by Officer Jesse Hartnett in Philadelphia. Archer, using a gun stolen from police, ... more >

President Obama’s spokesman said Monday that White House officials are “wondering” if a gunman’s attack on a Philadelphia police officer was an act of terrorism, and said the White House views the shooting as another reason for gun control.

Whether the shooting of Officer Jesse Hartnett was an act of terrorism “is something we’re all wondering right now,” said White House press secretary Josh Earnest, adding that White House officials have been in contact with Philadelphia authorities.

Alleged gunman Edward Archer, 30, told police he was motivated by the Islamic State to shoot the officer.

“Those reports lead us to worry that this could be an act of terrorism,” Mr. Earnest said. “The FBI has been supporting that investigation.”

Authorities are also looking into reports that Archer could be mentally unstable. Either way, Mr. Earnest said, the case demonstrates the need for stricter gun laws such as expanded background checks to “keep guns out of the hands of people like him.”

“It is relevant whether this individual was motivated by demons inside his own mind or demons on social media,” he said. “We are certainly closely monitoring this case.”