A Turkish protester shouts slogans against  U.S. Secretary of State John Kerry while holding a placard reading in Turkish "Get out Kerry" during a protest in Istanbul on Sept. 12. (Sedat Suna/EPA)

On Friday, Secretary of State John Kerry headed to Ankara, Turkey, to meet with President Recep Tayyip Erdoğan and discuss possible cooperation to fight the Islamic State.

So far, 10 states in the Middle East have declared a "shared commitment" to President  Obama's plan to tackle the extremist group. However, despite being a key NATO ally and possessing a strong military, Turkey has refrained from embracing the plan, and reports suggest that it will not allow its air bases to be used for air strikes against Islamic State militants in Iraq and Syria.

While U.S. officials are said to expect some kind of cooperation, there's one big factor that helps explain Ankara's hesitation: The lives of 49 Turkish citizens.

In June, Islamic State raided the Turkish consulate in the Iraqi city of Mosul and took 49 people hostage. The safety of these hostages, still held by Islamic State, is of clear concern for Ankara, and the Turkish government is not only weary of provoking the Islamic State but also the families of those being held.

Erdoğan has largely kept quiet about the status of negotiations, grimly telling Al Jazeera last month that his hope is for a solution “that would not cause sorrow.” As one unnamed Turkish official told the AFP this week, "Our hands and arms are tied because of the hostages."

Turkey's entanglement with the Islamic State goes deeper than the hostages, however. Turkey shares a long border with Syria, and some towns in southern Turkey ended up becoming staging grounds for Islamist rebel fighters, including the Islamic State, in the early days of the Syrian war. Ankara tolerated their presence, apparently believing that anything bad for Bashar al-Assad's Syrian regime was good for Turkey.

They were wrong. As Anthony Faiola and Souad Mekhennet reported for The Post  this year, Turkey did eventually crack down on the Islamist fighters, but only after things began to go bad for Turkey: Last year,  the border town of Reyhanlı was hit by a wave of bombings that were blamed on the Islamic State, and there are fears that the extremist group might try further to provoke and destabilize Turkey.

There are signs of a deeper penetration. Last month, German broadcaster ARD reported that the Islamic State had some kind unofficial office in Istanbul where prospective Islamist fighters would head. Before that, Joseph Dana wrote for Roads and Kingdoms about a "Jihadist gift shop" in the city that sold Islamic State branded T-shirts and other goodies. And in Newsweek this week, Alev Scott and Alexander Christie-Miller explain how Islamic State have been recruiting in some of the rougher areas of Istanbul, "targeting young men from Sunni Muslim districts plagued by poverty and drug addiction." Turkish officials have estimated that more than 1,000 Turkish citizens were fighting for the Islamic State, perhaps making up around one-tenth of the group's total fighters.

The group doing the most to tackle the Islamic State in Istanbul right now may not be the government. There were reports recently that the Patriotic Revolutionary Youth Movement (YDG-H), a group affiliated with Turkey's Kurdish separatist movement Kurdistan Workers’ Party (PKK), had attacked a number of buildings in the Istanbul area believed to have been used by the Islamic State, allegedly killing one extremist.

But things get awkward here, too: While PKK-affiliated groups have helped to lead the fight against the Islamic State in Iraq, Turkey's Kurdish separatists are considered a terrorist organization by both Ankara and Washington. And when anti-terror raids were announced by Turkish police Friday, they targeted YDG-H and the Marxist-Leninist Revolutionary People’s Liberation Party-Front (DHKP-C), rather than Islamic State.

Ultimately, Turkey is fearful of fighting with Islamic State for good reason. As 49 hostages and other factors show, they're already too entangled for comfort.