The Global Magnitsky Act is not something any self-respecting country wants to be hit by. Its title might sound like a vaudeville revival but the US law, named after a Russian lawyer who was beaten to death in a Moscow dungeon a decade ago, aims to target some of the worst thugs and thieves around the world. It has been used to punish villains from the Democratic Republic of Congo to the Gambia, from Nicaragua to Pakistan.

The US has just placed two ministers from Turkey, a longstanding Nato ally and an EU candidate member, in this company. Considering that presidents Donald Trump and Recep Tayyip Erdogan regularly effuse in each other's praise, this suggests Turkey's ties with its traditional western partners have not just frayed -- but snapped.

Turkey, which throughout much of history has been the east of the west and the west of the east, is at risk of losing its unique selling point. Already drifting eastward, it will slip its moorings to the west altogether if clashes continue at this intensity of ill will. Turkey is heading back to Eurasia, and Russia and China will be the beneficiaries at the expense of America and Europe.

To recap. Mr Erdogan has been in power since 2002. His neo-Islamist Justice and Development party (AKP) was at first greeted as a bridge between Islam and democracy -- a Muslim analogue for Europe's Christian Democrats. Turkey's EU candidacy served the AKP as a shield against the generals, but also as an engine of genuine reform. The EU's reluctance to admit a Muslim country into its Christian club soured relations. But Mr Erdogan was bent on the one-man rule he finally attained this June, when he was re-elected as president with untrammelled powers. He was happy to dispense with the EU's bothersome institutional restraints on his march to autocracy.

The EU's links have withered rather than ruptured: Europe needs Turkey to hold back the tide of refugees from Syria; and Turkey depends on Europe for trade, investment and technology transfer. But a series of existential threats, from mass popular unrest in 2013 to a failed coup attempt in 2016, has convinced Mr Erdogan there are constant plots to topple him, and that the US is behind them.

The list of grievances between the two sides has swelled out of control, bursting into open hostility because of Ankara's detention for alleged espionage of Andrew Brunson, an American evangelical Protestant pastor who has long been resident in Turkey. Mr Erdogan has in the past suggested Mr Brunson might be released in return for the extradition of Fethullah Gulen, the US-based imam of a secretive Islamist movement the government blames for the 2016 coup.

Turkey is also bitter about the US using Syrian Kurd fighters as a strike force against Isis -- Ankara sees the Syrian Kurds as accomplices of Turkish Kurd insurgents waging war inside its borders. Last week, America's decision to sanction the Turkish justice and interior ministers was just the poisoned cherry on a rotting cake.

The shrinking number of optimists about the outcome of this clash tend to divide into three camps. The "this too shall pass" faction takes the long view, and points to Turkey's geographical position -- in its view, smack in the middle of any map. The harassed curators of Turkish diplomacy relive past fence rebuilding exercises. The "principals" faction points to the Trump-Erdogan relationship as a bromance between fellow strongmen leaders who will sort it all out in the end. This last argument may be the weakest.

Autocrats around the world have celebrated the coming of Mr Trump. They see in his rise the return of the US as a country that cultivates strongmen and one-to-one ties rather than institutional links, and especially in the world's badlands. Leaders such as Mr Erdogan thereby come to believe their rapport with someone with as limited regard for the rule of law as Mr Trump can simply bypass US institutions. When they realise their mistake, they tend to reorient towards the real thing.

Turkey, Nato ally or not, and like it or not, is already the third leg of a new power tripod in the Middle East with Russia and Iran. Only with a green light from Russia, whose air force turned the tide of Syria's civil war, could the Turks stop the US-backed Syrian Kurdish forces from uniting their territories into a self-governing entity -- linked to the rekindled Kurdish insurgency inside Turkey.

Amid febrile talk about Turkey looking to China to bolster its economy, which is increasingly vulnerable to a balance of payments crisis, it is not hard to see the Chinese government trying to fasten Ankara into its Belt and Road Initiative, alongside, for example, Pakistan and Iran. Turkic peoples, after all, dominated the central Eurasian landmass for a millennium

It is a reflex action for Turks, as for Russians and Chinese, to mistrust western intentions. Embedded in the national psyche of all three countries are memories -- real or embellished -- of how the west once made and unmade states and empires with casual ease. It is part of President Erdogan's rhetorical repertoire-- of which we may soon hear more.