The crackdown has been accompanied by a slew of provocative speeches by Mr. Erdogan lamenting the loss of Ottoman territories, proposing to reinstate the death penalty, intensifying the suppression of Kurdish nationalists and lambasting the United States and Europe. Mr. Erdogan is also demanding a combat role in the battle in Iraq to liberate Mosul, but any involvement there of Turkey’s predominantly Sunni troops could create new sectarian complications.

Mr. Erdogan has not concealed his ambition to replace Turkey’s parliamentary system with an executive presidency that would formally expand the considerable power he already wields. But his Justice and Development Party (A.K.P.) is short of the 330 votes it needs in the 550-member Parliament to start the process of constitutional change. Mr. Erdogan’s solution has been to fan the flames of grievance, nationalism and fear.

The United States and Europe are horrified that Mr. Erdogan has strayed so completely from the track he was on when he first became the Turkish prime minister in 2003 and was hailed for building a model Muslim democracy. Turkey remains a critical NATO ally in a tumultuous region, a repository for allied nuclear weapons, and its migration deal with the European Union has helped reduce the flow of Middle Eastern refugees to Europe.

There is no easy way for the West to keep Mr. Erdogan in the tent while making clear to him that his actions are unacceptable. But there is a Turkish saying that “a real friend tells the bitter truth.” In a speech on Tuesday, Deputy Secretary of State Antony Blinken attempted to do that, warning pointedly that the crackdown would shake the business climate and urging Turkey to respond to the failed coup “in ways that reinforce public confidence in the rule of law and Turkey’s traditions of freedom of expression and pluralism.” Is Mr. Erdogan listening?