BEIRUT / ABU DHABI // The haggard group of Syrian rebels entered the gun shop in the Turkish town of Ceylanpinar, situated along the border with Syria. Their threadbare clothing suggested the men had little money to spend on the hunting rifles and ammunition on display. Appearing hollow and suspicious, as if still on edge from recent combat, they left the shop quickly without buying anything and continued down the street, walking openly during the day.

This was January 2013. Just a few days before officials had allowed Syrian rebels to transit through Turkish territory and cross into Ras Al Ayn, the town just across the border. Recently abandoned by troops fighting for the regime of Bashar Al Assad, the town was now contested by the Arab rebels and Kurdish fighters.

Along much of Turkey’s border with Syria, towns like Ceylanpinar acted as hubs for Syrian rebels, places where they could rest, resupply and receive medical treatment before returning to battle. So too did they act as the entry point to Syria for foreign fighters.

That many of these Syrians and foreigners were affiliated with Al Qaeda - and later ISIL - didn’t appear to be a security concern for Ankara, which was intent on seeing Mr Al Assad removed from power and Kurdish expansion along its southern border halted.

The contours of Turkey’s controversial Syria policy have been brought into sharp focus after Turkish F-16s shot down a Russian bomber on November 24. As Ankara struggles to maintain influence over the war next door, questions are being asked as to whether its approach has contributed to the destabilising of the Middle East.

“With hindsight it is also now clear that pursuing regime change in Syria happened to be detrimental to Turkey’s interests,” said Sinan Ulgen, chairman of the Istanbul-based Edam think tank and a former Turkish diplomat. “The regional dynamics have moved to the disfavour of Ankara.”

From friend to foe

After assuming power in 2000, Mr Al Assad looked to end Syria’s years-long isolation. Damascus and Ankara signed a free-trade agreement leading to a jump in Turkish exports to Syria from $183 million in 2000 to $1.64 billion a decade later. Visa-free travel was introduced and the number of Syrian visitors to Turkey grew nearly nine-fold between 2002 and 2008.

The friendly ties were short-lived. When anti-government protests broke out in Syria in 2011, Ankara quickly looked to mediate and encouraged Damascus to reform, but soon became appalled as security forces slaughtered protesters. As the protests slipped into war and thousands of refugees flooded across the border, Turkey recalculated. President Recep Tayyip Erdogan, then prime minister, looked around and saw a Middle East caught in the momentum of the Arab Spring and an optimism that Mr Al Assad would be quickly overthrown. Ankara also saw an opportunity to increase its regional clout and have a role in the kingmaking of a new Syrian leadership. Quickly, Turkey became a key adversary of Mr Al Assad, backing the rebels seeking his removal.

“For the Turkish government, their Syria policy has been based on a very simple action: Everyone fighting Assad should be supported,” said Faruk Logoglu, a former Turkish ambassador to Washington.

Rise of the extremists

Efforts to unseat Mr Al Assad had stumbled by the end of 2012. Across the country, rebel gains halted as the Syrian government, reinvigorated and backed by fighters and advisers from Iran and Hizbollah, held the line.

The Free Syrian Army, whose leadership was based in Turkey, started fracturing. Ammunition and weapons — especially anti-aircraft weapons that could deter the daily onslaught by government fighter jets and helicopter gunships — were always in short supply. Western nations discouraged other states supporting the rebels from handing over advanced weapons, ever fearful that they could end up in the hands of extremists.

It wasn’t long until hardline groups became the most effective rebel forces on the battlefield and the best funded, with backing from both governments and private citizens. As such groups saw their influence — and their ammunition stores — rise, other rebels abandoned moderate units and joined them.

“In order to get a win, he [Erdogan] needed to increasingly support more radical militias,” said Joshua Landis, director of the University of Oklahoma’s centre for Middle East studies. “And he did that, without too much hesitation. He went down that road of just figuring that we need to get rid of Assad, whatever the price, even if it means backing more Salafist militias.”

By the time ISIL declared its caliphate last year and Ankara made attempts to better control its border after immense international pressure, foreign fighters had long been joining the group by passing through Turkey, with the country seemingly turning a blind eye to the influx.

Even as the world watched in horror as ISIL captured much of eastern Syria and then much of western Iraq, Turkey kept focused on removing Mr Al Assad from power, viewing the spread of extremism as a symptom of the Syrian government’s survival.

To Ankara “as long as Assad remains in power” ISIL and other extremist groups will exist “because it is the lawlessness of the Assad regime that has nurtured the Islamic State,” said Mr Ulgen.

The old enemy and the new

In July, Turkey announced that it was launching a two-pronged war on threats that were increasingly described as equal: ISIL and the PKK.

The Kurdish militants had resumed their insurgency in south-eastern Turkey after a two and a half year hiatus and Turkey also said it acknowledged the threat posed by ISIL, blaming the group for multiple attacks inside the country including an October 10 suicide bombing in Ankara that killed 103.

The two battles were approached with strikingly different strategies. While bombing runs and gun battles have been a daily occurrence against the PKK, Ankara’s action against ISIL — including much touted plans to forge an ISIL-free zone in northern Syria — is less clear.

“Turkey sees the PKK as a bigger threat than ISIS … Turkey has been fighting Kurdish insurgencies since the mid-19th century and those insurrections have threatened Turkish national security at times,” said Akin Unver, an assistant professor of international relations at Istanbul’s Kadir Has University.

