The Pentagon's spokesman says the attack in which IS fighters penetrated Kurdish Peshmerga lines and killed U.S. Petty Officer 1st Class Charles Keating was a surprise.

Press secretary Peter Cook told reporters Thursday that if the U.S. had been able to anticipate the attack in northern Iraq, then U.S. forces would have responded differently.

Cook says that if U.S. forces there had been able to see the attack coming, "perhaps this could have been avoided." He says the event is being carefully reviewed by the U.S. military.

Keating is the third U.S. service member to be killed in combat in Iraq since U.S. forces returned there in 2014.