The failure of the attempted coup by elements of Turkey's military against the increasingly high-handed elected Erdogan govt has now put the religiously conservative Erdogan in a position to claim absolute power in his country. As Erdogan's forces restore order, they will conduct a ruthless purge against the remnants of opposition against him. Erdogan long ago famously said that "Democracy is like a bus - when I get to my stop, I'll get off" (ie. he has never really cared for democracy, and has only abided by the democratic system until he no longer needed it as a cover to advance his goals). Turkey's failure to firmly oppose ISIS in Syria nextdoor is not quite as treacherous as Pakistan's support to Taliban during the War on Terror, but has similar motivations since both rely on Islamism to combat ethnic separatism that threatens their territorial integrity.
During the coup attempt, Erdogan immediately accused his former ally, the more moderate religious cleric Fethullah Gulen, of being the ultimate force behind the coup. Gulen, who shifted to the United States nearly a decade ago following a power struggle with Erdogan, is thought to have ties with the American CIA. He will now become a focal point for US-Turkish tensions, as Turkey demands his extradition.
The Turkish Mamlukes are about to break free of the Ameri-Khanate. Too bad Americans weren't able to find a Kejriwal to throw into Turkey's political mix like a cat among the pigeons, to derail Erdogan that way. But perhaps a Kejriwal would be no match for the monied pro-capitalist Islamic conservatives led by Erdogan. Unlike in India, the biggest business houses in Turkey are all allied with Erdogan's AKP. The judiciary and police, which were believed to be infiltrated by Gulen's people, will now be fully purged.
Like the Carter administration's debacle with the loss of Iran to Khomeini's revolution, likewise the Obama whitehouse may have just suffered a momentous foreign policy event which will see Obama judged as a foreign policy failure, right before the crucial US elections. Ironically, Europe will bear the fallout of this event sooner than the US will. I've noticed various Pakistani Islamists celebrating the latest turn of events on Twitter - to them this is the death of Ataturkism and another potential revival of the Caliphate.