After incidents earlier this week of Kurdish YPG forces coming under fire in the northern Syrian town of Tel Abyad from across the border in neighboring Turkey, Turkish President Recep Tayyip Erdogan advised Kurds to “pull yourself together” because more attacks are coming if they attempt any further gains against ISIS.

Much of Turkey’s involvement in the Syrian Civil War has been informed by its anti-Kurdish policies, initially abandoning a long-time alliance with President Assad in hopes that the Sunni Arab-dominated nationalist rebels would clamp down more on the Kurdish northeast. As the war has dragged on, however, the Kurds have amassed considerable territory of their own, and have become the go-to ally for many against ISIS, much to Turkey’s chagrin.

Increasingly bellicose in the lead up to Turkish elections, President Erdogan has increasingly positioned the nation as the military guarantor of ISIS, railing simultaneously against Russia and the US for baking various anti-ISIS measures they see as benefiting the Kurds.

The justification for the policy is the belief that an autonomous Syrian Kurdistan would add to secessionist ardor in Turkey, where the military is already at war with the Kurdish PKK. While this may ultimately be the case, Turkey’s commitment to military force of arms to ensure that towns like Jarabulus remain in ISIS hands can’t help but be costing them diplomatic standing.