After independence in 1947, two new intelligence agencies were created in Pakistan called the Intelligence Bureau (IB) and Military Intelligence (MI). However, the weak performance of the MI in sharing intelligence between the Army, Navy and Air Force during the Indo-Pakistani War of 1947 led to the creation of the Directorate for Inter-Services Intelligence (ISI) in 1948. The ISI was structured to be manned by officers from the three main military services, and to specialize in the collection, analysis and assessment of external intelligence, either military or non-military. The ISI was the brainchild of Australian-born British Army officer, Major General R. Cawthome, then Deputy Chief of Staff in the Pakistan Army. Initially, the ISI had no role in the collection of internal intelligence, with the exception of the North-West Frontier Province and Azad Kashmir. This changed in the late 1950s when Ayub Khan became the President of Pakistan.
Ayub Khan expanded the role of ISI in safeguarding Pakistan’s interests, monitoring opposition politicians, and sustaining military rule in Pakistan. The ISI was reorganised in 1966 after intelligence failures in the Indo-Pakistani War of 1965, and expanded in 1969. Ayub Khan suspected the loyalty of the East Pakistan based officers in the Subsidiary Intelligence Bureau or the Internal Bureau (IB) branch in Dacca, the capital of then East Pakistan. He entrusted the ISI with the responsibility for the collection of internal political intelligence in East Pakistan. Later on, during the Baloch nationalist revolt in Balochistan in the mid 1970s, the ISI was tasked with performing a similar intelligence gathering operation.
The ISI lost its importance during the regime of Zulfiqar Ali Bhutto, who was very critical of its role during the 1970 general elections, which triggered off the events leading to the partition of Pakistan and emergence of Bangladesh.
The ISI regained its lost glory after Gen. Zia ul-Haq seized power in July 1977. Under his reign, the ISI was expanded by making it responsible for the collection of intelligence about the Sindh based Communist party and monitoring the Shia organization after the Iranian revolution of 1979, as well as monitoring various political parties such as the Pakistan Peoples Party (PPP). The Soviet-Afghan war of the 1980s saw the enhancement of the covert action capabilities of the ISI by the U.S. Central Intelligence Agency (CIA). A special Afghan Section was created under the command of colonel Mohammed Yousaf to oversee the coordination of the war. A number of officers from the ISI's Covert Action Division received training in the US and many covert action experts of the CIA were attached to the ISI to guide it in its operations against the Soviet troops by using the Afghan Mujahideen, specifically the fighters loyal to Gulbuddin Hekmatyar. The United States of America provided technical assistance and financial support to Afghan Mujahideen through ISI.
Further information: Kashmir conflict
In 1988, Pakistani President Zia ul-Haq initiated Operation Tupac, which was designation of a three part action plan for the liberation of Kashmir, initiated after the failure of Operation Gibraltar. The name of the operation came from Túpac Amaru II, the 18th century prince who led the war of liberation in Peru against Spanish rule. By May 1996, at least six major militant organizations, and several smaller ones, operated in Kashmir. Their forces are variously estimated at between 5,000 and 10,000 armed men and were mostly of Pakistani Punjabis and Pashtuns. They were roughly divided between those who support independence and those who support accession to Pakistan.
During 1998-1999, the ISI Director General was sidelined due to his relationship with Prime Minister Nawaz Sharif; General Muhammad Aziz Khan was in operational control and directly answerable only to General Pervez Musharraf.