Pakistan and the United States have had military relations since they established diplomatic relations in 1947. The militaries of the two countries have had historically close ties, and Pakistan was once described as "America's most allied ally in Asia" by Dwight D. Eisenhower, reflecting shared interests in security and stability across South Asia, Central Asia, and parts of Eastern Europe.

Initially, Pakistan cooperated closely with the United States on security matters during the Cold War. However, the relationship deteriorated in the 2010s due to U.S. concerns over Pakistan's alleged support for militant groups in Afghanistan, culminating in the suspension of all U.S. military aid to Pakistan. In response, Pakistan has increasingly turned to military cooperation with China. This partnership deepened following the United States' withdrawal from Afghanistan. According to the United States Institute for Peace, Pakistan has "increasingly sourced from China, especially the higher-end combat strike and power projection capabilities; and Pakistan continues to retire older U.S. and European origin platforms."

U.S. presence in Pakistan

Issues relating to nonproliferation In 1955, after Prime Minister Huseyn Suhrawardy established nuclear power to ease the electricity crisis, the U.S. offered a US$350,000 grant to acquire a commercial nuclear power plant. Following this year, the PAEC signed an agreement with its counterpart, the United States Atomic Energy Commission, where the United States initially started research on nuclear power and training. During the 1960s, the U.S. opened doors for Pakistan's scientists and engineers to conduct research at leading U.S. institutions, notably ANL, ORNL, and LLNL. In 1965, Abdus Salam went to the U.S. and convinced the U.S. government to help establish a national institute of nuclear research in Pakistan (PINSTECH) and a research reactor, Parr-I. The PINSTECH building was designed by leading American architect Edward Durrell Stone; American nuclear engineer Peter Karter designed the reactor, which was then supplied by the contractor American Machine and Foundry. Years later, the U.S. helped Pakistan acquire its first commercial nuclear power plant, Kanupp-I, from GE Canada in 1965. All this nuclear infrastructure was established by the U.S. throughout the 1960s, as part of the congressional Atoms for Peace program.

This relationship changed after Zulfikar Ali Bhutto and the democratic socialists under him decided to build nuclear weapons in response to India's own nuclear program. In 1974, the U.S. imposed embargoes and restrictions on Pakistan to limit its nuclear weapons program. The ban was lifted in early 1975, a decision that was protested by the government of Afghanistan. In the 1980s, the American concerns about Pakistan's role in nuclear proliferation eventually turned out to be valid after the exposure of nuclear programs of Iran, North Korea, Saudi Arabia and Libya.

In the 1980s, the plan to recognise national security concerns and accept Pakistan's assurances that it did not intend to construct a nuclear weapon, Congress waived restrictions (Symington Amendment) on military assistance to Pakistan. In October 1980, a high-level delegation and CMLA General Zia-ul-Haq travelled to the U.S. for their first meeting with former president Richard Nixon. Although the meeting was to discuss the Soviet invasion of Afghanistan, Nixon made it clear he was in favour of Pakistan gaining nuclear weapons capability, whilst also correcting that he was not in a race for the presidential elections. The following year, Agha Shahi made it clear to Alexander Haig that Pakistan "won't make a compromise" on its nuclear weapons program, but assured the U.S. that the country had adopted a policy of deliberate ambiguity, refraining from conducting nuclear tests to avoid divergence in the countries' relations.

In March 1986, the two countries agreed on a second multi-year (FY 1988–93) $4 billion economic development and security assistance program. On October 1, 1990, however, the United States suspended all military assistance and new economic aid to Pakistan under the Pressler Amendment, which required that the President certify annually that Pakistan "does not possess a nuclear explosive device."

India's decision to conduct nuclear tests in May 1998 and Pakistan's response set back US relations in the region, which had seen renewed US interest during the second Clinton Administration. A presidential visit scheduled for the first quarter of 1998 was postponed; under the Glenn Amendment, sanctions restricted the provision of credits, military sales, economic assistance, and loans to the government.

