By Isabel Coles and Stephen Kalin
ERBIL/BAGHDAD (Reuters) - U.S. special forces who raided a prison compound in northern Iraq were acting on intelligence that Kurdish fighters were being held there by Islamic State, a source in the Kurdistan Region Security Council said on Friday.
Kurdish counter-terrorism forces also took part in the raid which rescued 69 people early on Thursday. One U.S. commando was killed, the first American to die in ground combat with Islamic State militants. Four Kurds were wounded.
Such rescue attempts are rare. The joint operation highlighted the status of Kurdish peshmerga fighters as key allies of the U.S.-led coalition against the militants, also known as ISIL, who control large swathes of Iraq and neighboring Syria.
"The intention was to rescue peshmerga taken hostage by ISIL," said the source in the Security Council of Kurdistan, a semi-autonomous region of northern Iraq.
"We had solid intelligence that peshmerga were being held in that compound," the source told Reuters.
It turned out, however, that none of the captives were peshmerga, suggesting they may have been moved to another location, the source added.
The detainees were in fact Arabs and included around 20 members of the Iraqi security forces. The others were local residents and Islamic State fighters that the group had accused of spying, said a U.S. official.
The prisoners were about to be executed and dumped in four mass graves, the official said.
Islamic State militants attacked Kurdish positions on the frontline in Gwer, south of the region's capital, overnight on Friday, after the raid.
An Islamic State statement circulated online by the group's supporters said "dozens" of peshmerga had been killed in the attack carried out by a suicide bomber. But Qader Hassan, a peshmerga on the frontline, said only two people had been killed, and they belonged to an Iraqi army unit based there.
U.S. forces accompanied the peshmerga as advisers in the Thursday's mission but were drawn in to fighting as the Kurds began to incur casualties, said Colonel Steve Warren, spokesman for the U.S.-led coalition, which has been bombing Islamic State militants for more than a year.
Some 62 peshmerga have gone missing in battle with the militants and several have been beheaded in Islamic State propaganda videos.
Islamic State holds hostages in detention centers across the sprawling lands it controls. It also regularly executes people it accuses of spying for the Iraqi state or foreign powers.
Iraqi government forces, Shi'ite militias and the Kurds are all fighting Islamic State but coordination can be difficult in a country deeply divided along sectarian and ethnic lines.
Iraq's Defence Ministry said earlier on Friday it was not informed about the raid, which took place just north of the Islamic State-controlled town of Hawija
"We just heard this from the media, we didn't know about it," ministry spokesman General Tahsin Ibrahim Sadiq told Reuters. "It was just the peshmerga and the Americans, and the Ministry of Defence didn't have any idea about that."
The mission was the most significant raid against Islamic State in months, and Warren said it had been requested by the Kurdistan Regional Government.
The Pentagon said it did not mark a change in U.S. tactics, and a CIA spokesman declined to comment on the suggestion that the rescued hostages had connections to the U.S. government.
Senior Iraqi Shi'ite politician Ayad Allawi said he suspected there must have been significant figures among the hostages to warrant a risky intervention by U.S. special forces.
"I think this would have happened only if there were some useful assets," he said.
(Additional reporting by Mark Hosenball in Washington; Editing by Michael Georgy and Mark Trevelyan)