By Isabel Coles

MAKHMUR Iraq (Reuters) - Washington has acquired an unlikely ally in its battle against Islamic State militants in Iraq - a group of fighters it formally classifies as terrorists.

The outlawed Kurdistan Workers' Party (PKK), condemned for its three-decade insurgency against the Turkish state, says it played a decisive role in blunting the militants' sweep through Iraq, which triggered U.S. air strikes to halt their advance.

"This war will continue until we finish off the Islamic State," said Rojhat, a PKK fighter speaking from a hospital bed in Arbil, the capital of the Kurdish region in Iraq.

The involvement of the PKK has consequences not only for rival Kurdish factions who failed to stop the Islamic State's advance, but also for Turkey and the international community, which is being lobbied by the PKK to drop the terrorist tag.

Rojhat, 33, was wounded for a third time in the battle to retake the northern Iraqi town of Makhmur from the Islamic State after the militants - deemed too extreme even for al Qaeda - routed the region's vaunted Kurdish peshmerga forces.

The first two times he was fighting Turkish forces, part of a conflict which killed 40,000 people between its beginnings in 1984 with demands for Kurdish independence from Turkey and a ceasefire in March 2013.

His role highlights the challenge the PKK represents for Ankara, which still views it as terrorist but feels seriously threatened by the Islamic State, which has seized dozens of its citizens and decapitated an American hostage this week.

Thanks to Rojhat and his comrades-in-arms, residents of Makhmur who fled in terror at an onslaught that threatened Arbil, 60 km (40 miles) away, are now returning to assess the damage.

They have already sprayed over graffiti that reads: "the Islamic State is here to stay".

"This is not just about Makhmur: this is about Kurdistan," said PKK commander Sadiq Goyi, seated beneath a banner of the group's jailed leader Abdullah Ocalan, referring to Kurdish-inhabited land in Syria and Iran as well as Turkey and Iraq.

Story continues

"Islamic State is a danger to everyone, so we must fight them everywhere".

An armed sister group of the PKK - People's Defense Units (YPG) - has carved out an autonomous zone in Syria's northeast, successfully fending off attacks by IS militants who have proclaimed a caliphate straddling the frontier with Iraq.

When the militants overran peshmerga positions in northwestern Iraq, YPG fighters crossed over from Syria and evacuated thousands of minority Yazidis left stranded on a mountain with scant food and water.

"The PKK is our hero," said 26-year-old Hussein, one of hundreds of Yazidis being trained by YPG fighters at several camps inside Syria to fight the Islamic State.

PKK commanders say guerrillas have been dispatched to the front line in the cities of Kirkuk and Jalawla as well. They declined to give numbers and fierce fighting makes their statements hard to verify.

PSYCHOLOGICAL WARFARE

Turkish security forces began clearing villages suspected of sympathizing with the PKK during the 1990s, displacing thousands of Kurds, some of whom fled to Iraq and eventually settled in a camp in Makhmur, recently turned into a base for PKK guerrillas.

The word "Apo", nickname for Ocalan, is scrawled on walls around the camp, which held more than 10,000 residents until the Islamic State's incursion.

A lone pair of socks still dangles from a washing line and unpicked grapes have begun to shrivel on the vine. The thud of artillery can be heard from the new front line with the Islamic state, several kilometers away.

The militants' surge towards Kurdistan destroyed the aura of invincibility surrounding the region's peshmerga forces, which had not fought for years and ultimately proved no match for fighters armed with weapons plundered from the Iraqi army.

PKK commanders however say the militants' main weapon is fear: "They are waging psychological warfare," Goyi said. "Islamic State are not as powerful as they're thought to be".

The PKK's newfound role may prove most worrying to its historic competitor, the Kurdistan Democratic Party (KDP). The two have long vied for leadership of the Kurdish community across the borders of Syria, Iran, Turkey and Iraq.

With Kurdish forces from all four countries fighting the same enemy for the first time, for now at least, PKK guerillas and peshmerga stand side by side at checkpoints on the road to Makhmur. Massoud Barzani, the president of Iraqi Kurdistan and also head of the KDP visited the camp himself to thank PKK commanders for their assistance.

But tensions are not far beneath the surface.

A senior KDP official said the PKK's involvement would discourage the international community from providing the Kurds with advanced weapons to match Islamic State's arsenal. "We don't need them," he said of the PKK, accusing it of seeking to discredit the KDP.

The wounded guerrilla Rojhat said the PKK was more organized and disciplined than the peshmerga, and its tactics better suited to fighting Islamic State, even without the kind of military hardware Iraqi Kurds are seeking.

"This is how we fought the Turkish army for years," Rojhat said. "War is an act of faith".

"NO NEED TO PANIC"

Ankara has made little comment on the latest conflict in Iraq, smarting from allegations, which it firmly denies, that its support for Sunni opponents of Syrian President Bashar al-Assad helped the Islamic State to grow and fearing for the fate of dozens of its citizens the militants have captured.

But Turkish officials played down concern the PKK would be embolded by its role in Iraq into stirring unrest in Turkey, seeing the fight against Islamic State as a separate issue from their struggle with Ankara for Kurdish rights.

"In Iraq there is a crisis and the PKK has engaged in this fight along with other elements there," a senior Turkish government official told Reuters, adding that he did not see its engagement there as permanent.

"There is no fear of a division in Turkey or a fear of unification of the Kurdish population outside of Turkey. Since there are no demands through armed conflict or violence from the PKK in Turkey, there is no need to panic," the official said, asking for anonymity to allow him to speak more freely.

Deputy Prime Minister Besir Atalay said this week the government may hold direct talks with the guerrillas, whose leader Ocalan is jailed on an island in the Marmara Sea. It proposes a plan involving the disarmament and reintegration of fighters into Turkish society.

The PKK see the new enemy and the old as very much linked, accusing Turkey of funding and sending Islamists to fight Kurds on their behalf in Syria, allegations Ankara denies.

But it has dropped its demand for a separate state for Kurds in Turkey's southeast in favor of devolution of power in each of the four countries across which Kurds are divided.

A European diplomat in Ankara said that the PKK would see its actions in Iraq, in particular its help in protecting members of the Yazidi community, as helping a diplomatic push to persuade the European Union to remove it from its list of terrorist groups.

"It is quite paradoxical that an organization proscribed as a terrorist group by the EU appears to have played such a significant role (against Islamic State)," the diplomat said.

"They’re challenging the legal basis on which the EU proscribed them in the first place. They will see all of what has been happening in the past few days as grist to that mill."

The European Union, however, would be highly unlikely to make any such move without Turkish agreement, he said.

"The Turks would be strongly against ... We’re not at the stage where Turkey would be willing to contemplate anything like that, absolutely not."

(This story has been refiled to correct spelling of proscribed in fourth paragraph from the end)

(Additional reporting by Humeyra Pamuk, Mark Hosenball in Washington, Orhan Coskun and Nick Tattersall in Istanbul; Editing by Michael Georgy and Philippa Fletcher)