If you had asked me just a couple of weeks ago, I might have assured you that Pakistan is the last county with which the Islamic Republic of Iran would pick a fight.
I might have cited many reasons for that opinion.
First, A recent demise of the classical reasons for antagonism between nation-states. Their border, almost 1,000 kilometers long, was fully demarcated in 1964, ending ambiguities left behind by the British when they withdrew from the subcontinent in 1947. Relations were never marred by irredentist pressures on either side.
Nor did Iran and Pakistan compete over access to natural resources, including water, or competition over markets.
History, too, designated Iran and Pakistan as natural friends. Iran had been a source of inspiration for two generations of Muslims in the subcontinent who dreamt of a separate homeland. Many of them even adopted surnames that indicated an Iranian rather than Indian origin: Gailani, Isfahani, Shirazi etc.
The great poet Muhammad Iqbal, who wrote in Persian, propagated the idea of a new Muslim state alongside Iran. His ode "To the Persian Youth" is now a classic of Persian literature, a love letter from a man who never actually visited Iran.
During the independence struggle, the Persian phrase "Pakistan zinda baad!" ["Victory Pakistan!"] became the war cry of millions from Baluchistan to East Bengal.
The founding fathers of the new Muslim state chose the Persian word Pakistan (Land of The Pure) to name the nascent state whose national anthem was also written in Persian.
Not surprisingly, Iran was the first country to recognize the new state and set up a vast embassy in its first capital, Karachi. There were also numerous intermarriages, including by President Iskandar Mirza and, later, Prime Minister Zulfiqar Al-Bhutto.
Tight links between the two neighbors were formalized when, along with Iraq, Turkey and the UK, they created the Central Treaty Organization (CENTO) and later, with Turkey, the Regional Cooperation for Development (RCD). Joint top brass meetings and frequent diplomatic exchanges helped bring the two closer in all domains.
In the 1965 war between India and Pakistan, over the Rann of Kutch marshlands, Iran helped the latter to victory by supplying non-lethal military equipment, as well as cut-price oil and interest free loans. That helped Field Marshal Muhammad Ayub Khan to pose as a war hero and forge a dictatorial system with Tehran's constant support.
A year later, the Shah of Iran played peacemaker by preventing a war between Afghanistan and Pakistan over the North-West Frontier Province, where ethnic Pashtuns formed a majority of the population.
In 1971, another military dictator, General Muhammad Yahya Khan, led Pakistan into a much bigger war with India that led to the secession of East Pakistan (renamed Bangladesh).
Despite massive Iranian support, the Pakistani army suffered a major defeat, one that tempted India to prepare for further operations that could have rendered Pakistan unsustainable as a functioning nation-state.
There, too, intervention by Iran, along with the USSR and the US, helped restrain Indian ambitions and prevented a larger conflagration.
In a stern message to New Delhi, the Shah said:
"Iran has no aggressive intentions, but it will not accept any attempt to liquidate Pakistan. The USSR and India must be fully aware of our resolution.... We do not want a new Vietnam on the frontier of Iran."
The statement shocked India, which had rich historical links with Iran and was engaged in massive industrial and trade projects with Tehran. With the conflict ended, Iran granted Pakistan a $600 billion low-interest loan to help the war-shaken nation regain its bearings.
With General Zia ul-Haq's military coup in Islamabad and later the fall of the Shah in Tehran, the loan was never fully paid.
The mullahs who seized power in Iran in 1979 continued close ties with Pakistan in the hope of launching a massive conversion campaign in the world's third-most-populous Muslim nation. In 1980, once the US had cut diplomatic ties with the Islamic Republic of Iran, the mullahs chose Pakistan to represent Iranian interests in Washington.
The decade-long Soviet intervention in Afghanistan also provided a measure of diplomatic convergence between the two. That was reaffirmed when both Tehran and Islamabad gradually moved towards closer ties with Beijing.
Over the years Pakistan, through the "father" of its own atomic bomb Abdul Qadeer Khan, also helped Iran develop its nuclear weapons capacity close to what is known as the threshold level, that is to say having the scientific and technological ability to produce a nuclear warhead. Iran repaid that favor by supplying Pakistan with cut-price oil and gas.
Nevertheless, bilateral relations remained bogged by an attraction-revulsion accent. Islamabad and Tehran never quite trusted each other. Tehran continued financing militant Shiite groups in Pakistan, while Islamabad refused to allow Iran to open a branch of the Imam Khomeini University in Karachi.
We now know that both sides also tolerated the presence of dissident ethnic Baluch groups on their soil. In 2022, Tehran claimed that some 80 anti-Iran armed groups were based in Pakistani territory. Those groups had allegedly been responsible for dozens of attacks claiming over 300 victims among the Iranian military, notably one of the rising stars of the Islamic Revolutionary Guard Corps, General Nur-Ali Shushtari.
It was on such grounds that Tehran ordered direct military action against targets deep inside Pakistani territory, forcing Islamabad to retaliate to avoid losing face.
Last week, Pakistan claimed that the three villages it had bombed in southeast Iran, killing 11 people, sheltered secessionist Baluch groups.
Despite attempts by both sides to pretend that the recent clashes were a passing storm, it is clear that something deeper and more lasting may be involved.
Tehran is sore that China decided to locate the trade-cum-security hub it wants to build in the Indian Ocean in the Pakistani port of Gawadar on the Arabian Sea, rather than in the Iranian port of Gavatar a few kilometers to its west.
Tehran fears that China's choice indicates Beijing's lack of confidence in Iran's stability once the "Supreme Guide" Ali Khamenei bows off stage, while Pakistan would retain a measure of stability because its system does not depend on a single leader.
Both Tehran and Islamabad are anxious to patch things up as quickly as possible. But one thing is clear: the beautiful vase filled with flowers has been chipped.
Amir Taheri was the executive editor-in-chief of the daily Kayhan in Iran from 1972 to 1979. He has worked at or written for innumerable publications, published eleven books, and has been a columnist for Asharq Al-Awsat since 1987. He is the Chairman of Gatestone Europe.
This article originally appeared in Asharq Al-Awsat and is reprinted with some changes by kind permission of the author.