Islamic State fighters killed a US serviceman in northern Iraq on Tuesday when they overran Kurdish defenses in the biggest attack in the area in recent months, officials said.
The dead man was the third American to be killed in direct combat since a US-led coalition launched a campaign against the jihadist group in 2014.
"It is a combat death, of course, and a very sad loss," US Defense Secretary Ash Carter told reporters during a trip to Germany.
A US defense official said the dead man was a Navy SEAL who was serving as an advisor to the Peshmerga. The SEALs are considered to be among the most able US special operations forces.
The serviceman was later identified as 31-year old Charlie Keating IV, from Arizona. Governor Doug Ducey announced that flags in the state would be flown at half staff on Wednesday in his honor. Keating was the grandson of the financier of the same name who became notorious in the 1980s and then served prison time for his role in the so-called "savings and loan" scandal.
A senior official of the Iraqi Kurdish peshmerga force said the man was killed near Tel Asqof, a town 28 km (17 miles) north of Mosul, which the militants occupied at dawn on Tuesday. Early information suggested he had been killed by a sniper, Jabbar Yawar said.
The leader of a Christian militia deployed alongside peshmerga in the Tel Asqof area said the town had been attacked by multiple suicide bombers, some driving vehicles laden with explosives.
A US military official said the US-led coalition helped the peshmerga repel the attack with air support from F-15 jets and drones.
The official, speaking on condition of anonymity, said the man was killed "by direct fire" from Islamic State.
Carter's spokesman, Peter Cook, said the incident took place during an Islamic State attack on a peshmerga position some 2-3 miles behind the forward line.
Peshmerga were surrounding Tel Asqof and coalition aircraft were targeting militants in the area, according to Safa Eliyas, head of the Nineveh Protection Forces (NPF) militia.
"Until now there are suicide bombers trapped inside (the town)," he said.
Another NPF member on the front line said they were awaiting an armored division to storm the town, where Islamic State snipers had also taken up positions.
The peshmerga also deflected Islamic State attacks on the Bashiqa front and in the Khazer area, about 40 km west of the Kurdish regional capital Erbil, Kurdish military sources said.
In mid-April the United States announced plans to send an additional 200 troops to Iraq, and put them closer to the front lines of battle to advise Iraqi forces in the war against Islamic State.
Last month, an Islamic State attack on a US base killed Marine Staff Sergeant Louis Cardin and wounded eight other Americans providing force protection fire to Iraqi army troops.
The Islamist militants have been broadly retreating since December, when the Iraqi army recaptured Ramadi, the largest city in the western region. Last month, the Iraqi army took the nearby region of Hit, pushing them further north along the Euphrates valley.
But US officials acknowledge that military gains against Islamic state are not enough.
Iraq is beset by political infighting, corruption, a growing fiscal crisis and the Shiite Muslim-led government's fitful efforts to reconcile with aggrieved minority Sunnis, the bedrock of Islamic State support.