India, Iran and Afghanistan have signed a tripartite agreement to turn the Iranian port of Chabahar into a transit hub bypassing Pakistan, which has been the only route for war-stricken Afghanistan to the Indian Ocean.

"The agreement can change the course of history in this region," Indian Prime Minister Narendra Modi said on Monday during his visit to Tehran.

The accord, which calls for joint investments, will significantly boost the role of the under-tapped port of Chabahar. Once the project is realised, it will connect India to Afghanistan and central Asia, while Kabul will get an alternate route to the Indian Ocean.

"The idea is that if Chabahar is developed it would give India the equivalent of an alternate route from India through the sea route to Chabahar and from then on the land route that would lead through Iran to Afghanistan," Uday Bhaskar, the director of Society for Policy Studies, said.

India agreed on Monday to finance the development of the port as a regional hub, as Modi sought to revive economic ties with Tehran after the lifting of sanctions.

Regional opportunities

The Indian leader met Iranian officials including supreme leader Ayatollah Ali Khamenei and President Hassan Rouhani during a visit that he said would mark "a new chapter in our strategic partnership".

Modi and Rouhani oversaw the signing of a memorandum of understanding for the provision of a $500m line of credit.

"Today is an important and historical day of development of relations between the three countries," Rouhani said in a televised speech, seated between the two other leaders.

"From Tehran, New Delhi and Kabul, this is a crucial message ... that the path to progress for regional countries goes through joint cooperation and utilising regional opportunities."

The deal is crucial for the landlocked Afghanistan, as it changes the geopolitics of the region and is seen as a way out of its dependency on Pakistan.

Alternate route

The Afghan president praised his counterparts and said the Chabahar partnership was only the beginning.

"Our will starts from Chabahar today, but its end will be an all-out comprehensive development and economic-cultural cooperation," said Ghani.

The tripartite deal is likely to upset China, the greatest economic rival of India in Asia, and Pakistan, which has been the only transit route for Afghanistan to the Indian Ocean.

Chabahar is not very far from the Pakistan port city of Gwadar, which is being developed by China.

"There is a strategic dimension which is that India will have its own connectivity options that bypasses Gwadar. And concurrently since India does not have access to Afghanistan and central Asia because of obstacles being raised by Pakistan," Bhaskar said.

"Clearly if Chabahar is realised it would be the kind of alternate route that would really not cause much comfort and happiness for China and Pakistan," he told Al Jazeera.

The volume of trade between Iran and India in the past 11 months reached $9bn, according to Iran's official IRNA news agency.

Tehran was New Delhi's second largest oil supplier until 2011-12, when the sanctions cut its dependence on Iranian oil.