One member of a US special operations team has been killed during an operation to free 70 hostages held by Islamic State (IS) militants in northern Iraq, the Pentagon says.
Kurdish troops, backed by US special operations forces, stormed an IS prison early on Thursday in a high-stakes operation that left an American soldier dead, US officials said.
Pentagon press secretary Peter Cook said five IS militants were captured and others were killed in the raid on a compound near Hawijah, Iraq.
He said the service member died of wounds suffered during the rescue mission.
"This operation was deliberately planned and launched after receiving information that the hostages faced imminent mass execution," Mr Cook said in a statement.
"It was authorised consistent with our counter-ISIL effort to train, advise, and assist Iraqi forces," he added, using an alternate acronym for Islamic State.
Mr Cook said US helicopters and special operations forces accompanied Kurdish Peshmerga forces to the prison compound.
One of the Americans was wounded "acting in support of Iraqi Peshmerga forces after they came under fire from ISIL", and subsequently died after receiving medical attention, he said.
"Approximately 70 hostages were rescued including more than 20 members of the Iraqi security forces," Mr Cook said.
"Five ISIL terrorists were detained by the Iraqis and a number of ISIL terrorists were killed as well. In addition, the US recovered important intelligence about ISIL."
General Lloyd Austin, the commander of US forces in the Middle East, described the rescue operation as "complex and highly successful".
"We commend and congratulate the brave individuals who participated in this successful operation that saved many lives, and we deeply mourn the loss of one of our own who died while supporting his Iraqi comrades engaged in a tough fight," he said.
The death of the US service member marks the first American killed in ground combat with IS.