Erbil, Iraq - The President of Iraq's Kurdish region, Massoud Barzani, visited fighters of the Kurdistan Workers Party (PKK) for the first time last week, after the PKK joined Kurdish Peshmerga forces to expel the Islamic State group from the town of Makhmour.

In a video published online, Barzani thanked the PKK fighters: "We are brothers. They [Islamic State fighters] are the enemy of the people of Kurdistan. We have one destiny; we will do everything, what we can," Barzani said.

But some analysts said the public pronouncement could complicate relations between the Kurdistan Regional Government (KRG) and Turkey, which has fought a decades-long war against the PKK, a Kurdish armed group operating primarily in the country's southeast.

Others have said that the PKK's involvement - Turkey, the US and the European Union designate the group as a terrorist organisation - could hurt ties between Ankara and the West, which is planning to provide armed support to Kurds in Iraq. "I hope that the relations between the Kurds and Turks are strategic enough so that these steps by Barzani do not irritate the Turks," said Dawood Atrushi, vice-president of international relations at Duhok University.

"The US is providing air cover to a force it once called terrorists, and continues to black list as such. The current conflict as it stands has presented a paradox that will need to be addressed at some point in the near future as these extreme ends - the PKK and the US - continue to fight a common enemy," said Roman Zagros, editor of Insight Kurdistan, a Kurdish consultancy and service website.

According to US law, it is prohibited to provide weapons or training to designated terrorist organisations. But according to Michael Knights, an analyst with the Washington Institute for New East Poilcy, "If there is any signs of widespread diversion of US weapons, the US will actively investigate this".

Knights said it was unlikely the PKK would be on the receiving end of these weapons in Iraq. "Perhaps something would end up with the PKK, but [does Barzani] really want that to happen? I don't think so."

Turkish diplomatic sources, meanwhile, said Barzani's visit to the PKK would be brought up in the next high-level meetings between the Iraqi Kurds and Turkey. "This is a sensitive topic when people see PKK fighters fighting alongside Peshmerga forces, this is not something ignorable in Turkey," a Turkish diplomat, who spoke to Al Jazeera on condition of anonymity, said.

IN PICTURES: The Kurdish frontline in Iraq

Historically, the PKK and Kurdistan Democratic Party (KDP), headed by Barzani, have competed over the leadership of approximately 30 million stateless Kurds, spread out over Iran, Iraq, Syria and Turkey. The KDP even supported Turkish military operations against the PKK in the 1990s.

Since the US invasion of Iraq in 2003, Turkey has built closer economic ties to Iraq's Kurdish leaders, although Ankara initially opposed Kurdish autonomy in Iraq, fearing it could inspire its own Kurdish minority to demand greater rights of their own.

Around 1,500 Turkish companies now operate in Iraq's Kurdish region, and Turkey supports independent Kurdish oil exports, selling a shipment of 1.3 million barrels of oil in May despite objections from Baghdad.

Turkey also borders a Kurdish-controlled region in Syria, formed as a result of the ongoing Syrian war. This Kurdish autonomy led to tensions between Barzani and the PKK-affiliated Democratic Union Party (PYD) in Syria, after they failed to implement a power-sharing agreement.

Both Turkey and Barzani have rejected the group's rule in northern Syria, while the PYD has marginalised Barzani-supporters in Syria by arresting them and banning their political activities.

But with the Islamic State group's advance into Iraq's Kurdish region, the Kurdish groups united. "We had a meeting with the president of the Kurdistan region [Barzani]. We discussed joint actions and agreed on certain things," Tekoser Zagros, the PKK commander in Makhmour, said.

"From now on, our forces and the Peshmerga will coordinate their actions in South Kurdistan [Iraq's Kurdish region] against the criminal gang [Islamic State]. And we will continue until Kurdistan is safe, and [the Islamic State group] is finished."

RELATED: Iraq refugees 'terrified to be sent back'

In Makhmour, the PKK played a pivotal role in re-gaining control from the Islamic State group. The Makhmour refugee camp hosts 10,000 Kurds from Turkey that fled the country's civil war between the PKK and Turkish government in the 1990s. Turkey has often complained to the United Nations that the camp is used by the PKK.

"We have been living in Makhmour for 20 years, and they attacked us," said Hussein Rebar, a member of the Makhmour refugee council. "We had to pick up guns to protect ourselves. We have around 100 fighters here," he added.

Kurdish Peshmerga commanders such as Ali Sulaiman, who leads 700 Peshmerga fighters, said relations between the Kurdish armed factions of the KDP and PKK are good. "We are all like brothers. They [PKK fighters] are also, like us, defending this area, and there is some co-operation between us."

Hemin Hawrami, head of foreign relations for the KDP, said the new relations are not surprising. "In Makhmour, some of them were in their camp and they have their own weapons. They are not typical [fighters] from Qandil [the main PKK camp close to the Turkish border]. So they protected their own camp with the Peshmerga," he said.

Zagros Hiwa, a PKK spokesperson, told Al Jazeera that the Kurds will defend themselves, and that Barzani visited all Kurdish armed groups in Makhmour that fought the Islamic State group. "Our approach as [PKK] is that we disregard many [political] interpretations of the situation and we just concentrate on defence," he said.

"In many places [PKK fighters] and Peshmerga forces are together in Kirkuk, some places in Shingal, and in Maxmur especially, they fought together against [the Islamic State]," Hiwa added.

One has to also understand that it took a force such as [the Islamic State group] to bring the two together in the same front. This simply underlines the deep differences between the two. - Roman Zagros, Kurdish analyst

"If [Islamic State] does not unify us, then we have to give up," said Sheruan Hassan, a leading PYD-member in Europe. "If we work together, others [countries] will have less influence on us, and the Kurds can protect themselves."

RELATED: Iraq's Kurds demand expanded US operation

Galip Dalay, a researcher at the Turkey-based SETA foundation, said he did not anticipate a negative public reaction from Ankara to the ties between the PKK and Iraqi Kurdish forces, especially after PYD leader Salih Muslim visited Turkey in July 2013 to meet with Turkish officials.

"First, PKK leader Abdullah Ocalan is in a dialogue with Turkey’s political establishment to solve the Kurdish issue, and secondly, Turkey engaged with PKK-affiliate PYD on several occasions," Dalay told Al Jazeera.

A KDP official, speaking to Al Jazeera on condition of anonymity, said he did not expect any negative reaction to Barzani’s visit. "PKK [fighters] have relatives [in Makhmour], and they came to protect [them]. I don’t think there will be any concern from the Turkish side."

Ahmet Berat Conkar, a member of the ruling Justice and Development Party (AKP), and deputy chairman of the AKP's foreign affairs division, said the Turkish government had no problem with the PKK's role in fighting in Iraq. "Turkey does not see this kind of an alliance as a threat against [itself] or [its] interests," he said.

"Turkey has a good relationship with KDP and plays a positive role in the region," Conkar told Al Jazeera. The ongoing peace process between Ankara and the PKK, he added, "is progressing quite positively, aiming to guarantee Kurds' rights as well as to disarm the PKK and integrate its members into Turkish society."

But Kurdish analyst Roman Zagros was unsure KDP-PKK ties would improve in the long-term. "I think it's true that this is a significant development; it managed to bring the two rivals together. But one has to also understand that it took a force such as [the Islamic State group] to bring the two together in the same front. This simply underlines the deep differences between the two."