With Russia to its north looking to reestablish its empire and terrorists to its south bent on creating an Islamic caliphate, Turkey should have every reason to look west. But under the reign of President Erdogan, Turkey has undergone massive shifts in its foreign policy that NATO has yet to respond appropriately to or even fully appreciate.

If you’re wondering what Erdogan’s current thinking is on Turkey’s relationship with NATO, look no further than his reaction to a failed coup attempt against him in mid-July. In the immediate days that followed the coup attempt, Erdogan spread rumors that the U.S., a fellow NATO member, was behind it and cut off power to the Incirlik Airfield, an airfield that has been critical to U.S. efforts to stage air campaigns against ISIS. Power was eventually restored, but the relationship between these two NATO countries has not recovered as quickly. In the months that followed, Erdogan, who has led the country either as president or prime minister since 2003, suspended or fired over 100,000 judges, police, teachers and soldiers. Erdogan also recalled 149 of Turkey’s military envoys to NATO, most of whom were arrested and imprisoned upon their arrival back in Turkey. Ostensibly, these envoys’ very association with NATO made them guilty of treason in Erdogan’s mind. Such is the lack of trust he has for the NATO alliance.

Over the last few years, one of the biggest threats to NATO members has been ISIS. As a NATO partner on the frontlines of Iraq and Syria, Turkey, perhaps more than any other member of the alliance, has the ability to effectively reduce the strength of ISIS, but Turkey’s actions against ISIS have been frustratingly slow. For years, Turkey was known as the key transit point for foreign fighters who wanted to travel to Iraq and Syria to fight for ISIS. It was not just people that Erdogan let through, but weapons too. According to a prosecutor and court testimony, during late 2013 and early 2014, Turkey’s state intelligence agency helped deliver arms to ISIS. After four trucks full of rocket parts, ammunition and semi-finished mortar shells were seized by police in southern Turkey, intelligence officials accompanying the cargo threatened police and physically resisted the search, forcing the police to allow three of the trucks to continue into Syria. Erdogan later would comment that the trucks were carrying aid and had those who conducted the search detained. Launched this past August, “Operation Euphrates Shield” was supposed to be Turkey’s way of showing NATO that it was finally serious about fighting ISIS. But beyond clearing a town controlled by ISIS on the Turkish border, the military operation has been more focused on slowing the progress of Kurdish forces who have been beating back ISIS rather than truly targeting ISIS. Turkey, it turns out, still does not view ISIS as a significant threat, regardless of the effect ISIS is having on its fellow NATO members.

There is more troubling news. Just ten months after Turkey shot down a Russian fighter jet that had encroached upon Turkey’s airspace, Erdogan and Vladimir Putin met in Moscow on August 9 and seemed to have buried the hatchet as they emphasized their desire to rebuild ties and called each other “dear friend” and a “valued ally”. If this summit meeting does indeed presage a real rapprochement between Ankara and Moscow, it would represent a dangerous new threat to NATO. After all, it is no secret that Putin wants to weaken Turkey’s attachment to NATO.

Turkey is its own sovereign nation. It has the freedom to pursue whatever alliances and foreign policy objectives it sees fit. However, NATO must be clear to Erdogan about the consequences of his decisions. From military cooperation to intelligence sharing to having a seat at the table about the future of the region, there are still many ties that bind NATO and Turkey together. But Erdogan has frayed these ties, and NATO must wake up to the fact that someday soon Erdogan could cut them altogether. Before that day comes, NATO must be ready. And that’s just the way it is.