It was a success — of sorts. Turkey and its proxies gained control of an area that they used to create a buffer zone between two Syrian Kurdish-administered territories. Iran and Russia, too, were happy to see the American-backed group’s ambitions checked. If Syria’s Kurds were to achieve independence with American assistance, Moscow and Tehran feared, they could be counted on to remain an American ally and perhaps even to host American military bases, threatening Iranian and Russian interests. Accordingly, by using Turkey to beat the Syrian Kurds, Moscow and Tehran hope to drive them away from the United States and into their own arms.

Turkey’s rapprochement with Russia goes beyond Syria. Lately, Mr. Erdogan has been openly toying with the idea of joining the Shanghai Cooperation Organization, a pact led by Russia and China that is meant to rival the European Union. In doing so, Turkey is turning away from potential partners in the West that still — at least for now — value democracy and human rights, and toward another world of autocrats, pseudo-monarchs and aspiring czars.

Alexander Dugin, one of the Kremlin’s chief ideologues and a key proponent of “Eurasianism,” has been meeting with A.K.P. officials. This is not a total surprise given the parallels between Russia and Turkey, with their ambivalence toward the West. Mr. Dugin hopes his country will lead an emerging anti-Western “Eurasian” alliance; Mr. Erdogan believes it is Turkey’s historical destiny to champion a Muslim world bullied by the West.

Yet the current Turkish-Russian cooperation is fragile. Turkey is still one of the biggest patrons of the Syrian rebels, while Russia is Mr. Assad’s staunchest backer. Moreover, Turkey is still a member of NATO, and remains intertwined with the European Union, albeit more for economic than for political reasons.

Just as Turkey can never reprise its Ottoman-era role in the Middle East, so too it cannot afford to align itself exclusively with authoritarian regimes and strongmen. Turkey sends around half its exports to the European Union, and its economy is kept afloat by European investment. Joining the Shanghai Cooperation Organization would be paltry compensation for what it would give up by spurning Europe.

Turkey’s economy is already feeling the repercussions of Mr. Erdogan’s policies: The Turkish currency has fallen by some 20 percent against the dollar over the past 11 months. After the July 15 coup attempt, the government declared a state of emergency that has allowed it to bypass Parliament and rule by decree. Numerous journalists and opposition politicians have been arrested. The outlook is so grim that foreign investment has begun to flee the country.

Even the deputy prime minister for economic affairs recently admitted that Turkey is going through “its toughest period since the end of the First World War,” when the Ottoman Empire collapsed. The Turkish people cannot be lulled to sleep forever with fictions of an Ottoman revival. Soon, they will have to wake up and face the unpleasant reality.