Sixty-nine hostages were rescued in the action, which targeted an Islamic State prison around 7 kilometers north of the town of Hawija, according to the security council of the Kurdistan region, whose counterterrorism forces took part.
Pentagon press secretary Peter Cook said at a news briefing the operation did not mark a change in U.S. tactics in the war on Islamic State militants, who pose the biggest security threat to Iraq since the fall of Saddam Hussein in 2003.
"I would not suggest that this is something that is now going to happen on a regular basis, but I do think it is symbolic of the kinds of efforts that we are taking on behalf of our partners," he told reporters.
It was the most significant raid against Islamic State since May, when American special operations forces killed one of its senior leaders, Abu Sayyaf from Tunisia, in a raid in Syria.
The U.S. rescue mission unfolded amid mounting concerns in Washington over increasing Russian intervention in the Middle East.
The hostages rescued in the raid were all Arabs, including local residents and Islamic State fighters held as suspected spies, a U.S. official said on Thursday.
The official told Reuters that around 20 of the hostages were members of Iraqi security forces.
"Some of the remainder were Daesh (Islamic State) ... fighters that Daesh thought were spies," the official said. "The rest of them were citizens of the local town".
More than 20 Islamic State militants were killed and six detained, the security council said.
Islamic State called the operation "unsuccessful" but acknowledged casualties among its fighters.
In a statement distributed online on Thursday by supporters, it said U.S. gunships had shelled areas around the prison to prevent the arrival of reinforcements, then clashed with militants for two hours.
The statement confirmed U.S. claims that some guards had been killed and others detained in the operation.
"Dozens" of U.S. troops were involved in the mission, a U.S. defense official said, declining to be more specific about the number.
"It was a deliberately planned operation, but it was also done with the knowledge that imminent action was needed to save the lives of these people," the U.S. defense official said.
The U.S. serviceman was shot during the mission and taken to the Kurdistan regional capital Erbil, where he died, the U.S. defense official said. He was the first American serviceman killed in ground combat in Iraq since the United States withdrew its forces in 2011.
U.S. Army Colonel Steve Warren, spokesman for U.S.-led coalition in Iraq, said the possibility that Americans were among the hostages was not a consideration in carrying out the operation.
Some of the rescued people said Islamic State militants had told them they would be executed after morning prayers, Warren said.
The U.S. forces were acting as advisors then were sucked into the battle when Kurdish fighters came under heavy fire, he explained.
"They were pinned down and they were beginning to take casualties, so the Americans in the heat of battle made a decision," he said.
Cook said he was not aware at this point that there were any Americans among those who were rescued. "My understanding is there was no indication there were specifically Americans present here.
"The understanding was that there were a number of hostages, although we were not sure exactly who was among that group, but that they had been held there for some time and again the information we had received ... was that those hostages did fear for their lives, that there was the threat of a mass execution perhaps within hours."
He said the mission had been requested by the Kurdistan Regional Government.
Sources in the Hawija area said they heard blasts and gunfire overnight and that Islamic State militants had withdrawn from view after the raid, apparently relocating their bases.
Five U.S. helicopters launched from Erbil were involved in the mission, and the United States was providing helicopter lift, intelligence support, air strike support, and advisory support to the peshmerga, the U.S. defense official said.
Air strikes were launched before and after the mission to block approaches to the prison and destroy it afterward, the U.S. defense official said.
Hawija is a stronghold of Islamic State militants who have captured several dozen Kurdish peshmerga fighters in battle.
Islamic State, also known as ISIS, has been for more than a year the target of daily air strikes in Iraq and Syria by a U.S.-led coalition.
The United States' former Cold War foe Russia has been conducting airstrikes in Syria against opponents of its closest regional ally Bashar al-Assad, as Iraq questions American resolve to fight militants on its soil.
Russia has also joined a Baghdad-based intelligence cell along with Iran, Iraq and Syria that has provided information on Islamic State targets.
Iraqi Prime Minister Haider al-Abadi faces intense pressure from the ruling coalition and powerful Shi'ite militias to request Russian air strikes on Islamic State, which controls a third of the major OPEC oil producer.