There's a proverb in Turkish: "Feed a crow and it will pluck out your eyes."
That may be something that Turkish President Recep Tayyip Erdoğan is thinking about these days, after an attack on Istanbul's main airport on Tuesday killed 44 people and injured more than 230 others.
ISIS has not claimed responsibility for the attack, but Turkish officials blamed the group.
Now, some of Erdoğan’s critics are saying his government hasn't taken ISIS seriously enough as a threat to Turkey. Some even accuse the administration of providing tacit support for ISIS, as part of Turkey's efforts to oust Syrian President Bashar al-Assad and to fight the rise of Kurdish separatist groups.
Rukmini Callimachi, a New York Times correspondent based in Istanbul, has reported this week on Turkey's complicated relationship with ISIS.
“It’s not clear if it was more turning a blind eye rather than providing actual support,” Callimachi explains.
Either way, she says, ISIS recruits were able to travel freely through Turkey well into 2015.
ISIS transferred supplies, including arms from sympathetic regional players, through Turkey. Sick and wounded fighters went to Turkey for medical care. And fighters sent and received money using Western Union offices in southern Turkey, just across the border from Syria.
“ISIS basically used Turkey as a rear base," Callimachi says.
The Turkish government eventually came under intense international pressure to clamp down on ISIS. In July, Ankara agreed to a longstanding US request for the US Air Force to use the air base at Incirlik in southeast Turkey to attack ISIS. At the same time, the Turkish military ramped up its own operations against ISIS.
In response, ISIS called for attacks against Turkey, and since then the country has been hit by devastating bombings in Ankara, Suruc and Istanbul. As in the case of Tuesday's attack, ISIS claimed none of those bombings, but Turkish officials faulted the group.
"There's an American proverb, too,” Callimachi says, in reference to the criticism against Erdoğan's handing of ISIS. “Lie down with dogs and you might get up with fleas."