The pipeline is crucial for Pakistan's energy supplies
Pakistan and Iran have signed an agreement for the construction of a much-delayed natural gas pipeline, officials say.
The $7.6bn project is crucial for Pakistan's growing energy requirements. The country has suffered severe electricity shortages.
The deal was signed between the two countries in Turkey.
The pipeline was initially intended to carry gas on to India, but Delhi withdrew from negotiations last year.
Pakistani Petroleum and Natural Resources Minister Naveed Qmar described the signing of the deal as a "milestone towards meeting energy needs of the country".
The US is suspicious of any deal involving Mr Ahmadinejad
The pipeline will connect Iran's South Fars gas field with Pakistan's Balochistan and Sindh provinces.
Officials say the treaty was delayed because Pakistan had been unable to arrange funding.
Under the terms of the deal, Iran will provide 750m cubic feet of gas per day to Pakistan. The line should become operational by 2015.
Each country will be responsible for building the section of pipeline that runs through its own territory.
Labelled the "peace pipeline," the project was first mooted in the 1990s and originally would have extended from Pakistan to India.
Correspondents say that Delhi has been reluctant to join the project because of its its long-running distrust of Pakistan, with which it has fought three wars since independence in 1947.
India has instead invested in civilian nuclear reactors to help fulfil its increasing energy demand. It also signed a landmark civilian nuclear deal with the United States in 2008.
Pakistan has argued that it too should make a similar deal with Washington, but correspondents say that so far the US has not shown much enthusiasm.
Under the terms of the deal signed on Tuesday, Pakistan is allowed to charge a transit fee if the pipeline is eventually extended to India.
Correspondents say the deal is not likely to be welcomed by the US - because of Tehran's suspected ambitions to build nuclear weapons.
Iran denies any such ambitions.