When a Russian Su-24 jet was shot down by Turkish F-16s, Russian President Vladimir Putin reacted furiously. He called the attack a “stab in the back delivered by the accomplices of terrorists,” and accused Turkey of supporting Islamic State.At first blush Putin’s outburst seems ludicrous.After all, Turkey is a pillar of the NATO alliance. There is nevertheless a core truth in Putin’s accusation: Turkish policy contributed to the rapid growth of Islamic extremist groups in Syria, and Turkey remains as much a part of the problem as the solution.Turkey and Syria share a long border, and from the beginning of the conflict the Turkish government looked the other way as foreign jihadists flooded in on their way to Turkey. The so-called “Gateway to Jihad” – a small stretch of mountainous border between Turkey and Syria along the Orontes River – shows how this works. As foreign jihadists flooded through the area in 2014, Turkish soldiers literally ignored them as they crossed into Syria. Britain’s Sky News even found documents demonstrating that Turkish officials stamped passports of foreign militants seeking to cross the Turkey border into Syria to join Islamic State (IS).IS publicly acknowledged Turkey’s support, with a senior commander boasting that “most of the fighters who joined us in the beginning of the war came via Turkey, and so did our equipment and supplies.”Another former IS member also highlighted how foreign jihadists could travel openly through Turkey on the way to the Syrian border.One particular incident elucidates Turkey’s murky role enabling extremists. Three trucks belonging to Turkey’s National Intelligence Service (MIT) carrying weapons were stopped by local gendarmerie officers after they received a tip the trucks carried weapons for al-Qaida and IS in Syria. MIT pulled rank on the local police, and the cargo went through, but the Gendarmerie General Command retaliated by writing a report stating that “the trucks were carrying weapons and supplies to the al-Qaida terrorist organization.”However, rather than addressing its support for extremists, the Turkish government covered up this incident. After hackers leaked documents related to the scandal, a media blackout was imposed on the case, and a criminal case started against the very gendarmerie who tried to stop the weaponry from being delivered to al-Qaida and IS. When Turkey’s opposition party tried to initiate an inquiry into IS’s activities in Turkey, parliamentarians from Turkish President Recep Tayyip Erdoğan’s ruling party, AKP, quickly shut it down. Although Turkey has long denied it supports IS or other extremist groups, Ankara’s ties to these groups are not exactly a secret in Washington. The West first raised concerns with Ankara in 2012 that foreign jihadists were using Istanbul’s airport as a way station to join the fight in Syria. Throughout 2014, Obama administration officials pushed Turkey to stop enabling militant groups in Syria, and in a speech at Harvard Vice President Joe Biden publicly blamed Turkey, Saudi Arabia and the UAE for the rise of IS, saying “those allies’ policies wound up helping to arm and build allies of al-Qaida and eventually the terrorist Islamic State.”Any doubts Western officials harbored about Turkey disappeared in May of last year when American special forces raided the compound of an IS leader in eastern Syria. The raid delivered a treasure trove of documents and flash drives that one senior Western official described as “undeniable” direct evidence of links between senior IS leaders and the Turkish government. “The links are so clear that they could end up having profound policy implications for the relationship between us and Ankara,” the Western official concluded.An obvious question is what would make a NATO ally like Turkey support terrorist groups like IS? First off, after Assad cracked down on peaceful demonstrators in 2011, the Syrian president entered Erdogan’s crosshairs. While Erdogan is not himself an IS-style extremist, as a key Sunni leader he is determined to see Assad gone – and as a result supported many Sunni Islamist groups fighting the Assad regime.Turkey also places a high priority on preventing any movement toward an independent Kurdish state. As part of its anti-Kurdish policy, Ankara determinedly opposes the main Kurdish force in Syria, the Peoples’ Protection Units or YPG. For this reason, Turkey arguably views IS – which has fought bitter battles with the Kurds across northern Syria – as a tool to prevent Syria’s Kurds from establishing an autonomous region in Syria’s north along the Turkish border. In one particularly egregious instance, when IS besieged the northern Syrian town of Kobani – threatening to slaughter thousands of its Kurdish residents – Turkish tanks and infantry simply watched from across the border and did nothing to intervene.Furthermore, even though in July Turkey finally gave in to intense American pressure and began to confront IS, Turkey still assigns far great weight to its fight against the Kurds. For example, in August the YPG looked set to seize the final 97 km. of IS-held territory along the Syrian side of the Turkish border, the key remaining part of the terrorist group’s supply chain through Turkey.Although this would deal a grievous blow to IS, Turkey called Kurdish control of this stretch of territory a “red line,” even threatening to intervene militarily against the YPG should it cross “West of the Euphrates.”Moreover, for several days in late October Turkey made good on this threat, striking Kurdish positions in northern Syria, despite the fact that the US sees Kurdish fighting groups as the key local force able to take on IS.To be clear, Turkey is just one of many countries which enabled the rise of IS and other extremist groups in Syria.Turkey did not begin the war in Syria, and it was Assad’s brutality that turned Syria into a breeding ground for extremists. Washington policymakers would nevertheless do well to keep one point in mind: as the sordid history of Turkish-IS ties demonstrates, in the Middle East nothing is as straightforward as it seems.The author is a former State Department project officer involved in managing economic reform projects in the former Soviet Union. He currently contributes to a number of foreign policy-focused media outlets and tweets at @ jkc_in_dc.