A Turkish official said that Ankara’s military actions against ISIL take place within the framework of the US-led coalition against the group and Turkey allows coalition jets to use its Incirlik airbase to launch missions against ISIL. The official also said that since the autumn of 2014, Turkey has provided “logistical and training support ” to security forces of the Kurdistan Regional Government (KRG), the autonomous governing body in northern Iraq, which is fighting ISIL. Long-time allies of Turkey, the KRG is often at odds with the PKK, though they have also co-operated against ISIL.

The PKK’s latest uprising comes at a time when right across the border the YPG — their sister organisation in Syria — has captured much of the land along the Syria-Turkey border. The group is fighting ISIL backed by air strikes from the US-led coalition. The YPG’s success is the biggest accomplishment of any PKK-affiliated group since the PKK was founded nearly four decades ago and Turkey worries that a de facto PKK state on its borders would prove to be a major threat.

Ankara has seen its foreign policy driven by the Kurds in the past, such as when the country threatened to invade Syria in 1998 as Damascus harboured PKK leader Abdullah Ocallan.

Ankara believes that the Kurds want to establish a “corridor” from northern Iraq to the Mediterranean Sea, Mr Logoglu said. “This poses a danger not only to Turkey but also the territorial integrity of Syria.”

In an attempt at containing the YPG’s gains, Turkey earlier this year warned YPG forces not to push their offensives west of the Euphrates river. In the past — like in Ras Al Ayn — Turkey facilitated Arab groups opposing the YPG to enter the battlefield.

Saleh Muslim, the leader of Syria’s most dominant Kurdish faction, said Turkey aimed to change the “demographic” in northern Syria to be more Arab and less Kurdish. “Turkey has its own special politics that are different than others,” he said. The feeling among Kurds is that part of the reason why Turkey for years turned a blind eye to foreign fighters transiting through its territory to join extremist groups in Syria was that they would simply help limit Kurdish gains and hopefully help quicken the fall of Mr Al Assad.

“I think from an early stage, Turkish policy [on Syria] was being driven in increasing measure by the primary concern of dealing with what they saw as a growing Kurdish challenge,” said Yezid Sayigh, a senior associate at Beirut’s Carnegie Middle East Centre. “By allowing foreign fighters — including foreign jihadis — into Syria, I think they were simply continuing that same basic calculation that all of these people are going to be anti-Kurdish — anti-PKK — so by letting them in, we’re keeping pressure on the Kurds.”

Mr Ulgen said that today the Turkish priorities of containing the Kurds and removing Mr Al Assad carried “more or less equal weight.”

“Ankara also wants to constrain and eliminate” the ISIL threat, he said, but believes doing so may not be possible with Mr Al Assad in power.

A growing confrontation

A 17-second airspace violation saw a Russian Su-24 bomber shot out of the sky by Turkish jets, bringing Russia into confrontation with a Nato country and further complicating the war.

Russia’s military intervention in Syria, which began on September 30, threw a formidable wrench into Turkey’s ambitions of removing Mr Assad from power. While entering the conflict under the pretext of combating ISIL and other extremist groups, Russia had mainly targeted rebel groups who were fighting the Syrian regime, among them units backed by Turkey, the West and Gulf Arab states.

“Russia’s arrival into Syria practically undid everything Turkey tried to accomplish since the beginning of the civil war there,” said Mr Unver.

Turkish officials said the decision to shoot down the jet came after multiple diplomatic warnings to Russia over prior airspace violations and requests via radio that the pilots of the doomed aircraft change course as it approached the border.

Moscow responded by engaging in a harsh war of words, saying oil from ISIL territory is sold in Turkey and that the oil trade directly involved Mr Erdogan and his family, implying the proceeds funded the group.

Russia also deployed an S-400 anti-aircraft missile system to its airbase in Syria’s Latakia province. With a range of 400 kilometres, it can hit aerial targets across nearly all of Syria, much of southern Turkey and even as far away as Israel.

“The Russians are successfully instrumentalizing this jet issue to legitimise their presence in Syria and they are regularly bombing any movement or action close to the Turkish border,” said Gokhan Bacik, an international relations professor at Ankara’s Ipek University and Turkish foreign policy expert.

While Turkey may have miscalculated Russia’s reaction, shooting down the jet served as a reminder that Turkey is a powerful neighbour of Syria and still plays a key role in the conflict, especially amid a fresh push for talks that could bring about a political solution to the war.

“Turkey still has a degree of influence over the dynamics of the country,” Mr Ulgen said. “What it can do is incentivise some of the opposition groups to fully participate in the political process.”

Turkey’s action could also be an attempt to disrupt Russia’s diplomatic moves. Moscow’s intervention in Syria came at a time when Europe has seen waves of refugees arriving and fears of terrorism spiking. As the conflicts of Syria and Iraq arrived on Europe’s doorstep, there has been a greater willingness by western powers to consider a Syria where Mr Assad remains part of the picture.

“Turkey was trying to shut the door on Russia’s attempts to draw Europe into supporting the notion that Assad could be an answer, could be a partner, in the war against ISIS,” said Mr Landis. “So in a sense by shooting down a Russian plane, it was forcing Europeans to decide whose side they were on: Turkey’s or Russia’s.”

foreign.desk@thenational.ae​