ERBIL/BAGHDAD (Reuters) - U.S. and Kurdish special forces who raided a compound in northern Iraq were acting on intelligence that Kurdish fighters were being imprisoned there by Islamic State, a source in the Kurdistan Region Security Council said on Friday.

Kurdish counter-terrorism forces planned and led the raid which rescued 69 people early on Thursday, supported by U.S. forces, Iraqi Kurdistan’s U.S. representative said. 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.

The raid was led by forces from the Directorate-General for Counterterrorism of the Kurdistan Region Security Council, said Bayan Sami Abdul Rahman, Kurdistan’s diplomatic representative in Washington D.C.

U.S. Special Forces commandos participated in the raid, Rahman said, and U.S. airstrikes and helicopter operations were launched as part of the operation.

“We share in American’s grief for its fallen soldier, Master Sergeant Joshua Wheeler,” Rahman said.

According to Kurdish media, the raided facility was an estate or compound formerly owned by an Iraqi government judge.

U.S. Defense Secretary Ash Carter said in a news briefing on Friday that U.S. troops had not planned to enter the compound, and were there only to advise and assist the Kurdish fighters.

None of the captives freed by the raiders were peshmerga, suggesting that Kurdish prisoners may have been moved by militants to another location, a Kurdish source added.

The freed detainees were 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 or treason, said U.S. and Kurdish officials.

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.

MISSING FIGHTERS

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.

U.S. officials denied the rescued hostages had any connection to the United States.

But 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.