Inter-Services Intelligence (ISI) is Pakistan's military intelligence and covert operations organization, which has been a separate power base through much of the nation's existence. It has tended to be populated by Islamists, although actions that might seem pro-Islamic often had complex roles in the power struggle with India, and especially with respect to Kashmir. For example, ISI helped create Jaish-e-Mohammed, designated a terrorist group by the U.S., but a proxy that could operate in Kashmir.
The Council on Foreign Relations and other organizations believe that ISI, at least to some extent, cooperates with terrorists, for a variety of reasons. Its reasons include maintaining a Pakistani presence in Afghanistan after the West leaves Afghanistan, so India does not obtain undue influence there.  Beyond Afghanistan, it has been accused of support to the 2005 London bombings, according to a report prepared at the U.K. Defence Academy. 
Hamid Gul, retired chief of ISI,believes that the United States applies a double standard to Pakistan and India with respect to nuclear weapons, a key factor in the strategic relationship involved in Pakistani policy towards India.  The idea that the U.S. tilts toward India is common in Pakistani strategic thinking.
While the U.S. Defense Intelligence Agency disagreed about Gul, Hassan Abbas said he was deeply religious, well educated, and a good political analyst when the matter was not filtered through theology and ideology. He has also said that the 9-11 Attacks were orchestrated by Israel's Mossad.
According to the Federation of American Scientists, ISI's major elements are:
- Joint Intelligence X (JIX) serves as the secretariat which co-ordinates and provides administrative support to the other ISI wings and field organisations. It also prepares intelligence estimates and threat assessments.
- Joint Intelligence Bureau (JIB), responsible for political intelligence, was the most powerful component of the organisation during the late 1980s. The JIB consists of three subsections, with one subsection devoted to operations against India.
- Joint Counter Intelligence Bureau (JCIB) is responsible for field surveillance of Pakistani diplomats stationed abroad, as well as for conducting intelligence operations in the Middle East, South Asia, China, Afghanistan and the Muslim republics of the former Soviet Union.
- Joint Intelligence / North (JIN) is responsible for Jammu and Kashmir operations, including infiltration, exfilteration, propaganda and other clandestine operations.
- Joint Intelligence Miscellaneous (JIM) conducts espionage in foreign countries, including offensive intelligence operations.
- Joint Signal Intelligence Bureau (JSIB), which includes Deputy Directors for Wireless, Monitoring and Photos, operates a chain of signals intelligence collection stations along the border with India, and provide communication support to militants operating in Kashmir.
- Joint Intelligence Technical
There are also is a separate explosives section and a chemical warfare section.
Pakistani intelligence largely failed during the 1965 war in Kashmir. ISI, which had overemphasized political intelligence, lacked the military intelligence to locate an entire Indian armored division. Ayub Khan, in response, set up an investigation under General Yahya Khan.
After the loss of Bangladesh
ISI's role, in the early 1970s, included domestic security within the military, as well as actions against insurgencies.
Anti-Soviet programs, in context
ISI, working with the Central Intelligence Agency, created the Peshawar Seven resistance groups to the Soviets, during the Afghanistan War (1978-92). It is widely credited to having a major role in supporting the formation of the Taliban. These actions were not strictly for reasons of Islamic militancy, but as a part of Pakistani policy towards India.
In July, 1979, before the Soviet invasion, President Jimmy Carter authorized the CIA to start assisting the mujahideen rebels with money and non-military supplies sent via Pakistan. More than 80 Afghan groups asked for support, and the CIA asked Pakistan's Inter-Services Intelligence, "You know the language and culture, not us." ISI reorganized the groups into seven main organizations, called the Peshawar Seven because they came to Peshawar, Pakistan, for funds and orders.
As soon as the Soviets invaded in December 1979, Carter, disgusted at the collapse of detente and alarmed at the rapid Soviet gains, terminated progress on arms limitations, slapped a grain embargo on Russia, withdrew from the 1980 Moscow Olympics, and (with near-unanimous support in Congress) sent the CIA in to arm, train and finance the mujahideen rebels. The US had strong support from Britain, Pakistan and Saudi Arabia, all of whom feared the Soviet invasion was the first step in a grand move south toward the oil-rich Persian Gulf. Carter enlarged his position into the "Carter Doctrine," by which the US announced its intention to defend the Gulf.
Current analysis suggests that the Soviets were not planning a grand move, but were concerned with loss of prestige and the possibility of a hostile Muslim regime that might destabilize its largely Muslim southern republics. The boycott of the Olympics humiliated the Soviets, who had hoped the games would validate their claim to moral equality in the world of nations; instead they were pariahs again.
Non-Afghan volunteers for the mujahideen, especially from Saudi Arabia, became generically known as "Afghan Arabs". Various organizations, including Inter-Services Intelligence of Pakistan, the Services Office, facilitated their movement into the theater of operations. It was U.S. policy, under Operation CYCLONE, to encourage their involvement, and the al-Khifa center in the United States was one source of them.
In the body of U.S. documents released by Wikileaks, according to DER SPIEGEL, Gul was a major supporter of the Taliban. When interviewed by the Christian Science Monitor, however, he denied the allegations. "“This is utter nonsense...Malicious, fictitious, and preposterous – and if this is the condition of US intelligence, then I am afraid it is no wonder they are losing in Afghanistan, and they will lose everywhere they try to poke their nose. ...It’s a bloody shame for [the US] if a 74-year-old general sitting in his small house who has nothing to do within the ISI can pull this off...If I can pull off the defeat of America in Afghanistan, then history books will record it to my credit, and my future generations will rejoice over it.”
After the Soviets
Musharraf and ISI
ISI made use of the relative lawlessness of the Federally Administered Tribal Area (FATA). Pakistan "benefited from FATA being a 'black hole' from which it could launch operations into Afghanistan and train militants operating in Afghanistan, Kashmir, and the rest of India." The Pakistani government also has banned secular political parties from operating there, but has not stopped religious parties from working from mosques and madrassahs. 
- David Ignatius (29 September 2009), "The View From Pakistan's Spies", Washington Post
- Jayshree Bajoria, Eben Kaplan (4 May 2011), The ISI and Terrorism: Behind the Accusations, Council on Foreign Relations
- "Key quotes from the document", BBC News, 28 November 2006
- Arnaud de Borchgrave (21 May 2009), "DE BORCHGRAVE: Pakistan supplants Afghanistan", The Washington Times
- Hassan Abbas (2005), Pakistan's Drift into Extremism: Allah, the Army, and America's War on Terror, M.E. Sharpe, ISBN 0765614979, pp. 134
- "Arnaud de Borchgrave, United Press International editor-at-large, interviews Pakistan ISI Chief General Hamid Gul", Newsweek, 14 September 2001
- Directorate for Inter-Services Intelligence, Federation of American Scientists
- Gretchen Peters (2009), Seeds of Terror: How Heroin is Bankrolling the Taliban and al Qaeda, St. Martin's, ISBN 0312379277, p. 33
- David N. Gibbs, "Reassessing Soviet Motives for Invading Afghanistan: a Declassified History." Critical Asian Studies 2006 38(2): 239-263.
- Matthias Gebauer, John Goetz, Hans Hoyng, Susanne Koelbl, Marcel Rosenbach and Gregor Peter Schmitz (25 July 2010), "The Afghanistan Protocol: Explosive Leaks Provide Image of War from Those Fighting It", DER SPIEGEL
- Issam Ahmed (25 July 2010), "WikiLeaks report fictitious, says Pakistan's ex-spy chief Hamid Gul", Christian Science Monitor
- Rory McCarthy (25 May 2002), "Dangerous game of state-sponsored terror that threatens nuclear conflict: Pakistani leader's attempt to rein in militants is met with defiance", The Guardian
- C. Christine Fair (April 2009), "Time for Sober Realism: Renegotiating U.S. Relations with Pakistan", The Washington Quarterly, DOI:10.1080/01636600902775680, p. 154