On 14th August, 1947, Iran was the first country to recognize Pakistan as a sovereign nation. The two countries have supported each other during their Wars when Pakistan goes on a war with India and Iran with Iraq. In 1965 war Pakistani fighter jets were often sent to Iran for fueling and other tactical purposes including protection from Russian radar jamming and early Airborne warning An-12. Similarly Iran sheltered their jets at Pakistani Air Force Bases during the Iran-Iraq War. Pakistan is also the intermediary in several of defense deals between Iran and China.
Iran provides Pakistan with a secure border unlike Afghanistan and India where the both the countries are found often fighting with each other. The long secure border between Iran and Pakistan is kinda blessing for Pakistan fighting wars on both the fronts.
There are also cultural connections between the two countries, Pakistan's first women prime minister Benazir Bhutto was half Iranian from her mother's side, a Kurd by ethnicity. General Yahya Khan is believed to have Iranian ancestry. PM Yousuf Raza Gilani his family hails from the Iranian province of Gilan, His ancestors Sheikh Zahid Gilani grave is located in the hills of Lahejan city. Pakistan's prominent nuclear scientist Abdul Qadeer Khan and famous poet Allama Iqbal are very famous in Iran.
Economically, Pakistan is an energy hungry nation which is facing acute shortage of Natural Gas and Electricity. There are regular protests against Power breakdowns and Gas shortages across Pakistan. Both Gas and Electricity are also the fundamental component of Pakistan's Economy as Pakistan's transportation infrastructure, fertilizer industries etc relies upon Natural Gas, hence the 2700-km long gas pipeline project is undoubtedly ‘a lifeline for Pakistan’. It also provides Iran with an opportunity to sell Energy and have transportation connections with China using Pakistan as its corridor.
Hence for now on Pakistan desperately looks at Iran for solutions to all its problems from security to economic well-being that would come through its Natural Gas that would power Pakistani Industries bring Industrial Revolution, Light homes and Transportation. Likewise Pakistan can offer Iran with several alternatives to problems such as security, global isolation, currency swap and defense pacts. Pakistan International Airlines and Iran Air could also partner to achieve their mutual objectives.