It is commonly accepted that Iran and Pakistan remained the best of friends until the fall of the Shah. Beginning in 1979, the relations between the two neighbors worsened with Imam Khomeni's Islamic Revolution in Iran and General Zia ul Haq's Islamization in Pakistan.
Opposition to Pakistan's Nuclear Program:
In a book titled "Iran and Pakistan: Security, Diplomacy and American Influence", the Iranian-born American author Alex Vatanka challenges the notion that the rise of sectarianism strained Iran-Pakistan ties. He argues that the relations began to deteriorate earlier in the decade of 1970s when Shah Mohammad Reza Shah Pehlavi, acting on behalf of the United States, tried to pressure Prime Minister Zulfikar Ali Bhutto to abandon Pakistan's nascent nuclear program.
History of Iran-Pakistan Ties:
Iran was the first country to recognized Pakistan right after the country's independence in 1947. Unlike Afghanistan that opposed Pakistan's admission to the United Nations, Iran enthusiastically supported it. Iran also helped mediate running disputes between Afghanistan and Pakistan.
The relations between the two neighbors grew even closer as both joined the 1955 Baghdad Pact for common defense that was signed by Iran, Iraq, Pakistan, Turkey and the United Kingdom. It was renamed CENTO (Central Asia Treaty Organization) after the 1958 coup in Iraq that deposed the pro-West King Faisal of Iraq. Later, a regional cooperation for development (RCD) agreement was signed that included Iran, Pakistan and Turkey, all US allies at the time in 1970s.
1971 Loss of East Pakistan:
Pakistan's loss to India in 1971 East Pakistan war caused both the Shah and Bhutto to reassess bilateral ties. The Shah felt Pakistan had been permanently weakened by the 1971 war with India. It encouraged the Shah's ambition of becoming the regional hegemon in West Asia and the Gulf region.
While the Shah saw an opportunity to assert Iranian leadership after the events of 1971, Zulfikar Ali Bhutto sought to rebuild Pakistan's strength and to reclaim its status as a powerful nation in the region. Part of Bhutto's plan included building an atom bomb, an effort that was vehemently opposed by the United States. The Shah echoed the American demands in private meetings with Pakistani leadership.
Pakistan's Ties with Gulf Arabs:
Faced with the American and Iranian opposition to Pakistan's nuclear program after 1971, Zulfikar Ali Bhutto, a secular leader married to a Shia woman of Iranian ancestry, sought closer ties with Saudi Arabia and other oil-rich Sunni Gulf nations of the GCC. Here's an excerpt of Alex Vatanka's response in an interview with Lawfare journal:
"The fact that he (Zulfikar Ali Bhutto) was Shia had nothing to do with it. Bhutto is focused about India: Who can come to my aid, who can foot the bill for my nuclear program that I need to build up because I know that India is just about to get their hands on a nuclear weapon and I cannot lose that military competition on that front? There is no mention from the Saudis, the Emiratis, the Qataris—all of these famously Sunni nations—oh, we don't like Bhutto because he's Shia, you know? There's no sign of that. This sectarianism is something that unfortunately becomes much bigger of a player in the foreign relations of everybody in the last 15, 20 years because of a lot of other factors."
Complicated Iran-Pakistan Ties:
The relations between Iran and Pakistan oscillate between claims of "brotherly" ties and border skirmishes along Balochistan-Sistan border.
As recently as this week, Iranian President Rouhani said in a meeting with Pakistan Senate President Raza Rabbani that "the Islamic Republic regards Pakistan’s security as extension of its own".
In the last decade, Pakistan’s ties with Gulf Arabs have been uneasy while its relationship with Iran hit an all-time low with regular border skirmishes.
Regular diplomatic exchanges and friendly statements between Iran and Pakistan continue to attempt to reduce tensions while glossing over real difficulties between the military and intelligence services of the two countries.
All's not well between Iran and Pakistan. The bilateral relations began to deteriorate in early 1970s when the Shah and Zulfikar Ali Bhutto were still in charge, well before the Iranian Islamic Revolution and Zia ul Haq's Islamization in Pakistan. Iranian-American scholar Alex Vatanka says the key issue at the time was the US-Iran joint opposition to Pakistan's nuclear program that forced Bhutto to turn to Gulf Arabs for help. The difficulties are not rooted in sectarian Shia-Sunni difference. There is a genuine desire and continuing efforts by diplomats on both sides to maintain a good working relationship.