This article originally appeared here on Politico.com on Tuesday, November 24, 2015.

To Westerners, it might seem that Vladimir Putin was exaggerating in anger when, after a Turkish F-16 on Tuesday shot down a Russian fighter jet allegedly violating Turkish airspace, he referred to the government in Ankara as “terrorists’ accomplices.”

Americans aren’t used to thinking of Turkey—our NATO ally and most powerful backstop in the Muslim world—in this way. And surely Putin is just engaging in some saber-rattling. But as Turkey and Russia dispute the incident, it is casting a spotlight on one of the most troubling developments in the evolving struggle in the Middle East: When it comes to fighting the Islamic State and extremism more generally, Turkey—and President Recep Tayyip Erdogan—has become a significant part of the problem, rather than part of the solution.

You wouldn’t know this from the official rhetoric. NATO is standing firmly by Turkey in the wake of Tuesday’s incident. And the Obama administration often trumpets the critical importance of Turkey’s participation in the international coalition to counter ISIL. Brett McGurk, the special presidential envoy for that coalition, told Turkey’s Hurriyet Daily News this summer that the United States “can’t succeed against Daesh [the Islamic State] without Turkey.” And after a bloody two weeks—during which ISIL claimed credit for the Paris shooting and bombing spree, the killing of 43 people in another bombing in Beirut and the downing of a Russian airliner over the Sinai Peninsula—Erdogan, an Islamist who runs a country that is 99.8 percent Muslim, appeared with President Barack Obama ahead of the G-20 summit in Antalya and spoke firmly against jihadism: “We are confronted with a collective terrorism activity around the world. As you know, terrorism does not recognize any religion, any race, any nation or any country. … And this terrorist action is not only against the people of France. It is an action against all of the people of the globe.”