Russian President Vladimir Putin visits Tehran on Tuesday for a meeting with Supreme Leader Ayatollah Ali Khamenei, the first trip by the Kremlin chief outside Russia since the invasion of Ukraine.

Putin casts the West’s attempt to cripple Russia’s economy with the most severe sanctions in recent history as a declaration of economic war and says Russia is turning away from the West to China, India and Iran.

Just three days after U.S. President Joe Biden finished a visit to Saudi Arabia, Russia’s leader arrives in Tehran to hold his fifth meeting with Khamenei, Iran’s second supreme leader who came to power in 1989.

“The contact with Khamenei is very important,” Yuri Ushakov, Putin’s foreign policy adviser, told reporters in Moscow. “A trusting dialog has developed between them on the most important issues on the bilateral and international agenda.”

FILE - Turkish President Recep Tayyip Erdogan tests the microphone prior to addressing a media conference at a NATO summit in Madrid, June 30, 2022.

FILE – Turkish President Recep Tayyip Erdogan tests the microphone prior to addressing a media conference at a NATO summit in Madrid, June 30, 2022.

Putin’s visit to Iran will coincide with one by Turkish President Recep Tayyip Erdogan, and the two leaders will meet in Tehran to discuss a deal aimed at resuming Ukraine’s Black Sea grain exports, and Erdogan’s threat to launch another operation in northern Syria which Moscow opposes.

In Syria, Russia and Iran prevailed in their support for President Bashar al-Assad against the West, which called repeatedly for him to be toppled since the Syrian civil war began in 2011.

The 69-year-old Kremlin chief has made few foreign trips in recent years due to the COVID-19 pandemic and then the crisis triggered by his February 24 invasion of Ukraine. His last trip beyond Russia was to China in February.

By heading to the Islamic Republic for his first major foreign trip since the Ukraine war, Putin is sending a clear message to the West that Russia will seek to build ties with Iran, a foe of the United States since the 1979 Revolution.

Before the trip, Putin’s spokesman, Dmitry Peskov, said that Russia and Iran had long been subject to Western sanctions: the price, he said, of sovereignty.

FILE - Iranian President Ebrahim Raisi delivers a speech in Tehran, Iran on April 18, 2022.

FILE – Iranian President Ebrahim Raisi delivers a speech in Tehran, Iran on April 18, 2022.

For Tehran, building ties with Putin’s Russia is a way to balance the clout of the United States and its alliances across the Gulf with Arab rulers and Israel. Putin will meet with Iranian President Ebrahim Raisi, who was elected last year.

Emboldened by high oil prices, Tehran is betting that with Russia’s support it could pressure Washington to offer concessions for the revival of a 2015 nuclear deal.

Still, Russia’s tilt toward Beijing has significantly reduced Iran’s crude exports to China — a key source of income for Tehran since then-President Donald Trump reimposed sanctions in 2018.

Talks with Erdogan will focus on a plan to get Ukrainian grain exports moving again and Turkey’s threat to launch new military operations in Syria to extend 30-kilometer-deep “safe zones” along the border.

Russia, Ukraine, Turkey and the United Nations are expected to sign a deal later this week aimed at resuming the shipping of grain from Ukraine across the Black Sea.

Any Turkish operation in Syria would attack the Kurdish YPG militia, a key part of the U.S.-backed Syrian Democratic Forces (SDF) that controls large parts of north Syria and is regarded by Washington as an important ally against the Islamic State.