WASHINGTON – Believing that Islamic State captives held on a compound in northern Iraq faced “imminent mass execution,” dozens of U.S. special operations troops and Iraqi forces raided the site Thursday, freeing approximately 70 Iraqi prisoners in an operation that saw the first American killed in combat in the country since the U.S. war against IS began in 2014, officials said.

The raiders killed and captured a number of militants and recovered what the Pentagon called a trove of valuable intelligence about the terrorist organization.

READ MORE: Islamic State group attacks worldwide spiked in third quarter

The U.S. service member who died was not publicly identified pending notification of relatives. Officials said this was the first American combat death in Iraq since the U.S. began its counter-IS military campaign in August 2014.

In a written statement, Pentagon press secretary Peter Cook said the operation was undertaken near the town of Hawija at the request of the Kurdish Regional Government, the semi-autonomous body that governs the Kurdish region of northern Iraq. He said U.S. special operations forces supported what he called an Iraqi peshmerga rescue operation.

The peshmerga are the Kurdish region’s organized militia.

“This operation was deliberately planned and launched after receiving information that the hostages faced imminent mass execution,” Cook said. He did not say who in the U.S. chain of command authorized the mission but called it “consistent with our counter-ISIL effort to train, advise and assist Iraqi forces.”

U.S. combat troops have rarely, if ever, participated directly in combat against IS fighters on the ground since the U.S. mission began in 2014. The U.S. has mostly limited its role to training and advising Iraqi and Kurdish forces and providing daily airstrikes in IS-held areas of Iraq.

In a separate statement, the Kurdish government said the operation lasted about two hours and was led by its counterterrorism forces, with support from coalition troops. It made no mention of intelligence indicating the captives were in imminent danger of mass execution, as asserted by the Pentagon.

The Kurdish statement said more than 20 IS fighters were killed in the operation about four miles north of Hawija. It said 69 hostages were freed, none of whom were Kurds, and it thanked the Americans for their bravery.

The circumstances in which one U.S. military member was killed were unclear, but one U.S. official said the American had been shot in a firefight at the scene. Cook said the service member was wounded during the mission and died after receiving medical care. Cook said four Peshmerga soldiers were wounded.

Another U.S. defence official, who spoke on condition of anonymity to provide other initial details, said the U.S. role in the rescue mission was mainly limited to four areas: transporting Iraqi soldiers to the scene in five U.S. special operations helicopters; providing airstrikes before and after the mission; advising Kurdish fighters and Iraqi security forces; and providing the Iraqis with intelligence for the operation.

The U.S. defence official said the number of IS members killed was not to be made public immediately but that it was more than 10.

Cook said that of the approximately 70 prisoners freed, more than 20 were members of the Iraqi security forces. He did not say who the others were.

Cook said five IS members were detained and “a number” were killed.

“In addition, the U.S. recovered important intelligence” about IS, Cook said without elaborating.

The relative of one of the Kurdish hostages said he had been informed of their rescue in a U.S.-led raid.

Irfan Sadradeen, the uncle of Kurdish peshmerga fighter Meriwan Mawlud, said he was contacted by a peshmerga official who informed him about the raid on the Islamic State group near Hawija. Irfan said he was told that paratroopers landed at a poultry farm, close to the home of the main sharia judge of Hawija, where they launched their rescue.

“We are waiting for more information. A peshmerga official called us today confirming the news of the raid,” he said, adding that he was told 15 IS fighters were killed in the raid. “None of them arrived to this area yet but we are waiting for them,” he said.

Tariq Rafiq, the father of a peshmerga soldier, said he was told by Kurdish authorities that the rescue mission happened at 2 a.m. local time and that the prisoners were being held in a judge’s house in Hawija.

“We are now together with other family members waiting for more information,” Rafiq said.