Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

May 3, 2016, 10:18 AM UTC / Updated May 3, 2016, 3:02 PM UTC

A U.S. Navy SEAL was killed in an ISIS attack in northern Iraq, officials said Tuesday.

Pentagon Press Secretary Peter Cook said the U.S. serviceman was advising and assisting Kurdish Peshmerga forces north of Mosul when ISIS fighters attacked.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"This sad news is a reminder of the dangers our men and women in uniform face every day in the ongoing fight to destroy ISIL," Cook said in a statement, using another acronym for ISIS. "Our coalition will honor this sacrifice by dealing ISIL a lasting defeat.

The slain serviceman was a Navy SEAL, a defense official confirmed to NBC News.

U.S. military officials told NBC News earlier that the American was killed by direct fire about 2 to 3 miles behind the Peshmerga's forward line after ISIS fighters breached the position and conducted a large-scale attack with truck bombs and small arms.

The U.S. responded with more than 20 airstrikes, military officials added.

Defense Secretary Ash Carter told reporters in Germany that the incident near Irbil "shows that it's a serious fight that we have to wage in Iraq."

Tuesday's was the third U.S. combat death in Iraq in the past seven months.

Marine Staff Sgt. Louis Cardin was killed in a March rocket attack south of Mosul and Master Sgt. Joshua Wheeler, a Delta Force commando, died in October during a daring raid to rescue ISIS hostages.

Last month, Carter announced the U.S. would be sending 217 more troops — including special operations forces — to Iraq.

"The Iraqis are still in the lead. That doesn't change," Carter told Nightly News anchor Lester Holt. "Americans are at risk today every single day here. As secretary of defense, I take that more seriously than anything else."