As the Kurdish Peshmerga advances deeper into ISIS held territory, Turkish President Erdogan’s tacit support for Sunni rebels in Syria is becoming clearer, as his government’s concern over the establishment of a Kurdish state grows.

Turkey and Syria share approximately 900 kilometers of border, with 11 border crossings. On June 28, six of these were controlled by Kurdish groups, two were controlled by ISIS, two were controlled by the Free Syrian Army groups and one still remained in the hands of the embattled Syrian government, with a mere 27 kilometers of border. The border appears to be as porous as a sieve. Many people, from teenagers from the western countries to hardened jihadists, appear to cross back and forth between Turkey and Syria from all sides. I recall in the first Gulf War, even a man and donkey crossing from Syria into Turkey would be picked up and recorded as an incident by the border forces, although local smugglers have always been part of the local economic activity. There are claims in the Turkish media that many wounded in the Syrian conflict are treated in hospitals in Turkish border towns, and the wounded come from almost all groups fighting in Syria. After treatment, they appear to go back to the battlefield. This alone shows how messy and confusing things are in that pocket in northern Syria.

This week saw a surprise attack by ISIS on the Syrian border town of Kobani, which was in the control of local Kurdish militia. There were claims that some of the ISIS forces were allowed to sneak back into Kobani from Turkey. Before looking at these claims, a brief look at the relationship between Turkish and Syrian governments would help us to understand how this mess was created in the first place.

In August 2008 Syrian Leader Bashar al-Assad and his family had a one-week holiday in the Aegean Turkish resort town of Bodrum, accompanied by the Turkish Prime Minister at the time, Recep Erdogan and his family. The communiqué after the talks between the leaders read ‘the parties discussed the stability of Iraq, Kirkuk, Palestine and other regional issues and agreed that ‘their approaches are similar.’ In October 2011, the then Turkish foreign Minister Ahmet Davutoglu said ‘I have been to Syria 61 times. On the last visit we agreed on a 14-point road map which included free elections, increased freedoms and recognition of Kurdish ethnic groups but they did not do any of it.’ In September 2012 Erdogan said the Assad regime would soon collapse and they would be praying in Damascus within months, if not weeks. Assad has accused Erdogan of running a sectarian war in alliance with Qatar and Saudi Arabia, an accusation based in reality and deriving from Assad’s connection to the Shiite Muslim Alawite sect and Erdogan’s association with Sunni Islam.

Assad remains in power, although his power base has been considerably diminished by four years of civil war. Erdogan also remains in power however his political party AKP has just come out of an election significantly weakened. Mistakes made by Erdogan and AKP in the international arena were partly blamed for the poor election result. In Syria, like in Iraq and Egypt, Erdogan seems to have snookered himself by committing so strongly to the removal of Assad so early in the civil war and at all costs, even if it meant supporting the extremist Sunni Islamist groups the West is now fighting against. He believed that the free Syrian army would topple the Syrian regime quickly and a new government controlled by Sunni Arabs would be formed and would be an ally of Turkey in the Middle East. This, he believed, was particularly important to balance the influence of Iran and Iraq with a Shiite dominated government. But things did not go according to the plan. He never thought the war would last so long and create so many refugees. The opposition Free Syria Army, which was mostly made up of Islamist groups that have been fighting more with each other than against the Syrian government forces, struggled to make significant gains for years. Meanwhile, almost out of nowhere, a Sunni extremist Islamist group, ISIS, emerged and, within months, made significant gains in Syria and Iraq, shocking the world with their cruelty and outrageous executions of anyone who opposes them theologically, ethnically or politically.

After the ISIS attack in Kobani last week, President Erdogan and Prime Minister Davutoglu strongly denied claims that Turkey is helping ISIS, and labelled these claims as obscene. However, Erdogan threatened that Turkey would not allow an independent Kurdish state in the north of Syria along the Turkish border and would stop it at all costs. He accused Kurdish forces of ethnically cleansing local Arabs and ethnic Turkmens in the region. Kurdish groups deny this allegation. Public opinion in Turkey and all the political parties, including the nationalist MHP, are strongly opposed to involvement in Syria and accused AKP of secretly providing help to the ISIS and Al Qaida linked groups such as Al-Nusra Front.

In Turkey, the pervasive view of the public is that if Assad loses power, he will be replaced by one of the Islamist groups that are no less fanatical than ISIS and that therefore a stable, inclusive government in Syria is impossible. The current refugee crisis, with approximately 2 million Syrian and Iraqi refugees currently in Turkey, would only increase further should Assad fall. Erdogan knows very well there is no public support. Most significantly, the Turkish Army, whose relationship with Erdogan could hardly be described as warm, is openly reluctant to do anything that will mean going to war in Syria. Any operation directly against the Kurds would also have the potential to lead to a confrontation between Turkey and the US, as it would give ISIS an advantage. The very secular Turkish army remains ideologically opposed to helping ISIS or other Islamist groups triumph in Syria. The current government has authority granted by the parliament on 4 October 2014 to engage, if need be, in cross border operations for a period of 12 months. However, the current Chief of Staff of Turkish Armed Forces General Ozel is expected to retire in August, and a Turkish incursion into northern Syria is not likely in the short term, bar a spectacular event on Turkish soil. In the Middle East, it is not so much going in, but coming out that is the problem.

Sedat Mulayim is the Program Manager for The Translating and Interpreting at the School of Global, Social and Urban Studies at RMIT University. This article can be republished with attribution under Creative Commons Licence.