Now playing
02:22
Ash Carter: Graves were ready for hostages in Iraq
Fred Pleitgen/CNN
Now playing
03:21
US planes spy on ISIS from edge of space
inside mosuls liberated neighborhoods black pkg_00000000.jpg
inside mosuls liberated neighborhoods black pkg_00000000.jpg
Now playing
02:51
Inside liberated Mosul neighborhoods
Members of the Iraqi forces watch Donald Trump giving a speech after he won the US president elections in the village of Arbid on the southern outskirts of Mosul on November 9, 2016, as they rest in a house during the ongoing military operation to retake Mosul from the Islamic State (IS) group.
AHMAD AL-RUBAYE/AFP/AFP/Getty Images
Members of the Iraqi forces watch Donald Trump giving a speech after he won the US president elections in the village of Arbid on the southern outskirts of Mosul on November 9, 2016, as they rest in a house during the ongoing military operation to retake Mosul from the Islamic State (IS) group.
Now playing
02:15
How will Trump handle Iraq?
kurdistan 24
Now playing
02:16
ISIS ambush in Kirkuk
google maps
Now playing
02:17
US service member killed in action in northern Iraq
isis drone use mosul nick paton walsh dnt_00001722.jpg
isis drone use mosul nick paton walsh dnt_00001722.jpg
Now playing
02:43
ISIS using drones in battle for Mosul
iraq forces mosul michael holmes lkv_00015709.jpg
iraq forces mosul michael holmes lkv_00015709.jpg
Now playing
03:27
Iraqi-led forces push into ISIS territory
mosul most intense day fighting damon dnt _00004210.jpg
mosul most intense day fighting damon dnt _00004210.jpg
Now playing
02:44
Mosul: Most intense day of fighting
 Iraqi Troops Mosul damon lkl_00003730.jpg
Iraqi Troops Mosul damon lkl_00003730.jpg
Now playing
01:53
Iraqi troops enter Christian town on outskirts of Mosul
Iraqi refugees debunk ISIS' portrayal of Mosul
CNN
Iraqi refugees debunk ISIS' portrayal of Mosul
Now playing
02:12
Iraqi refugees debunk ISIS' portrayal of Mosul
Iraq Mosul ISIS tunnels Damon lkl _00020013.jpg
Iraq Mosul ISIS tunnels Damon lkl _00020013.jpg
Now playing
02:24
Exploring ISIS tunnels near Mosul
battle for mosul paton walsh pkg_00023629.jpg
battle for mosul paton walsh pkg_00023629.jpg
Now playing
01:16
Dramatic moments from the battle for Mosul

Story highlights

U.S. didn't have "crystal clear idea" who hostages were, Pentagon spokesman says

Hostages "faced imminent mass execution," according to Pentagon

70 hostages were liberated in the operation, officials say

Can we crush ISIS in the chaos we left behind in Iraq? A CNN special report, “Long Road to Hell: America in Iraq,” airs Monday at 9 p.m. ET.

(CNN) —  

The Pentagon identified the U.S. Army soldier who died as part of a rescue mission in Northern Iraq earlier this week as Master Sgt. Joshua L. Wheeler, of Roland, Oklahoma.

About 70 hostages facing “imminent mass execution” were rescued in the operation at an ISIS-controlled prison that killed Wheeler, 39, according to a Pentagon statement.

Wheeler, who was was part of the Army’s Delta Force and assigned to Headquarters of the U.S. Army Special Operations Command at Fort Bragg, North Carolina, is the first American to die in combat in Iraq since November 2011.

Master Sgt. Joshua L. Wheeler
DA photo
Master Sgt. Joshua L. Wheeler

The hostages he was helping to rescue included more than 20 members of the Iraqi Security Forces, local residents and several ISIS fighters accused of spying. They were liberated Thursday after a helicopter assault that involved U.S. special operations troops as well as Kurdish and Iraqi forces, U.S. officials said.

“There was not a lot of time,” one U.S. official told CNN on condition of anonymity. “The threat of execution was imminent.”

Mass graves dug inside the compound were spotted during surveillance, a U.S. official with direct knowledge of details of the raid told CNN. After the rescue, hostages said they had been told they would be executed after morning prayers.

The firefight represents the first time U.S. forces stepped into combat against ISIS in Iraq, one U.S. official said.

A U.S. Special Forces commander on the ground made the decision to directly engage ISIS fighters during the overnight mission, according to the official with knowledge of the raid.

Thirty troops from Delta Force on an “advise and assist role” participated in the raid when Kurdish “Cobra” commandos were overwhelmed after entering the walled compound on their own, the official said.

Wheeler who was killed was shot inside the compound near Hawija in northern Kirkuk province, badly injured and flown to Irbil, where he died, according to the official.

Four Peshmerga soldiers were wounded, officials said.

There were no Kurds among the hostages, the Kurdistan regional government said. The United States had said earlier about 70 Kurdish hostages were rescued.

Pentagon spokesman Peter Cook said authorities were still assessing who was rescued.

“We did not have a crystal clear idea of who exactly would be at this compound,” he said, adding the United States did not have “a full accounting of everyone present.”

The mission did not represent a change in U.S. tactics in Iraq, Cook said.

“This was a unique circumstance in which very close partners of the United States made a specific request for our assistance,” he said.

White House spokesman Eric Schultz said the Pentagon, not the White House, signed off on the operation under the U.S. military mission against ISIS.

“The Secretary assessed the situation on the ground, saw that U.S. forces could make a difference here, could perhaps make this operation more successful, and at the end of the day there are 70 people whose lives were saved as a result of this,” Cook said.

More than 20 ISIS fighters were killed and six were captured, according to the statement from the Kurdistan regional government.

In a statement, Gen. Lloyd J. Austin III, commander of the U.S. Central Command, described the mission 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. “Our gratitude and heartfelt condolences go out to this young man’s family, his teammates and friends.”

Further details about the situation, including the identities of the hostages and hostage-takers, weren’t immediately available.

The operation came more than a month after Kurdish security forces said the Islamist militant group ISIS kidnapped dozens of men near Hawija. It wasn’t immediately clear whether the overnight rescue was related to this early September kidnapping.

The Kurds are an ethnic group with an autonomous region in northern Iraq. The Kurdish Peshmerga, the military force that protects this region, has been fighting ISIS, which captured parts of Iraq and Syria in an attempt to create what it calls its Islamic caliphate.

CNN’s Jason Hanna, Ross Levitt, Ray Sanchez and journalist Zilemo Azizi contributed to this report.