I have said many times that when the Taliban took control of Afghanistan (1996-2001) the Americans were asking them to allow the pipelines of Central Asia to reach India, in return for American recognition for their government.
The negotiations between the Americans and the Taliban were closely monitored and sabotaged by Al-Qaeda, with the 1998 attack on the American embassies during the Clinton administration, and wth the attacks on the Twin Towers in 2001 during the Bush administration. See “The Afghan Oil Pipeline and the US Negotiations with the Taliban”.
Map of Asia
When the negotiations between the Americans and the Taliban collapsed in 2001, and the Americans overturned the Taliban government in Afghanistan, the Pakistanis found themselves between a rock and a hard place because both the Afghan Taliban and the Americans were their allies.
On one hand the Afghan Taliban were to a large extent the creation of the Pakistani secret services, and in Afghanistan they were fighting Pakistan’s enemies i.e. the forces supported by Iran and India, and on the other hand the United States was providing Pakistan with huge amounts of military and financial assistance.
The Americans provide Pakistan with approximately 1 billion dollars of military assistance per year, and after the 2001 War of Afghanistan this assistance has increased. Given that an F-16 costs approximately 50 billion dollars, Pakistan can buy 20 F-16s per year with this assistance. Only the Israelis and the Egyptians receive more military aid from the Americans.
Therefore Pakistan found itself in the middle of a war which was fought by two friends. And it was not only the issue of the Taliban. Al-Qaeda, which was the main concern of the Americans, was funded with Arab money, and Al-Qaeda was helping and funding the Taliban, and the Taiban had given refuge to Al-Qaeda. Therefore by attacking the Taliban Pakistan would attack a friend, and by attacking Al-Qaeda Pakistan would attack the friend of a friend.
The Pakistanis are neither Arabs nor Persians (Iranians), they are Sunni Muslims, and Sunnitism brings them closer to the Arabs, and geography brings them closer to Iran. The Pakistanis have been traditionally trying to get funding from both the Arabs and the Iranians.
To a large extent the Saudis financed the Pakistani nuclear program, and in the black market the Pakistanis were selling nuclear technology to the Iranians, while at the same time they were promising the Saudis that they would provide them with nuclear weapons if Iran was to attack them.
I think that the cooperation between the Pakistanis and the Iranians on nuclear energy ended when Qaddafi, the Libyan dictator, surrendered his nuclear equipment to the Americans in 2003, and it was obvious that it was made in Pakistan. See “The Cooperation between Qaddafi and George Bush”.
After that Pakistan had to change its policies. I guess Iran was trying to obtain assistance for its nuclear program from North Korea and Argentina. See the American think tank Gatestone Institute “Nuclear Cooperation between Argentina and Iran?”, July 2011.
Remember that Russia does not want Iran to obtain nuclear weapons, because they are competing in the natural gas and oil markets, and at some point Iran might use these weapons against Russia. Moreover China does not want to help Iran, at least not directly, because that would create a lot of tension in the American-Chinese relations.
Having said that Pakistan was getting both Iranian and Arab money, I have to say that for the last decades the Pakistanis are considered a closer ally of the Arabs. At least this was the case until recently.
But let me go back to Al-Qaeda. When Pakistan was attacking Al-Qaeda in Afghanistan, in order to please the Americans, it created problems in its relations with the Taliban, with some Arab friends, with some Pakistanis who have strong connections with Al-Qaeda. Pakistan even created problems in its relations with Iran, because in Afghanistan Iran and Al-Qaeda were together fighting the Americans.
In addition, Al-Qaeda was supporting valuable to Pakistan terrorist organizations which attack India, and fight India in Kashmir. See “Al-Qaeda VS India”.
The Pakistanis followed a contradictory policy of supporting both the Americans and the Taliban, and by supporting the Taliban they provided some indirect support to Al-Qaeda. However in various cases Pakistan, together with the Americans, attacked Al-Qaeda, and in 2007 the Taliban of Pakistan were created in Pakistan, probably by Al-Qaeda, in order to attack Pakistan. Note that the Afghan Taliban are Pakistan’s allies, while the Pakistani Taliban are Pakistan’s enemies.
However most Taliban are Pashtuns, and there are connections between the Afghan and the Pakistani Taliban, even though they follow different policies. The Pakistani Taliban have been supported by other enemies of Pakistan, for example the opponents of Pakistan in Afghanistan i.e. the Shia Hazara, the Tajics, the Uzbkes etc.
The problem for Pakistan is that neither the Americans nor the Taliban are happy with Pakistan’s contradictory policies. But it is very difficult for Pakistan to choose one side or the other.
Note that Osama bin Laden was hiding in Pakistan until the Americans kill him in 2011, and obviously the Pakistani secret services new about that, and they were very upset with the Americans when they killed bin Laden. See “Pakistan-Osama bin Laden”.