Five Islamic State (ISIS/ISIL/IS) jihadists attempted to take advantage of the open Akçakale border crossing between Turkey and Syria to escape Kurdish forces in the latter, only to be arrested on the other side by the Turkish government. The ISIS contingent on the Syrian border is in disarray, as Kurdish forces have officially retaken the pivotal town of Tal Abyad.

Turkish newspaper Hurriyet reports that the terrorists were among a group of thousands of Syrian refugees fleeing the fighting in Tal Abyad, which had been ISIS-controlled for more than a year. The men waited for an opportunity to cross through the broken barbed wire fence that once sealed the border and were immediately arrested upon arriving in Turkey.

A chaotic scene developed at the Akçakale gate this week as thousands fled the fighting between ISIS and the Kurdish People’s Protection Units (YPG), which have taken over Tal Abyad. Turkey had closed the border crossing on June 12, citing the lack of a “humanitarian crisis” on the other side of the border and promising to open it should any tragedy necessitate flight by refugees. Three days later, dramatic images of Syrian refugees bursting through the barbed wire fence, tossing infants over the border, and breaking through into Turkey circled the world, and Turkey reopened the fence. An estimated 2,500 people have crossed from Syria into Turkey on Monday.

Tal Abyad, the Kurdish forces say, remains uninhabitable despite the Islamic State’s flight. Haqi Kobane, a commander of Kurdish forces, told the Associated Press that the troops’ work will now focus on “clearing booby traps and mines” in the town. The town’s recapture will make it much more difficult for the Islamic State to smuggle jihadists and foreign jihadi wives from Turkey into Syria, as they would have to cross Tal Abyad to get to Raqqa, the “capital” of ISIS.

The ISIS defeat has done little to satisfy the Turkish government, however, which is loudly opposed to any advances by Kurdish forces. The YPG, the Turkish government claims, is too closely affiliated with the Kurdistan Workers’ Party (PKK), a terrorist group that has been attacking Turkey targets for years with the objective of forming an independent Kurdish nation. Turkish officials are so incensed by the victory that they are accusing Kurdish soldiers of ethnic cleansing in the town. “This time the people of the bombed places were ethnically cleansed by the PYD and YGP, as well as ISIS, these are strange relationships and alliances… We are seeing signs of work that is underway on a formula to bring together the cantons,” said Deputy Prime Minister Bülent Arınç of the affair. The “cantons” he refers to are areas of what would become a free Kurdistan, according to the theory that this is what the YPG is seeking to create.

Turkey’s condemnation of a victory against ISIS follows accusations spanning more than a year that the Turkish government has aided the terrorist group, as ISIS, too, opposes the leadership of President Bashar al-Assad in Syria. An anonymous Islamic State terrorist told media outlets in 2014 that Turkey had shown the group “affection,” without which it would have been nearly impossible to achieve its conquests throughout the year. More recently, a report claimed that trucks full of ammunition were stopped heading to ISIS-held territories in Syria from Turkey. The accusation is part of a larger case in which 50 individuals are being accused of conspiring against the government of President Recep Tayyip Erdogan, in part due to their attempt to stop this shipment, one of several disclosed during the trial.