Ever since it woke up to the possibility, the Turkish government’s strategic priority in Syria has been to prevent the formation of a Kurdish corridor along its southern border governed by the Democratic Union Party (PYD), an affiliate of the Kurdish separatist PKK, which has fought Turkey more than 30 years.

When the Turkish military last month entered the northwestern Syrian province of Idlib, largely controlled by the hardline Islamists Hayat Tahrir al-Sham (HTS) and other rebel forces, many assumed the main goal was to isolate the neighbouring PYD-controlled province of Afrin. Yet there are more than traditional national security concerns shaping Turkey’s involvement in Idlib.

Since 2016, Ankara has taken many steps that have both alienated and angered its own Islamist circles; from rapprochement with Israel and Russia, to not doing more to prevent Syrian government forces capturing the northern city of Aleppo to in December last year.

While these groups may be no less vocal about Russian air strikes in Idlib, they are unlikely to be openly critical of their own government’s policies. Turkey’s most prominent Islamist non-governmental organisation, İHH, was once critical of the AKP government and things did not go so well. İHH ended up retracting a public statement. Or there is the example of Ankara-based Salafist preacher Mehmet Pamak, who was detained in March 2017, after a brawl erupted during one of his lectures on the morality of Turkey’s military presence in Syria. There are also semi-regular reports hinting that Ankara may seek a rapprochement with Damascus, which cannot be much comfort to Turkish Islamists either.

Turkish Islamists have been invested, since the start, in the Syrian revolution’s aim of removing Syrian President Bashar Assad from power. While President Recep Tayyip Erdoğan has deftly managed several major U-turn in Turkish politics, any U-turn on Assad might be a breach too far. Erdoğan has been domestically embattled, in one way or another, since 2013. Another blow to his popularity before the critical 2019 elections might be more than the iron man of Turkish politics can handle. Thus, it is possible to see the Idlib operations as being little else than the establishment of forward operating bases on the northern front of Idlib overlooking Afrin.

It is not uncommon for Ankara to say one thing to its domestic audience, and quite another to the international audience. Luckily, Russia seems to have the uncanny ability among Turkey’s allies to hear what it wants, and to hold Turkey to it.

Irrespective of the debate that rages on regarding the extent to which HTS is or is not part of al Qaeda, Ankara had tacitly accepted that HTS was a legitimate hostile target back in the first Astana peace talks in January 2017. Pro-government commentator Nagehan Alçı described HTS as “the Syrian wing of al Qaeda” in August. SETA, a think-tank known for its links to the Turkish government, recently published a lengthy report that accepted the premise that HTS was a continuation of the Nusra Front, which was al Qaeda’s Syrian branch. And Erdoğan himself, only a few days ago, described the Nusra Front as a “terrorist element”. However, there is something deeply “non-standard” about a NATO member country allowing its military forces to be escorted by HTS. As counter-intuitive as it may appear, it is not due to any affection for HTS that Ankara avoids full-blown conflict in Idlib, but rather because any warfare would result in a movement of people Turkey is unwilling to accommodate.

The United Nation’s Office for the Coordination of Humanitarian Affairs (OCHA) has estimated that Idlib’s population is more than 2 million, while the estimates of the Turkish Red Crescent puts the figure at double that. Whatever the truth, the point is that Turkey cannot afford and will not allow another Kobani-like influx of hundreds of thousands of refugees to pour across its border. Not only does the neighbouring province of Hatay already host more than 400,000 Syrians, it is also one of Turkey’s more sensitive provinces due to its unique ethno-religious composition.

With a steadily worsening economy and ever heightened nationalistic rhetoric, the first six month of 2017 saw an unprecedented number of anti-refugee incidents across many parts of Turkey. The Turkish population was told for years that the Syrians were “guests” and were ill prepared for the realities of the permanence of the Syrian communities in Turkey. Patience is wearing thin among many Turks. Despite the number of reports published on the benefits of Syrians to the Turkish economy, the average Mehmet on the street remains unconvinced. Therein lies the age-old thematic with the ruling AKP government: it cannot afford to lose any more support in the run up to the 2019 election year.

That being said, there are more than electoral considerations at play. Turkey has suffered a great number of devastating terrorist attacks in the past few years. Since March 2015, Ankara has continually worked to tighten border security. And there is no effective way to pick out former combatants from a crowd of refugees rushing across a border. This is a valid security concern that the humanitarian world often forgets when advocating for open-borders. Ankara has been implementing a push-back policy towards would-be Syrian refugees since late 2015. A clear example of this policy was seen in February 2016, when some 70,000 internally displaced Syrians amassed along the border in northern Aleppo province. Instead of admitting them into Turkish territory, Ankara built refugee camps for them inside of Syria.

Ankara is acting in accordance with securing its own interests: positioning the Turkish Armed Forces to prevent a possible land-grab by the PYD in Afrin, and maintaining a semblance of stability in Idlib to prevent a large-scale refugee influx. However, between maintaining electoral popularity at home, functioning alliances with the likes of Russia and Iran, and dealing with the international criticism for its interaction with HTS, Ankara is carrying out a rather precarious juggling act. Eventually, something has got to give.