Turkey’s recent flirtation with Russia, by mending fences, is designed as a signal to the United States, its major NATO benefactor, that Turkish ire is up over perceived lukewarm Western support for its broad domestic crackdown after the recent failed coup attempt. In addition, the Turks are angry that the U.S. government has not quickly extradited Fethullah Gulen, who lives in self-imposed exile in Pennsylvania and whom they accuse of fomenting the coup. The excessively wide purge in Turkey—resulting in the firing of 60,000 military, judicial, governmental, and educational personnel and the arrest of 16,000 alleged coup participants—has been designed to get rid of Gulen supporters in key positions.

Mevlut Cavusoglu, the Turkish foreign minister said that NATO hadn’t satisfied Turkey and that it needed to look elsewhere—read Russia—for more defense cooperation. Yet U.S. ambivalence toward the coup and President Tayyip Erdogan’s subsequent crackdown is justified. Although a military coup is almost never a good thing, the massive purge by Erdogan, already demonstrating prior autocratic tendencies, will skew Turkey toward authoritarianism anyway. And U.S. extradition of Gulen back to Turkey without hard evidence that he had engineered the coup would violate the rule of law, which the United States still has but which is rapidly eroding in Turkey.

Even before the coup occurred, Erdogan had rekindled the civil war with Kurdish separatists in Turkey’s southeast to overcome his own weakness in an election. In addition, over recent years, Turkey has been a bad U.S. ally by allowing radical Islamist fighters (including those of ISIS and al Qaeda), their military supplies, and funds to flow across its southern border and into the Syrian civil war; Erdogan has been trying to overthrow Syrian President Bashar al Assad, a former friend.

Also, although Russia has been accused in Syria of targeting moderate rebels opposing its ally Assad, instead of bombing ISIS, the Turks have received no public criticism from the United States for doing something similar. Syria’s Kurds have been one of the few groups in that country to fight ISIS, but the Turks have put a higher priority on bombing them than on fighting that brutal organization.

Only recently, after ISIS began attacking targets in Turkey did the Turks tighten controls on a still porous border and allow the United States to bomb ISIS in Syria and Iraq from the Incirlik air base in southern Turkey near the Syrian border.

Turkey is flirting with Russia because it is unhappy with the United States, much as backwater developing countries tried to play off the two superpowers against each other during the Cold War. Turkish-Russian relations sank to a new low when the Turks shot down a Russian military jet, which was supporting Assad in the Syrian civil war. In response, Russia imposed sanctions on tourism to Turkey and on Turkish exports to Russia. However, now that Erdogan has apologized for the aircraft downing and made a visit to Russia, the two powers are snuggling closer together with increased military cooperation.

This development should probably not bother Washington as much as it probably will. If the United States didn’t want to continue to run the world and didn’t regard leading the obsolete NATO alliance as one way to do it, the Turks would soon discover that they needed the United States a whole lot more than the U.S. needed Turkey. Turkey lives in a bad neighborhood and doesn’t get along with Assad in Syria, has potential conflicts with the Shi’i governments in Iraq and Iran (Turkey is Sunni), and despite its recent rapprochement with Russia, has had centuries of conflict with that large, close, and traditionally imperial neighbor. However, Syria is not strategic to the faraway United States, and thus Turkey’s Incirlik base is not as vital as it seems. Unlike an al Qaeda that focused on attacking the “far enemy” (the United States), ISIS initially concentrated on attacking the “near enemies” near Iraq and Syria. ISIS didn’t begin beheading Westerners or accelerating attacks on European targets (ISIS has a difficult time directing attacks in the United States) until the U.S.-led coalition (including European nations) began bombing it in the Middle East.

Thus, the United States would have a lot more leverage on Turkey if didn’t care as much about running the world through NATO or meddling in the distant Syrian civil war.