The FBI said it was investigating the attack early on Wednesday as a terrorist act.