The pipeline is crucial for India's energy supplies
Iranian President Mahmoud Ahmadinejad has given assurances to India over the construction of a multi-billion dollar gas pipeline during talks in Delhi.
He told the Indian Prime Minister, Manmohan Singh, that all obstacles holding up the long-delayed project would be resolved within 45 days.
A deal has been stalled by disputes over transit fees and security issues.
The pipeline will transport gas from Iran to India through Pakistan, and is seen as crucial to Indian energy needs.
Analysts say the pipeline could contribute to regional security as Iran, Pakistan and India would depend on each other more and benefit from mutual co-operation.
After talks with Mr Singh at the end of his tour of South Asia, Mr Ahmadinejad said he was optimistic about a deal on the 2,600-km (1,620-mile) pipeline, which would initially transport 60m cubic metres of gas (2.2bn cubic feet) a day.
"The two sides are very close to each other. We will finalise the gas pipeline soon," he told reporters in Delhi.
Mr Ahmadinejad said a firm proposal on the pipeline would be formulated in the next 45 days and then put before the leaders of the three countries involved.
The Indian government said the project was feasible, but needed to be financially viable with assured supplies.
India has boycotted trilateral meetings since mid-2007, saying it wanted to first resolve the issues of transit fees and transportation tariffs with Pakistan, its long-standing regional rival.
"This pipeline is not just a commercial deal. It is a part of confidence-building measures," Indian Foreign Secretary Shivshankar Menon said on Tuesday.
The BBC's Sanjoy Majumder in Delhi says the visit has also raised the interest of the US, with Washington suggesting that India put pressure on Iran over its controversial uranium enrichment programme - a suggestion soundly rejected by Delhi.
Although India has twice voted against Iran at the International Atomic Energy Agency (IAEA), it says that it supports Tehran's right to fulfil a peaceful nuclear programme within the constraints of international law.
India also said relations between it and Iran spanned centuries, and that they were capable of handling them with due care.