Two weeks after the failed coup and President Recep Tayyip Erdogan’s subsequent mass purge, three facts seem clear. Turkey has ceased to be a democracy in any conventional sense. The army’s reputation and cohesiveness have suffered a massive blow, with uncertain consequences for its operational effectiveness. Most importantly, Turkey’s foreign policy and regional security strategy will become more difficult to predict and less amenable to Western interests.

The military that has long served as a trusted unifying force for the country is deeply divided, diminished and discredited. Hundreds of its senior officers are under arrest. Almost 1,700 have been dishonorably discharged, including 40 percent of all active-service generals and admirals. That once staunchly Kemalist army, which had been for nine decades one of the key institutions of the Turkish state and society, is gone. It is likely to emerge from the purge as a pliant instrument under Erdogan’s direct control—a hundred reliable colonels have already been promoted to generals—and not a suprapolitical institution accountable to the prime minister’s office as before. This change requires a constitutional amendment, which may well pave the way for the new constitution which would grant Erdogan unprecedented executive powers.

Some operational consequences of the purge are already apparent. James Clapper, the U.S. director of national intelligence, said on Thursday at the Aspen Security Forum in Colorado that it is hindering Turkey’s cooperation in the U.S.-led fight against Islamic State. He and head of U.S. Central Command General Joseph Votel said that many Turkish officers who cooperated with the American military in anti-ISIS operations have been removed or jailed. The future of the key Incirlik Air Base, from which the U.S. conducts attacks against Islamic State targets in Iraq and Syria, is uncertain. Already last year security concerns caused Air Force commanders to restrict movement of U.S. personnel to a small area surrounding the base. This year the voluntary departure of family and dependents became mandatory. Air attacks were temporarily suspended or reduced following the coup, the base was left without power for almost a week, and its commander was taken off the premises in handcuffs. Of immediate concern was the fact that some 50 B-61 hydrogen bombs are stored in Incirlik’s underground vaults, NATO’s largest nuclear storage facility. Having those 170-kiloton weapons in a volatile region, with many of the trusted officers in Turkey’s military purged or jailed, and Erdogan in full charge in Ankara, presents a security risk. To put it mildly, as former NATO Supreme Allied Commander James Stavridis did in a Foreign Policy article on July 18, “this poses a very dangerous problem”:

Unfortunately, it is likely that the military in the wake of the coup will be laser-focused on internal controversy, endless investigations, and loyalty checks—and simply surviving as an institution. This will have a chilling effect on military readiness and performance. While some operations have resumed at the crucial Incirlik Air Base, cooperation is already frozen across many U.S. and NATO channels.

General Votel confirmed at Aspen that normal operations have resumed at Incirlik, but he expressed concern about the purge’s “longer-term” impact on future operations. He mentioned, without elaborating, other “frictions” in the U.S.-Turkish relationship that are impacting U.S. operations. One important source of “frictions” is Erdogan’s demand for the extradition of Pennsylvania-based cleric Fethullah Gülen, whom he accuses of masterminding the coup. On July 25 Turkey’s foreign minister Melvut Cavusogly warned that Ankara’s ties with Washington would suffer if the United States does not extradite him. In addition, several reports in Turkish papers supportive of Erdogan claimed that the United States was directly involved in preparing and financing the coup. This prompted an angry denial from President Obama last week, but the Gülen issue will present a major legal and political challenge in the weeks ahead.

It is obvious that if Gülen was in some way involved—and Erdogan has not furnished any hard evidence thus far—his actions would have been known to the U.S. On July 26 Turkish Justice Minister Bekir Bozdag went so far as to assert that Obama knew Gülen “carried out this coup” and that he was sure American intelligence knew it as well. Regardless of eventual outcome, such language does not bode well for the future of U.S.-Turkish relations. In addition, in today’s Turkey the ageing imam would not get a fair trail, and Washington’s response to the extradition request may be impacted by repeated warnings that Turkey may reintroduce the death penalty for some of the coup plotters.

In short, Gülen will not be flown to Istanbul and Erdogan may show his dissatisfaction with the U.S. in several ways. He may accelerate the rapprochement with Russia, which had already started three weeks before the coup with his apology over the shooting down of a Russian plane last November. There are signs that this is already happening. Russia “isn’t just our close and friendly neighbor, but also a strategic partner,” Turkish deputy prime minister Mehmet Simsek said in Moscow last Tuesday, while announcing that Erdogan will come for talks with President Putin in St. Petersburg on August 9. “Today, we are here to normalize the situation and our relations as soon as possible and at an accelerated pace.” As Putin’s spokesman Dmitry Peskov commented, the two leaders “will definitely have a lot to talk about.”

In the standoff with Erdogan Putin has won. His key weapon, in addition to the billions of dollars of tourist revenue Turkey needs, was the fact that both Russia and the United States support the Kurds in Syria, albeit for different political and military reasons. Putin’s price for improved relations (and possibly ending his support to the Syrian Kurdish People’s Protection Units, YPG) is likely to include Ankara softening its position on the future of Syria’s president Bashar al-Assad. This may not be such a bitter pill for Erdogan to swallow. His primary objective is to strengthen his control at home, and his Syria policy has never been popular; it is widely felt to have reached a dead end, with the failure of the insurgency to coalesce into a credible alternative to Assad; “In addition, the steady rise of Syrian Kurdish groups aligned with the Kurdistan Workers’ Party, or PKK, has become a major concern for Turkish officials, and some have argued that this will prompt a recalibration of Erdogan’s Syria policy.” He can present a more conciliatory attitude to Damascus as a pragmatic move necessitated by Turkey’s overriding national interest in preventing the rise of an autonomous Kurdish entity on the country’s southeastern border.

Strategic changes resulting from Erdogan’s successful countercoup necessitate an acceptance in Washington that the result cannot and will not be overturned. This may not be easy for the proponents of “values-based” diplomacy, but the alternative is to push Erdogan into a position of outright hostility. Turkey is no longer an “indispensable ally of the United States” (as Paul Wolfowitz memorably called her on the eve of the Iraq war), and she may not remain an ally of any kind for much longer. She is a necessary if awkward and unpredictable partner, especially in the all-important area of mass-migration management. The new partnership should be free from illusions, wishful thinking and strategic ineptitude that has characterized much of U.S. policy in the Greater Middle East for over a generation.