With Russia struggling to overcome the impact of western isolation, its leadership is under pressure to strengthen existing alliances and develop new ones that can help safeguard its interests.
In the five months since invading Ukraine, the conflict has had a profound impact on Russia's standing. The heavy losses to its military in terms of equipment and manpower – the latest estimate by the US's Central Intelligence Agency (CIA) puts the total number of Russian combat fatalities at 15,000 – has seriously damaged Moscow’s standing as a military power.
Even more serious has been the devastating impact western sanctions have had on Russia's economy, forcing it to default on its international debt last month – for the first time since the Bolshevik revolution in 1917.
The extent of Russia’s isolation beyond the West is debatable, of course. It is true that only four countries – Belarus, Eritrea, North Korea and Syria – joined Moscow in opposing a UN General Assembly resolution in March demanding that the Kremlin “immediately, completely and unconditionally withdraw" its forces from Ukraine. But it is just as telling that 35 countries, including China and India, abstained. In recent months, moreover, Russian Foreign Minister Sergey Lavrov was received in the Mena region, and Indonesian President Joko Widodo visited Moscow for talks with Russian President Vladimir Putin.
With the international community divided over the war, it is not surprising that Mr Putin is keen to strengthen Russia's existing alliances that can both lessen the western isolation and help the country to circumvent sanctions.
In this context, Mr Putin’s visit to Tehran this week, where he had meetings with Iranian supreme leader Ayatollah Ali Khamenei and President Ebrahim Raisi, represents a bold attempt to bolster its alliance with a regime whose uncompromising commitment to an extreme ideology can often make it difficult for it to engage with states that espouse a more secular outlook.
Despite their obvious ideological and religious differences, Russia-Iran relations have been improving in recent years as the two countries seek to challenge the West’s traditional dominance in global affairs. The willingness to co-operate on issues of mutual interest has been most in evidence at the protracted negotiations in Vienna aimed at reviving the controversial nuclear deal with Iran.
Western negotiators have accused Moscow of encouraging Tehran to concentrate on relatively minor issues at the talks, such as the presence of monitoring cameras at Iran’s nuclear facilities, rather than focusing on core issues, such as its nuclear enrichment activities. This is seen as a key factor in the lack of progress, with a number of western officials involved in the process now openly questioning whether it will be possible to conclude a deal.
The prospects suffered a significant setback this week after a key adviser to Mr Khamenei boasted that Iran now had the ability to build a nuclear weapon if it chose to do so. “Iran has the technical means to produce a nuclear bomb, but there has been no decision by Iran to build one," Kamal Kharrazi said at the weekend.
Russia-Iran co-operation at the nuclear talks has now led to a deeper alliance between the two countries, as was demonstrated by the warm reception Mr Putin received in Tehran on Tuesday. During what was Mr Putin’s first trip outside the erstwhile Soviet republics since the Ukraine conflict began, he received praise from Mr Khamenei for not succumbing to western pressure.
Prior to their meeting, Mr Khamenei praised the Russian leader on state television for ensuring his country had "maintained its independence" from the US. He added that the two countries needed to remain vigilant against “western deception". He also backed Mr Putin’s decision to invade Ukraine, arguing that, had he not done so, Russia would have been the victim of Nato's aggression.
“If you had not taken the initiative, the other side would have caused the war with its own initiative," Mr Khamenei said. "If the road is open to Nato, it knows no boundaries, and if it was not stopped in Ukraine, it would start the same war sometime later under the pretext of Crimea.”
Mr Putin’s visit is likely to result in increased co-operation between the two countries on a variety of issues beyond the nuclear front. Iran has already pledged to lend its expertise in evading sanctions to Moscow to help the Kremlin maintain oil sales on global markets. One can expect increased arms shipments, too, with Tehran reportedly offering to provide hundreds of drones to support Moscow's war effort in Ukraine.
The visit certainly appears to have given Mr Putin renewed confidence to adopt a more robust position in his stand-off with the West over the problematic issue of Ukrainian grain exports, currently being prevented from reaching global markets due to Moscow's naval blockade of Ukrainian ports in the Black Sea.
In Tehran, Mr Putin also met Turkish President Recep Tayyip Erdogan, who was keen to lobby for support for a military offensive against Syria’s Kurds, a move that Russia and Iran, both backers of the Assad regime in Damascus, have resisted.
After meeting both the Iranian and Turkish leaders, Mr Putin warned that he would only ease the path for Ukrainian grain exports if the West lifts sanctions on Russian shipments. An estimated 20 million tonnes of grain are said to be held in Ukraine because of the Russian blockade, raising the prospect of global starvation this winter.
CIA director William Burns has raised questions, though, about Iran and Russia's ability to form a lasting pact. Speaking at this week’s Aspen Security Forum, Mr Burns, a former US ambassador to Moscow, said both countries need each other right now. "Both are heavily sanctioned countries, both looking to break out of political isolation," he pointed out.
He, however, warned the Iranians and the Russians “don’t trust each other", describing them as "energy rivals and historical competitors".