The first presidential visit from Iran since 2003 comes at a complicated moment in Tehran. For the Islamic Republic of Iran, it is the best of times and the worst of times. Iran’s regional influence has never been as expansive as it is today. Yet, there is a huge push back against Tehran from some of its Arab neighbours, Israel and the Trump Administration.

More problematic is the increasing internal and economic and political volatility as the Islamic Republic celebrates its 40th anniversary. The Iranian currency rial is rapidly losing its value, hitting a record low of 48,000 against the US dollar earlier this week. High inflation and large-scale unemployment, as well as widespread corruption triggered protests in Iran’s cities around the new year. Some of the slogans in the protests — “Not Gaza, not Lebanon, I give my life to Iran” — questioned the costs of Tehran’s expansive internationalism at a time of internal economic pain.

There are also demands for social liberalisation, with the women protesting the law on the compulsory wearing of the veil in public. While conservatives in Iran trashed these protests, the office of President Hassan Rouhani released the reports of a survey that showed nearly 50 per cent of the population opposes the mandatory hijab rule.

The faultines within the ruling elite are open and the contestation between different factions is continuous. But supreme leader Ali Khamenei has the last word and towers over the elected presidency and all other institutions. Forty years after the founding of the Islamic republic in 1979, Iran’s internal divisions are getting sharper. President Rouhani has, in fact, called for a referendum to heal domestic bleeding. Rouhani did not say what the referendum will be about, but a group of liberal reformers quickly backed his suggestion by calling for a popular vote on the legitimacy of the current political order.

While the focus of the engagement between Prime Minister Narendra Modi and Rouhani will necessarily be on bilateral issues relating to trade, investment and connectivity, Iran’s domestic politics and its involvement in the multiple conflicts in the Middle East must fully inform Delhi’s engagement with Tehran.

Rouhani’s visit to Hyderabad this week was in part about showcasing Iran’s deep historical connections with India. It also provided an occasion for Rouhani to deliver a sombre message on overcoming sectarian conflict within Islam and promoting harmony between different religious communities. This message is directed not just to the audiences in India but also those in the Middle East.

That brings us to Delhi’s biggest current challenge in dealing with Tehran — the sharpening conflict between Iran and Saudi Arabia. But Delhi’s public discourse on relations with Iran has for long been framed it in terms of Tehran’s relations with Washington. That tells only one part of the story, but masks others.

During the early decades of the Cold War, India stayed away from the Shah of Iran, a secular modernising ruler, because he was too close to the United States. After all, the Shah put Iran into the US’s regional Cold War alliances like the Central Treaty Organisation that also included Pakistan and Turkey. Today, one of the main problem is the unending enmity between Iran and the US.

Delhi was relieved when the US, under President Barack Obama, and Iran in 2015 concluded a nuclear deal and opened up some space for international commercial cooperation with Tehran. President Donald Trump and his Republican party’s hostility towards the deal has created fresh complications for India.

Although Delhi is looking for ways to sidestep the potential expansion of the US sanctions regime, for example, with a reported rupee-rial arrangement, India’s problems with Iran’s regional rivalries is not going to disappear. While the US-Iran nuclear deal was welcomed in Delhi, it was viewed with great concern in some Arab capitals, especially Riyadh, Abu Dhabi, Amman and Cairo.

Many of them accused President Barack Obama of selling out its long-standing friends and partners in pursuit of a deal with Iran. Even more important, Saudi Arabia has taken matters into its own hands to confront Iran’s growing influence across the region. The conflicts in Iraq, Syria, Bahrain, Lebanon and Yemen have provided a fertile ground for the playing out of the rivalry between Tehran and Riyadh.

It is not for India to judge who is right or wrong, but to recognise the reality of regional conflicts in the Middle East and limit their impact on India’s ability to secure its goals in the region. India would certainly want to see a serious effort to reconcile the current tensions between Iran and its Arab neighbours, where Delhi’s stakes have risen manifold in recent decades.

Realism tells us that Delhi does not have the power to mitigate the tensions between Iran and Saudi Arabia. But Delhi can certainly encourage the emerging trends for political and social moderation in the Middle East. India has positively viewed the recent calls from the political leadership in Egypt, Saudi Arabia and the UAE for reclaiming Islam from violent extremists. India should also welcome Rouhani’s emphasis on ending sectarian conflicts in the region and his praise of India as a “living museum” of peaceful religious co-existence.

While Rouhani may not have the command of Iran’s politics, the moderate forces represented by him are critical for the pursuit of three important Indian objectives in the Middle East. One is the promotion of mutual political accommodation within the region; another is pressing for an end to the export of destabilising ideologies from the region; and finally the construction of a coalition against violent religious extremism that has inflicted so much suffering in the Middle East and the Subcontinent.

This article was originally published in the Indian Express.