Nonproliferation and security Since 1998, the governments of both countries have been engaged in an intensive dialogue on nuclear nonproliferation and security issues. The first meeting took place in 1998 between Foreign Secretary Shamshad Ahmad and Deputy Secretary of State Strobe Talbott to discuss the issues focusing on CTBT signature and ratification, FMCT negotiations, export controls, and a nuclear restraint regime. The October 1999 overthrow of the democratically elected Sharif government triggered an additional layer of sanctions under Section 508 of the Foreign Appropriations Act, which includes restrictions on foreign military financing and economic assistance. US Government assistance to Pakistan was limited mainly to refugee and counter-narcotics assistance." At the height of the nuclear proliferation case in 2004, President George Bush, delivering a policy statement at the National Defense University, proposed to reform the IAEA to combat nuclear proliferation, and said: "No state under investigation for proliferation violations should be allowed to serve on the IAEA Board of Governors – or on the new special committee. And any state currently on the Board that comes under investigation should be suspended from the Board.""President Announces New Measures to Counter the Threat of WMD", address by President George W. Bush at the National Defense University, 11 February 2004.

Bush's proposal was seen as directed at Pakistan, which had been an influential member of the IAEA since the 1960s and had served on the Board of Governors; it received little attention from other countries' governments. In 2009, Pakistan came under fire for repeatedly blocking the Conference on Disarmament (CD) from holding negotiations on proliferation and disarmament issues after over a decade of inaction, despite severe pressure from major nuclear powers.Pakistan feels heat from nuclear powers over talks block, Agence France-Presse, August 21, 2009. The Chairman of the Joint Chiefs, General Tariq Majid, justified Pakistan's defiance and outlined the fact that atomic deterrence against a possible aggression was a compulsion, and not a choice for Pakistan. He further justified that "a proposed fissile material cutoff treaty would target Pakistan specifically.

In the late 2000s, the United States provided nearly $100 million (USD) in material and training assistance to the Pakistani military to guard its nuclear material, warheads, and weapon-testing laboratories. The assistance program, maintained through the United States Department of Defense (DoD) and Pakistan's Ministry of Defence (MoD), included supplying night-vision devices, helicopters, and nuclear detection equipment. With the United States' assistance, Pakistan established the National Command Authority (NCA) along the lines of the U.S. National Nuclear Security Administration (NNSA) and used its Megaport Program at Port Qasim in Karachi to deploy the radiation-monitoring and imaging equipment, monitored by a Pakistani central alarm station. In 2007, the United States offered the Permissive Action Link (PAL) technology for locking its nuclear devices, which Pakistan turned down—possibly because it feared the secret implanting of "dead switches".Ibid, U.S. Secretly Aids Pakistan in Guarding Nuclear Arms, 2007

According to U.S. defense officials, Pakistan has developed its own technology based on the PAL technology, and the U.S. military officials have stated they believe Pakistan's nuclear arsenal to be well secured.

In addition, the Department of Energy's Federal Protective Forces (ProFor) has provided training to its Pakistani counterpart, the Strategic Plans Division Force (SPD Force) at its "Pakistan Centre of Excellence for Nuclear Security (PCENS)" that was also modelled on ProFor.

On December 10, 2012, the Assistant Secretary for Arms Control, Verification, and Compliance, Rose Gottemoeller, and Additional Secretary for United Nations and Economic Coordination, Aizaz Ahmad Chaudhry, co-chaired the Pakistan-U.S. Security, Strategic Stability, and Nonproliferation (SSS&NP) Working Group in Islamabad. Gottemoeller traveled to Pakistan after former Indian Foreign Secretary Shyam Saran wrote in an article that Pakistan had moved its nuclear doctrine from minimum deterrence to second strike capability and expanded its arsenal to include tactical weapons that could be delivered by short-range missiles like the Hatf-IX. The meeting ended with an agreement on continuing dialogue on a range of issues related to the bilateral relationship, including international efforts to enhance nuclear security and peaceful applications of nuclear energy.

U.S. lease of Pakistan military bases During the war on terror in Afghanistan, the Pakistani administration under then-President Pervez Musharraf made its army airbases and Air Force bases available to the United States military, which were used mainly for logistics, intelligence gathering, and relief efforts. In 2017, then-Prime Minister Shahid Khaqan Abbasi said that there were no longer American military bases in Pakistan.