As Western leaders call on President Erdogan to respect civil liberties and democracy, Erdogan insists he will consider reinstating the death penalty: "The people have the opinion that these terrorists [coup-plotters] should be killed. Why should I keep them and feed them in prisons for years to come?"

The more Ankara feels distant to Washington, the more it will want to feel closer to Moscow.

Turkey once boasted of having NATO's second biggest army, equipped with state-of-the-art weapons systems. That powerful army now lacks command: After the failed coup of July 15, more than 8,500 officers and soldiers, including 157 of the 358 generals and admirals in the Turkish military's ranks, were discharged. The top commanders who were purged had made up 44% of the entire command structure. Prime Minister Binali Yildirim said that the military's shipyards and weapons factories will be transferred to civilian authority; military high schools and war academies have been shut; military hospitals will be transferred to health ministry; and the gendarmerie, a key force in anti-terror operations, and the coast guard will be tied to the interior ministry.

Those changes leave behind an army in deep morale shock, with political divisions and polarization. Its ranks are suffering not just trauma but also humiliation. The Turks are lucky their country was not attacked by an enemy (and they are plentiful) at a time like this. Conventional war, however, is not the only threat to Turkey's security. The Turkish army's worst decline in modern history came at a time when it was fighting an asymmetrical war against Kurdish insurgents inside and outside of Turkey and, as part of a U.S.-led international campaign, the Islamic State (ISIS) in neighboring Syria.

The attempted coup not only quickly discredited the Turkish military but also left the country once again directionless in foreign policy. President Recep Tayyip Erdogan has been slamming his NATO ally, the United States, almost daily. His government big guns have been implying an American hand behind the failed coup by a faction of officers they claim are linked to a U.S.-based Muslim cleric, Fethullah Gulen, once Erdogan's best political ally. "The putschist [Gulen] is already in your country, you are looking after him. This is a known fact," Erdogan said, addressing Washington. "You can never deceive my people. My people know who is involved in this plot, and who is the mastermind."

The White House immediately denied Erdogan's claim. Deputy Press Secretary Eric Schultz said the U.S. was one of the first countries to condemn the failed coup, and noted that a successful one would have put American troops serving in Turkey at risk. "It is entirely false. There is no evidence of that at all," Schultz said. "We feel that talk and speculation along those lines is not particularly constructive." The failed coup has become a Turkish-American dispute -- with a military dimension, too.

Erdogan also criticized U.S. General Joseph Votel, who voiced concerns over "the long-term impact" of the coup on the Pentagon's relations with the Turkish military. According to Erdogan, Votel's remarks were evidence that the U.S. military was siding with the coup plotters. The Pentagon's press secretary, Peter Cook, flatly denied that claim: "Any suggestion anyone in the department supported the coup in any way would be absurd."

Erdogan probably wants to play the tough guy and is slamming Washington day after day not just to look pretty to millions of anti-American Turks but also to pressure Washington in Turkey's quest to extradite Gulen, presently the biggest snag between the two allies.

But there is another dimension to Erdogan's ire: He wants to mend fences with Moscow.

Turkey's relations with Russia were frozen after Nov. 24, when Turkey, citing a brief violation of its airspace along Turkey's border with Syria, shot down a Russian military aircraft. Russia's President Vladimir Putting ordered punishing economic sanctions, imposed a travel ban on Russian tourists visiting Turkey and suspended all government-to-government relations. Unable to ignore the damage, a repentant Erdogan conveyed regrets to Putin; the regrets were accepted and the two leaders are scheduled to meet on August 9, when the Turks hope that relations with Russia will be entirely normalized.

Normalization, unfortunately, will not come at the price of Turkish "regrets" alone. For full normalization, Turkey will have to digest the Russian-Iranian-Syrian line in Syria's civil war -- a pact which Turkey has loudly detested ever since civil war erupted in Syria in 2011. This will be another foreign policy failure for Erdogan and an embarrassing U-turn. But the more Ankara feels distant to Washington, the more it will want to feel closer to Moscow.

Turkish President Recep Tayyip Erdogan is attempting to repair badly damaged relations with Russia, even as he slams his NATO ally, the United States, almost daily, and accuses the U.S. military of supporting the coup attempt against him. Pictured: Russian President Vladimir Putin (left) with Erdogan (then Prime Minister), meeting in Istanbul on December 3, 2012. (Image source: kremlin.ru)

Meanwhile, after the coup attempt, Turkey's troubled relations with the European Union turned even more troubled. European Commission head Jean-Claude Juncker said that the EU's deal with Turkey on halting the flow of migrants toward the bloc may collapse. "The risk is big. The success so far of the pact is fragile. President Erdogan has already hinted several times that he wants to scrap it," Juncker said. It is not just the migrant deal that may entirely suspend Turkey as a candidate country for the EU.

As Western leaders call on Erdogan to respect civil liberties and democracy, Erdogan insists he will consider reinstating the death penalty. "The people have the opinion that these terrorists [coup-plotters] should be killed," Erdogan said in interview with CNN. "Why should I keep them and feed them in prisons for years to come? That's what the people say ... as the president, I will approve any decision to come out of the parliament."

Such a move would kill Turkey's accession process entirely. Federica Mogherini, EU's foreign policy chief, warned that if Turkey reintroduces the death penalty, it will not be joining the European Union. "Let me be very clear on one thing," she said; "... No country can become an EU member state if it introduces [the] death penalty."

The attempted coup not only destabilized NATO's second largest army and exposed it to the risk of serious operational vulnerabilities; it also left Turkey at risk of engaging in potentially dangerous liaisons with playmates of different kind -- Russia and Iran & Co. -- at least for now.