The pipeline is crucial for India's energy supplies
Pakistan says it has cleared the way with Iran to finalise an agreement on a $7.5bn gas pipeline to India.
The 2,600-km (1,620-mile) pipeline is expected to earn Pakistan millions of dollars in transit fees.
The news came during a visit to Pakistan by Iranian President Mahmoud Ahmadinejad on the first leg of a tour of South Asia.
Iran has also agreed to supply Pakistan with 1100 MW of electricity, the official Pakistani news agency says.
The Associated Press of Pakistan (APP) says the Pakistani and Iranian foreign ministers will draw up a date to sign the pipeline deal.
Mr Ahmadinejad received a red carpet welcome in Pakistan
It gave the news after Mr Ahmadinejad held talks in Islamabad with President Pervez Musharraf.
Pakistani Foreign minister Shah Mahmood Qureshi said the two leaders' talks were positive.
"The two leaders said the [pipeline] project will promote peace and friendship," Mr Qureshi said.
The gas pipeline is seen as crucial for India which relies heavily on fuel imports for its fast-growing economy.
Analysts say that the pipeline could also contribute to security as Iran, Pakistan and India benefit more by mutual co-operation.
The United States accuses Iran of trying to build nuclear weapons and has opposed the pipeline project as it feels it will weaken its efforts to isolate Tehran.
The Iranian president was accompanied by a high-powered delegation, including Foreign Minister Manouchehir Mottaki and Commerce Minister Mir Kazema.
After his talks, Mr Ahmadinejad left for Sri Lanka and will then carry on to visit India.