(Bloomberg) -- Turkish state banks are planning to exit a Russian payment system, a dramatic example of how US secondary sanctions are forcing countries to distance themselves from Moscow.

The three lenders, the only ones in Turkey still processing transactions made with Russia’s Mir cards, decided on Tuesday to pull out, a senior Turkish official said, asking not to be identified because the information isn’t public. The lira reversed losses to close slightly higher after the news. 

Turkey’s Ministry of Treasury and Finance declined to comment.

The decision by Turkiye Halk Bankasi AS, TC Ziraat Bankasi AS and Turkiye Vakiflar Bankasi TAO to stop using Mir marks a turnaround in the Turkish stance on sanctions targeting Russia. President Recep Tayyip Erdogan has performed a delicate balancing act since Russia’s invasion of Ukraine began in February. He’s refrained from participating in sanctions announced by the US and the European Union, and has been meeting and negotiating with Russia’s Vladimir Putin. 

But the Turkish president’s posture began showing signs of a subtle shift since he traveled to the US for annual meetings of the United Nations last week. 

Immediately after his return, Erdogan summoned his top officials including Treasury and Finance Minister Nureddin Nebati to discuss alternatives to Mir. On the same day, Erdogan’s spokesman Ibrahim Kalin went on a national TV channel to declare that Turkey is firmly on Ukraine’s side in the war, calling on Russia to withdraw from territories it occupies.

A company run by Erdogan’s son-in-law delivers highly effective drones to Ukraine as it defends itself against the Russian offensive. 

Turkey has seen a rise in arrivals of Russian nationals as the war in Ukraine forced some people, especially the wealthy, to consider their options. Russians topped Turkey’s ranking of monthly home sales to foreigners in April for the first time and have been the leading foreign buyers every month since. 

OFAC Warning

The US Treasury’s Office of Foreign Assets Control, or OFAC, warned this month over the risks facing financial institutions entering new agreements or expanding existing ones with the Russian operator of Mir cards. That has alarmed Turkish officials and banks.

One of them -- Turkiye Halk Bankasi or Halkbank -- was charged in 2019 by US prosecutors of conspiring to help Iran evade Washington’s sanctions. On Wednesday, US Supreme Court judges will hold a close-door session to assess the bank’s petition to appeal, Voice of America’s Turkish service reported.

Turkiye Is Bankasi AS and Denizbank AS, two Turkish private lenders, were the first to suspend participation in Mir last week. Mir cards are popular among Russian visitors and bring foreign income to Turkey during the tourist season.

Tourism is a key source of revenue as Erdogan tries to avert another run on the lira in the run-up to elections next year. He is also using his diplomatic role in the war to boost his domestic standing.

Erdogan has positioned Turkey as a mediator, and helped secure deals to resume grain shipments from Ukraine’s Black Sea ports and more recently, for prisoner exchanges between the warring sides.

He’s also publicly defended Putin against sanctions and urged nations not to “underestimate” Russia. Erdogan’s relations with Ukraine, including the supply of drones, have rankled Moscow. 

Still, Ankara remains a key partner for Putin as international sanctions shutter other routes for trade, travel and investment.

(Updates with Halkbank in ninth and 10th paragraphs.)

©2022 Bloomberg L.P.