In a telegram to Rouhani, Putin “confirmed the readiness to continue active joint work to further develop the Russian-Iranian cooperation partnership,” the Kremlin said in a statement.

Putin also expressed confidence that Moscow and Tehran will continue to work in the spirit of “maintaining stability and security in the Middle East and the world as a whole” and that agreements reached during Rouhani’s visit to Russia in March will be successfully implemented.

The meeting in March between Putin and Rouhani, who have grown closer through their mutual support of Syrian president Bashar al-Assad, mostly focused on the countries’ flourishing economic ties in the fields of energy and industry.

Iran and Russia have become increasingly allied in Syria, helping Assad’s forces gain ground in recent months, including in the Syrian army’s major offensive last year to retake rebel-held eastern Aleppo.

In addition to cooperation on Syria, energy and defence ties have deepened between Iran and Russia in recent years.

Russia is to build nine of Iran’s 20 proposed nuclear reactors and has emerged as a long-term arms partner, supplying Tehran with its S-300 air defence missile system.

The relationship has blossomed under Rouhani despite the countries having a complicated history over territory, oil and Communist ideology.

Rouhani, a 68-year-old moderate cleric who spearheaded a 2015 nuclear deal with world powers, won 57 percent of the vote, according to Iranian Interior Minister Abdolreza Rahmani Fazli.