An Iranian Kurdish rebel group received military training in weapons and explosives from U.S. and European advisers as part of the international program backing Kurds in the war against the Islamic State group in Iraq, the group's commander told The Associated Press.

The group, called the Kurdistan Freedom Party, is one of several Iranian Kurdish factions that have carried out attacks this year inside Iran, sparking a crackdown by security forces. At the same time, the group has been fighting alongside Iraqi Kurds against Islamic State group militants in northern Iraq.

The training is a further twist in the complex web of alliances and enmities swirling around the wars in Iraq and Syria. Iran is a powerful backer of the Iraqi government and Iraqi Shiite militias against the Islamic State group.

It appeared that the Iranian faction made its way into the training because it is officially under the umbrella of the Iraqi Kurdish forces. But any training of Iranian insurgents, even indirectly through the anti-IS campaign, could alarm Tehran, which remains a top rival of Washington and U.S. allies in the region despite their common cause in fighting the militants in Iraq and despite last year's nuclear deal.

Speaking to The Associated Press this week, the Kurdistan Freedom Party's commander Hussein Yazdanpana said he recognized that the training was for the fight against IS.

"They helped and trained us within the framework of the fight against Daesh," or the Islamic State group, he said.

But he said his group, known by the Kurdish acronym PAK, would continue attacks in Iran, adding that the fight against IS "was never an alternative to their struggle" against the Iranian government. Yazdanpana said his group has launched six attacks inside of Iran this year alone.

Iranian Kurdish fighters have waged an on-again, off-again insurgency in mainly Kurdish areas of northwestern Iran near the Iraqi border, complaining of discrimination by Tehran and demanding independence for Kurds.

This year has seen a new surge in attacks and clashes between the fighters and Iranian security forces, including the elite Revolutionary Guard, leading to casualties on both sides. Iranian forces also shelled Kurdish positions just across the Iraqi border in response. The government of the Iraqi Kurdish autonomous zone has called for a halt to any attacks into Iran by Kurds in Iraqi territory.

The main faction carrying out the bulk of the violence is the Democratic Party of Iranian Kurdistan, known as the PDKI, which is also based in Iraq but is not involved in the fight against IS and so did not receive any international training.

The U.S.-led coalition has been training Iraqi Kurdish fighters, known as peshmerga, to fight the Islamic State group ever since the militants swept across much northern, western and central Iraq in the summer of 2014.

The peshmerga are a mix of multiple Iraqi factions. The Iranian PAK — believed to number several hundred — is closely allied to the main ruling party in Iraq's Kurdish autonomous region, so its fighters have been helping in the fight against IS. The PAK's fighters are under the umbrella of the regional government's Peshmerga Ministry, which governs which groups receive training.

Italian Army Capt. Giulio Macari, a spokesman for the U.S.-led coalition in the Iraqi Kurdish city of Irbil, told the AP that the party "probably" received training, since Western advisers offered help all to Kurdish militias under the ministry's control. Macari said the coalition did not choose the groups that it was training.

Yazdanpana said the trainers "no doubt" knew who his group was. The PAK fighters wear uniforms similar to the Iraqi Kurdish peshmerga, but with their group's orange and white logo.

He said PAK fighters had three rounds of training by American advisers between March and September 2015 at the front line where they are deployed in central Kirkuk province. The group's fighters went through further rounds of training later alongside other Iraqi Kurdish fighters, he said. PAK fighters control some 15 kilometers (9.3 miles) of front-line territory west of the Iraqi city of Kirkuk as well as some positions east of the city of Mosul.

A senior Iraqi Kurdish Peshmerga official, Maj. Gen. Karaman Kemal Omar confirmed that American advisers carried out training at the Kirkuk front line. Asked if the PAK was among those trained, he said the training was given to all units at the location "without distinction." The training included infantry tactics, weapons handling and bomb disposal.

Omar is the deputy chief of staff for operations and training in the Peshmerga ministry.

Maj. Josh T. Jacques, a spokesman for U.S. Central Command, which oversees the fight against IS, said early Wednesday that it was "not aware of any training provided by CENTCOM to the Kurdistan Freedom Party militia."

Senior U.S. defense officials said the training and equipment is meant for forces who are fighting Islamic State militants and not to be used for other conflicts or battles with other nations. They said that groups only get the amount of equipment and ammunition they need for the immediate battle they are in, so it would be unlikely that any of that would be used in other fights.

Officials said they had no specific information about the PAK fighters and it wasn't clear if the coalition would continue training the group if it became known that fighters were using it for conflicts in Iran rather than against Islamic State insurgents. The officials spoke to the AP on condition of anonymity because they wasn't authorized to discuss the matter publicly.

___

Associated Press writers Jon Gambrell in Dubai, United Arab Emirates, and Lolita C. Baldor in Washington contributed to this report.