The Israeli police described the shooting as a terrorist attack and said that the perpetrators had been killed at the scene.