By Navin Bapat and Sean Zeigler.

In the past several weeks, Turkey has breached the sovereignty of two nations on its borders — one of whom is in the throes of a civil war, the other attempting to emerge from one — all ostensibly in the name of defeating the Islamic State (IS). Last month Turkish tanks, backed by US airpower, rolled into Syria in an offensive purportedly aimed at attacking IS positions. Turkey’s actions have now moved into northern Iraq, where it recently announced the killing of 17 IS members. Ankara now has roughly 1000 troops amassed outside of Mosul, with President Erdogan stating that Turkey maintains “a historical responsibility” in the region, presumably justifying their presence in Iraq in order to protect Sunni Arabs and Turkmen in the area.

On one hand, Turkish behavior is consistent with the American goal of defeating IS, even if its presence complicates that effort. On the other hand, Erdogan’s statements and behavior suggest that he is exploiting the threat of IS – and American disdain for Bashar al-Assad – to initiate an opportunistic war on terror. This war is quite intriguing, however, in that Erdogan has invaded two countries to “fight” a terrorist group – the Islamic State – that has been indirectly supported by Turkey and is indirectly serving Turkish interests. Why might Turkey engage in such seemingly contradictory behavior?

In a recent study, we argue that states use the cover of eliminating terrorist threats in order to engage in sovereignty-violating behavior that benefits their own interests. First, states may initiate preventive wars where the goal of using force against terrorists is to prevent militants from consolidating territorial gains, especially in key strategic or resource-rich regions. While Turkey is justifying its behavior as necessary to fight IS, it is by now well established that Turkey’s motives in Syria have more to do with its longstanding fight against the Kurds. Turkey – and the rebels it supports against the Assad regime – are fighting the Syrian Kurdish militia of the Democratic Union party (PYD). Their aim has been to prevent the Kurds from making any territorial gains west of the Euphrates River. The unification of this territory under Kurdish control could potentially empower Kurds within Turkey itself, perhaps enough to reignite a secessionist campaign to create the long desired Kurdish state.

Second, states may initiate predatory wars by invading a neighboring country that is weakened by fighting terrorists within its own territory. In this case, states – under the pretext of fighting terrorists – aim to take control of territories that may enhance their overall power. A secondary implication of this type of conflict is that it offers states an opportunity to kindle unrest across borders and then to subsequently cross those very borders in order to put out fires they helped start. As we argue in our study, “It remains entirely consistent with [our] theory that the very country intending to invade a neighbor on account of terrorist activity may actually be supporting the group in whose name the intervention is justified.”

Turkey’s behavior with regards to IS lines up remarkably well with both types of wars. Ostensibly, Turkey invaded northern Syria to help the American campaign against IS. It remains an open secret, however, that Erdogan’s government has for many years been complicit in the flow of IS and other jihadi fighters into Syria from Turkey. And although IS is known to be a violent organization with veteran fighters, reports indicate that it did not even put up a fight against the Turks, preferring to quietly withdraw its forces to al-Bab and al-Raqqa the day before the attack. Now, with the offensive in Mosul underway and much to the chagrin of the government in Baghdad, Erdogan appears to be using Turkey’s ‘historic responsibility’ to further attack his Kurdish adversaries, and perhaps gain influence over the oil rich regions of northern Iraq. The aim is to forestall any further advances by the Kurdistan Worker’s Party (PKK) and its closely allied PYD party in Syria. This is all done in the name of fighting the very terrorist group that Erdogan helped to cultivate.

Although international norms reject wars of territorial conquest, the presence of IS is providing Erdogan with sufficient cover to engage in an expansionary war. It is therefore unsurprising that the Turkish media is beginning to present a redrawn map of the region, which places both northern Syria and Iraq in Turkish territory. Perhaps more troubling is the fact that there appears to be little the US can do to stop Erdogan, a leader that is only more emboldened after squashing a recent coup attempt at home. Without the use of the air base at Incirlik (in southern Turkey), the US would have considerable difficulty in sustaining its air campaign against IS. Additionally, without a supply line across the Turkish border any remaining ‘moderate’ Syrian rebels would be cut off and vulnerable to the Syrian Army and its supporting militias. The stark reality that the US has little choice but to tolerate Turkish irredentism to fight both IS and Assad portends a very ominous future if and when Mosul falls. If instability continues, Erdogan will have all the justification he needs to maintain the Turkish military presence in the territories he is “liberating.” While IS may soon be defeated, the conflict in northern Syria and Iraq is unlikely to end anytime soon.

Navin Bapat is an Associate Professor at UNC-Chapel Hill and a contributor at Political Violence @ a Glance. Sean Zeigler is a Political Scientist at the RAND Corporation. The views expressed here are his own.