Dramatic footage has been released appearing to show hostages being freed from an Islamic State compound - in a raid where a US commando was killed.
Master Sergeant Joshua Wheeler was the first American soldier to die in ground combat operations against IS militants.
In the helmet-cam footage released by the Kurdistan Region Security Council, dozens of hostages can be seen being rescued by Kurdish Peshmerga and US forces from the prison.
Some hostages had blood on their clothing, and were walking and running in single file as soldiers beckoned them through rooms in the raid in northern Iraq.
Sixty-nine detainees were rescued in Thursday's operation and gunfire could be heard as they escaped.
They included about 20 members of the Iraqi security forces as well as local residents and IS fighters that the militant group had accused of spying or treason, said US and Kurdish officials.
It was the first time US troops were involved in direct ground combat in Iraq since the offensive against IS was launched in August 2014.
US Defence Secretary Ash Carter said he had ordered the rescue after intelligence showed executions were imminent, including evidence that a grave had been dug for the bodies.
Master Sgt Wheeler, 39, was a hero who ran into the fight to defend their Kurdish allies, according to the Pentagon.
He was fatally hit by small-arms fire as he rushed into the battle, even though the Kurds were supposed to fight on their own, said Mr Carter.
He said there was no plan for American troops to enter the prison compound, but Master Sgt Wheeler's intervention had helped the mission succeed.
A number of IS militants were killed in the early morning special forces raid near Hawija, according to the Pentagon.
None of the freed captives were Peshmerga, suggesting Kurdish prisoners may have been moved by militants to another location, it was reported.
Master Sgt Wheeler, from Roland, Oklahoma, joined the army in 1995 as an infantryman and was based at Fort Bragg, North Carolina.
He had deployed more than a dozen times to Iraq and Afghanistan over his career. His body has now been returned to Oklahoma.