Jalal Talabani, the Kurdish president of Iraq, has long been known to his supporters by the affectionate nickname, “Mam” (“Uncle”). But with Mr Talabani’s health in question, his long-term rival Masoud Barzani has been making a bid to become the “father” of a prospective, independent Kurdish state.

This was dramatically demonstrated this weekend by Mr Barzani’s extraordinary visit to the Kurdish areas of Turkey. This was at the invitation of Turkish prime minister Recep Tayyip Erdogan, who attended an elaborate series of ceremonies with Mr Barzani.

Even more extraordinary were the statements by the two leaders.

“Long live the brotherhood of Turks and Kurds,” Mr Barzani declared. It is a statement redolent of almost hyperbolic overcompensation, yet also profoundly reflective of the remarkable new political realities.

For his part, Mr Erdogan crossed a massive Turkish political taboo by referring openly to “Kurdistan”. None of this would have been conceivable a few years ago.

Both Mr Barzani and Mr Erdogan have very clear motives in embracing each other in this almost surreal public display of mutual affection.

Mr Erdogan was essentially electioneering, in a long-term bid to become Turkey’s next president. He needs all the help he can get. Simply put, Mr Erdogan needs as many Kurds as possible not to vote for his opponents in the Peace and Democracy Party in 2014 local elections.

But broader Turkish national policy was also at work in the invitation for Mr Barzani to visit Diyarbakir.

Turkey has been trying to balance several difficult relationships in which the Iraqi Kurdistan Regional Government (KRG), led by Mr Barzani, is a crucial hinge. Turkey has been trying to repair relations with the Shiite-led Iraqi government in Baghdad, and has been easing off from its formerly categorical commitment to the overthrow of Bashar Al Assad in Syria. So Turkey needs to balance the overture to Baghdad with an equally strong outreach to Erbil.

Both sides are also eyeing lucrative new contracts to export oil and gas from the KRG region through Turkey, although such independent agreements irk Baghdad. Turkey says it won’t interfere in the contentious arguments about how Iraqis divvy up the revenues on their side.

The stakes are even higher for Mr Barzani. He sees a clear path to Kurdish independence, since even the mainstream Iraqi Shiite parties now see this as useful to their purposes. But the mutuality of interests between the KRG and Mr Barzani, on the one hand, and Turkey and Mr Erdogan on the other, depend entirely on the new Kurdish entity not appearing to threaten Turkish control of Kurdish regions within Turkey.

Enter Mr Barzani’s primary rival for Kurdish transnational leadership at the moment, jailed Kurdistan Workers’ Party (PKK) leader Abdullah Öcalan. The crux of the feud between the two rivals, which has now boiled over into overt hostility, hinges on the emergence of autonomous Kurdish regions in northern Syria and a stalemated peace negotiation between Turkey and the PKK.

Since 1978, the PKK has fought a brutal battle for Kurdish independence in large sections of Turkey, and is considered a terrorist organisation by many countries.

The emergence of Kurdish quasi-autonomous regions in northern Syria at first appeared to be an extraordinary opportunity for Mr Barzani. But as the PKK-Turkey peace talks have stalemated, the behaviour of the PPK-lead alliance in northern Syria has increasingly threatened the all-important links between the KRG and Turkey.

The PKK has recently infuriated Mr Barzani by declaring, from his point of view prematurely, unwisely, and without permission, new self-rule areas. Mr Barzani’s response has been to accuse the PKK of working in league with Mr Al Assad and threatening to intervene with Iraqi Kurdish forces in northern Syria.

Mr Barzani and Öcalan’s personal rivalry only exacerbates a real distinction of interests between the KRG and its close relations with Turkey, and those of the Kurdish populations in Syria and Turkey.

The conundrum is this: if the Kurds are to achieve national independence it will be based largely, if not entirely, in what is now northern Iraq.

Baghdad will not only have to acquiesce to this, it is Turkey, of all states, that will have to serve as its guarantor. And this means that Turkey’s control of its own Kurdish areas cannot be directly threatened by the new Kurdish state.

Öcalan may well see his political future as dependent on fending off the emergence of Mr Barzani as the uncontested Kurdish leader. But Öcalan’s constituency may also fear the consequences of remaining part of Turkey, excluded from the independent Kurdish state.

This is why the peace talks between the PKK and Turkey were so crucial to Mr Barzani, and the recent resumption of PKK attacks against Turkish military targets so alarming to him. It also explains Mr Barzani’s profound opposition to the self-rule announcement in PKK-controlled areas of Syria.

So the Diyarbakir spectacle served the personal interests of both men and the national projects they represent. But Öcalan and the PKK have re-emerged as potent potential spoilers in recent weeks, in both Turkey and Syria.

If Mr Barzani is going to be able to keep talking about “the brotherhood of Kurds and Turks” on his path to statehood, and Mr Erdogan speaking publicly and respectfully about a “Kurdistan,” both parties are realising a way must be found to either make the PKK stakeholders in the deal, or to neutralise them.

Hussein Ibish is a senior fellow at the American Task Force on Palestine and a columnist for Now Media. He blogs at www.ibishblog.com

On Twitter: @ibishblog