Probably yes. After all, the Islamic State poses a major threat to Turkey. Ankara had a black-and-white perception of the Syrian civil war during its first two years, condemning only the ruthless regime of Bashar al-Assad while supporting virtually all rebel parties, including jihadist factions. “The Turkish authorities thought they could work with extremist Islamist groups in the Syrian civil war and at the same time push them to become more moderate,” Francis Ricciardone, the former American ambassador to Turkey, told journalists earlier this month. But as the Islamic State emerged with an unforeseen fanaticism and bloodlust in mid-2013, Ankara began to wake up to the threat.

In the past year, both official statements and the views from the pro-government media show that the Islamic State is viewed in Ankara as a traitor to the Free Syria cause — that it only helped defame the revolution and legitimize the Assad regime. In collaboration with its Western allies, Turkey also became more careful about foreign fighters, and has captured 830 European citizens who attempted to enter Syria via Turkey to join the Islamic State.

Ideologically, as well, the Islamic State is an abomination for both the Turkish government and the overwhelming majority of Turkish society — which, despite some illiberal tendencies, subscribes to a peaceful and pro-democratic understanding of Islam. It’s true that the Islamic State gathers recruits from Turkey, as recently reported in the Times, but the group gains even more recruits from Britain, France and Russia.

Yet, even after the freeing of the hostages, there is one risk that may restrain Turkey in its actions against ISIS: its extreme vulnerability to terrorist attacks. The territory controlled by the Islamic State extends from northern Syria to central Iraq, but there is only one country that it borders: Turkey. Moreover, this long border is permeable, mostly because of Turkey’s humane policy of welcoming every refugee. Consequently, more than 1.5 million refugees have poured into Turkey in the last three years, with more than 130,000 in the past week. It is very hard to determine who is a real refugee and who is a fighter — and if so, a fighter for whom?

In an event that laid bare Turkey’s vulnerability, two car bombs killed 51 people in Reyhanli, a Turkish town near the Syrian border, on May 11, 2013. Although the government blamed the Assad regime for the attack, the real culprits are still unknown, and they could have been connected to jihadist groups.