AFTER defeating Zuhak, an evil king with serpents sprouting from his shoulders, the Kurds celebrated by lighting the hillsides with fire. The fable is remembered each Nowruz, a holiday marking the start of spring and the new year in late March. The Kurds still celebrate by lighting fires—and, in the case of Kurdish soldiers near Mosul, sending flaming tyres down the hillside toward the trenches of Islamic State (IS). The Kurdish forces in Iraq (where they are known as peshmerga) and Syria are the West’s most reliable allies in the fight against IS. They have won important victories in the towns of Kobane, on the Syrian border with Turkey, and Sinjar in northern Iraq. In the process, they have increased and consolidated the territory under their control. Thanks to the chaos created by IS, the Kurds in each country are closer than ever to achieving self-determination.

Yet a unified Kurdistan spanning the region’s borders is not in the offing. Last month Masoud Barzani, the president of Iraq’s autonomous Kurdistan region, called for a non-binding referendum on independence by the end of the year. Statehood could eventually follow. But in Syria the Kurds’ declaration of a federal region, called Rojava, on March 17th, was framed as a way of holding the country together, not splitting it. Though left out of peace talks, Kurdish leaders say Rojava could act as a model for a decentralised Syria.

Syria’s Kurds may of course merely be a step behind their Iraqi counterparts on the way to independence. But that would belie the rivalry between the dominant Kurdish parties in each country. The Kurdistan Democratic Party (KDP), led by Mr Barzani, accuses the Democratic Union Party (PYD) in Syria of lacking commitment to Kurdish nationalism. The PYD has close ties to the Turkey-based Kurdistan Workers’ Party (PKK) of Abdullah Ocalan, who believes in a confederation of Kurds, not full independence, within current borders. The PYD and the PKK shun capitalism, while the KDP embraces it, in theory at least.

The tension is exacerbated by the KDP’s co-operation with Turkey, home to a large and restive Kurdish population. Turkish leaders see the KDP as a palatable alternative to the PKK, which they blame for recent attacks inside Turkey. Mr Ocalan sits in prison, but fighting between the government and Kurds in south-eastern Turkey has reached a bloody peak. By extension, the government takes a dim view of the PYD, which it has prevented from forming a contiguous entity along the border in Syria by bombing Kurdish fighters—and by tacitly helping IS, claims the PYD.

The PYD portrays Rojava as a democratic and pluralistic place, but the party is accused of monopolising power and, in some towns, of kicking out Arabs. Other Kurdish groups, such as the local affiliate of the KDP, have been sidelined and critics repressed. While maintaining an uneasy truce with the regime of Bashar al-Assad, Syria’s embattled president, the PYD’s soldiers have attacked other rebels, including other Kurds. “For the PYD, everyone is the enemy,” says Sultan Jalaby, a Kurdish journalist who fled Syria for Turkey.

The KDP has done its share to alienate the PYD, including digging trenches on the Iraqi side of the border with Rojava. Mr Barzani also has critics at home. Over the objections of political rivals, the president’s term in office has been extended indefinitely due to the fight against IS. Many believe his call for a referendum was timed to distract from more pressing problems. The region has been cut off by Baghdad for failing to send oil revenue to the central coffers. Low oil prices, a bloated budget and the influx of nearly 2m refugees and displaced persons have it drowning in debt.

The Kurds in Iraq and Syria are tightening their grip on disputed territories, such as oil-rich Kirkuk in Iraq. But there is little appetite abroad for the break-up of Iraq and Syria. The declaration of a federal Rojava was rejected by America. The Kurds may be winning ground; but peace among them may prove to be more elusive.