WASHINGTON: Indian Prime Minister Narendra Modi was in Tehran on Sunday and Monday to ink a major trade deal between India, Afghanistan, and Iran, which is in the process of unshackling its economy from years of sanctions imposed by the West. He used his public addresses there to evoke the "past glory" of India and Iran's shared history, which dates back millennia, and even quoted Ghalib, an Indian poet who wrote often in Persian.

But behind the flowery language is a keen strategic move aimed at reasserting the potential for economic partnership with India at a time when China has expanded its economic influence across Central Asia, the Washington Post said on Tuesday. And since India is separated from the "Stans" and beyond by Pakistan, its immutable and hostile western neighbor, the agreement naturally centered on an alternate route: Chabahar, a port which India has been eyeing for many years along Iran's southern coast.

“The distance between Kandla and the Chabahar port is less than the distance between New Delhi and Mumbai, and so what this agreement does is to enable us quick movement of goods first to Iran and then onwards to Afghanistan and Russia through a new rail and road link,” said Nitin Gadkari, an Indian minister who oversees infrastructure development and who accompanied Modi to Tehran. He was referring to a port on India's west coast, and also the North-South Transport Corridor, a network of roads and railways, some built with Indian assistance, which would move goods north from Chabahar.

But even closer to Chabahar is Gwadar, in Pakistan, the focal point of a $46 billion investment China has made in an "economic corridor" through Pakistan that will bring oil from the Middle East to China more quickly and cheaply. While there are certainly other economic imperatives at play at both ports, oil figures heavily in the calculus of their existence. China is reportedly Iran's biggest buyer for oil. Indiais number two.

India is investing far less in Iran than China has in Pakistan, but Modi positioned the deal as one based on shared values of moderation and tolerance — as opposed to those of their unnamed adversaries.

“Lifting of the international sanctions against Iran has opened up immense opportunities for both the countries, especially in the economic sphere,” added Modi, in a speech. "Afghanistan will get an assured, effective, and a more friendly route to trade with the rest of the world."

"India wants to make sure that China doesn’t start to define these countries' choices by being the only option they have," said Tanvi Madan, an expert on Indian foreign policy at the Brookings Institution.

U.S. officials tried hard to encourage India to seek alternative sources, such as Saudi Arabia, but Iran has been equally persistent in courting India, promising aid in oil exploration in Indian territory and favorable terms for trade in Iran’s big consumer market.