The Department of Homeland Security describes the shooting spree in Harrisburg, Pennsylvania, which took place on Friday, as “a terror attack.” The gunman opened fire and targeted police in several locations in the city.

“Department of Homeland Security can confirm the suspect involved in a terror attack in Harrisburg Pennsylvania” was a beneficiary of “extended family chain migration,” Tyler Q. Houlton, the acting press secretary for the Department of Homeland Security, said in a tweet.

BREAKING: My statement on Immigration Backgrounds of Recent Terror-Related Suspects: pic.twitter.com/I3JfZOfuBh — Tyler Q. Houlton (@SpoxDHS) December 24, 2017

Ahmed Amin El-Mofty fired several shots at a Capitol police officer in downtown Harrisburg on Friday afternoon; one shot “went very close to hitting [the officer],” police earlier reported. Half an hour later, the attacker fired shots at a Pennsylvania State Police trooper. One of the shots hit the trooper. She is expected to make a full recovery.

El-Mofty then opened fire on local officers with two handguns. The officers, none of whom were injured, fired back, killing the attacker.

El-Mofty was “a naturalized US citizen who was admitted to the US from Egypt on a family-based immigrant visa,” Houlton wrote, adding that “the long chain of migration that led to the suspect’s admission into the US was initiated years ago by a distant relative of the suspect.”

Earlier, Dauphin County District Attorney Ed Marsico said there was no doubt that El-Mofty “was directly targeting police officers.”

“This could have been a really tragic incidence with this individual firing many shots at police cars in downtown Harrisburg in the midst of rush hour traffic on a Friday afternoon and then coming up here in a residential neighborhood and firing again many shots,” Marsico said.

Ahmed Soweilam, a relative of El-Mofty, told PennLive.com that the attacker worked as a security guard and had no history of violence or mental illness. He moved back to Egypt but returned a few months ago. “He’s not the perfect guy, but he’s not an aggressive person,” Soweilam said.