Regional experts contend that visions of Turkey’s leader as an agent of liberal progress were always fantastical. Mr. Erdogan — who served as Turkey’s prime minister for 11 years before becoming its president in 2014 — forged his political career as an Islamist intent on challenging the strictures of Turkey’s state-imposed secularism. His early democratic reforms and assertion of civilian control over the military were largely about winning the welcome of the European bloc while enabling Turkey’s Muslim populace to practice its religion free of state interference.

“For us, democracy is a means to an end,” Mr. Erdogan once declared.

History is full of examples of Western nations — especially the United States — projecting their aspirations and values onto foreign leaders with their own objectives.

In its effort to prevent China from falling under the control of Communists, Washington backed the Chinese Nationalist general Chiang Kai-shek, celebrating him as a courageous hero even as he brutalized opponents and profited on the spoils of American support. In Vietnam, Afghanistan and elsewhere, the United States cast flawed figures as veritable George Washingtons before writing them off as corrupt tyrants.

“As much as we might fantasize about things changing and there being liberal progress, we probably got overly carried away with those sorts of visions for Turkey,” said Philip Robins, a professor of Middle East politics at the University of Oxford.