The Islamic State group broke through Kurdish defences in northern Iraq on Tuesday and killed an American service member of the US-led coalition fighting the jihadists, officials said.
The service member, whom the Pentagon confirmed was American, was at least the third killed by enemy fire in Iraq since IS overran swathes of the country in 2014.
President Barack Obama hailed the 2011 withdrawal of American troops from Iraq as a major accomplishment of his presidency, but US forces have been drawn back into combat in the country against IS.
"On May 3, 2016, a coalition service member was killed in northern Iraq as a result of enemy fire," the coalition said in a statement.
Pentagon spokesman Peter Cook said the death occurred during an IS attack on a peshmerga position north of Iraq's jihadist-held second city Mosul.
US Defence Secretary Ashton Carter said from Germany: "Our thoughts and prayers are with that service member's family."
A coalition military official said on condition of anonymity that the service member was killed at 9:30 am (0630 GMT) by "direct fire" after "enemy forces penetrated" the Kurdish peshmerga forces' line.
Kurdish forces are deployed in Nineveh province, which is centred on Mosul, IS's main hub in the country.
IS attacked the peshmerga in multiple areas of northern Iraq on Tuesday in an attempt to "thwart the plan to liberate Mosul," said Jabbar Yawar, the secretary general of the autonomous Kurdish region's peshmerga ministry.
Iraq's Joint Operations Command said IS overran the Tal Asquf area and that the group was employing suicide bombers in the ongoing fighting.
Tal Asquf is a small Christian town whose population fled when IS overran the region in the summer of 2014.
The United States announced last month that it was deploying additional forces to Iraq, bringing the official total to more than 4,000.
Pentagon spokesman Jeff Davis said the forces would be authorised to advise Iraqis at the battalion and brigade level as opposed to larger divisions, potentially exposing them to greater risks closer to the front lines.
The coalition military official said the service member who was killed on Tuesday was involved in advising and assisting forces, and was three to five kilometres (two to three miles) behind the front line.
The size of the unit he was with was not immediately clear.
While most American forces in Iraq play advisory and support roles, Washington has also sent in special forces to carry out raids against IS and deployed US Marines to provide artillery support.
Obama repeatedly pledged that there would be no "boots on the ground" to combat IS, but US forces are engaged in combat with the jihadists and two American military personnel have already been killed.
Rocket fire killed an American Marine in northern Iraq in March, while a special forces soldier died of wounds received during a raid last October.
The coalition is also targeting IS with air strikes in both Iraq and Syria.
It announced on Tuesday that it carried out 25 strikes against the jihadists using aircraft and rocket fire the previous day.