AS JIHADISTS calling themselves the "Islamic State" (IS) have swept across Iraq and Syria, they have come up against one unusually tough opponent. Syria's ethnic Kurds have stubbornly clung onto three separate enclaves along Syria's border with Turkey and even pushed back into lands captured by IS. Since September 18th IS has turned the tables, concentrating its forces for an all-out offensive to take the central enclave around the Syrian Kurdish-majority town of Ain al-Arab, known as Kobane in Kurdish, on the border with Turkey. IS sees the territory as strategic because it lies close to the edges of its "caliphate" and to a supply route used by foreign fighters joining the group. IS has grabbed scores of villages, pushing more than 100,000 Kurdish refugees into Turkey. The fact that all this happened just as Turkey secured the release of 49 hostages held by IS raises, inevitably, speculation about Turkey's objectives. Recep Tayyip Erdogan, Turkey’s president, says that only "diplomatic bargaining" has taken place. But many Kurds suspect much more was involved. Did Turkey somehow help IS's rapid advance against Kurds in Syria, either by releasing IS prisoners or allowing fighters to cross its border? "There is an undeniable connection," claims Cemil Bayik, the top field commander of Turkey's Kurdistan Workers’ Party (PKK), hinting that Turkey's leaders may have given a green light to the IS offensive with the aim of weakening the troublesome Kurds. Turkish officials deny such claims. Turkey has certainly been uneasy about the presence on its borders of Kurdish fighters linked to the PKK, which has waged 30-year insurgency but is now observing a ceasefire. That said, as a country that already hosts 1.5m Syrian refugees, Turkey may have little to gain from inviting in more, especially potential supporters of the PKK. Atheel Nujaifi, the exiled Arab Sunni governor of Mosul, who is close to the government in Ankara, believes Turkey is more concerned by the growing strength of the PKK's Syrian affiliate—the Democratic Unity Party (PYD)—and its armed People’s Defence Units (YPG), than it is about IS. But rather than helping IS directly or indirectly, he reckons the Turks instead threatened to crack down on the families of several senior IS commanders from Iraq who had slipped into Turkey with forged documents last week.

By September 22nd YPG men said they had stemmed IS’s advance just a few miles from Ain al-Arab. YPG fighters have generally been able to repel IS attacks in the past two years, including a previous attempt to take Ain al-Arab in June. They may have attracted a more concerted effort from IS this time because on September 10th YPG Kurds and a number of Syrian rebel groups that had once fought them announced a joint command known as “The Volcano of the Euphrates”. They aimed to take back some villages from IS on the road to Raqqa, IS's headquarters which lies only 140km (90 miles) from Ain al-Arab. Some PKK fighters have slipped past Turkish patrols to cross into Syria to help their fellow Kurds, many of whom are deemed apostates by IS. For now America does not look prepared to answer Syrian Kurds' pleas for help, though it has conducted air strikes to protect the Kurdish autonomous region in Iraq, particularly when the capital of Erbil was threatened.

There, unlike in Syria, America has a large consulate, and an interest in protecting a rare relatively stable part of the Middle East. Moreover, the Kurds' role in Syria has been ambiguous. In 2012 Bashar Assad, Syria's president, largely handed over rule of the Kurdish north-east to Kurdish forces, probably to avoid his forces being overstretched. That attracted the wrath of Syria’s rebels, who accused the Kurds of doing dirty deals with the Assad regime to protect themselves or, worse, of siding with it. Some Syrian rebel groups even fought alongside Jabhat al-Nusra, al-Qaeda’s affiliate in Syria, in an attempt to take Ain al-Arab from the Kurds in July 2013.

Whatever the truth of recent events, America has said that it expects Turkey fully to join the fight against IS, now that its hostages are safe. But an advisor to Mr Erdogan privately says that this is "out of the question". Turkey, it seems, does not want to provoke IS into carrying out attacks on its territory. IS this week appeared to threaten Turkey by making oblique mention of “Constantinople”—the pre-Islamic name of Istanbul—in its latest ghoulish statement released on September 22nd urging followers to kill Americans, Australians, Frenchmen and others by any available means. And Turkey has another worry: some 32km south of its border with Syria there are a small number of Turkish soldiers in IS territory guarding a tomb said to belong to the first Ottoman’s sultan’s grandfather.

* This piece was updated on September 23rd to clarify that Kobane is the Kurdish, not the Turkish, name for Ain al-Arab.