Pakistan launched its nuclear weapons program, a few weeks after its defeat in the Bangladesh Liberation War, as well as the Indo-Pakistani War of 1971.

The Bangladesh Liberation War (Bengali: , pronounced [muktiuddo]), also known as the Bangladesh War of Independence, or simply the Liberation War in Bangladesh, was a revolution and armed conflict sparked by the rise of the Bengali nationalist and self-determination movement in erstwhile East Pakistan which resulted in the independence of Bangladesh. The war began when the Pakistani military junta based in West Pakistan under the orders of Yahya Khan launched Operation Searchlight against the people of East Pakistan on the night of 25 March 1971, initiating the Bangladesh genocide. It pursued the systematic annihilation of nationalist Bengali civilians, students, intelligentsia, religious minorities and armed personnel. The junta annulled the results of the 1970 elections and arrested Prime minister-designate Sheikh Mujibur Rahman. The war ended on 16 December 1971 when the military forces of West Pakistan that were in Bangladesh surrendered in what remains to date the largest surrender of soldiers since the Second World War.Rural and urban areas across East Pakistan saw extensive military operations and air strikes to suppress the tide of civil disobedience that formed following the 1970 election stalemate. The Pakistan Army, which had the backing of Islamists, created radical religious militiasthe Razakars, Al-Badr and Al-Shamsto assist it during raids on the local populace. Urdu-speaking Biharis in Bangladesh (an ethnic minority) were also in support of Pakistani military. Members of the Pakistani military and supporting militias engaged in mass murder, deportation and genocidal rape. The capital Dhaka was the scene of numerous massacres, including Operation Searchlight and the Dhaka University massacre. An estimated 10 million Bengali refugees fled to neighbouring India, while 30 million were internally displaced. Sectarian violence broke out between Bengalis and Urdu-speaking immigrants. An academic consensus prevails that the atrocities committed by the Pakistani military were a genocide.

The Bangladeshi Declaration of Independence was broadcast from Chittagong by members of the Mukti Bahinithe national liberation army formed by Bengali military, paramilitary and civilians. The East Bengal Regiment and the East Pakistan Rifles played a crucial role in the resistance. Led by General M. A. G. Osmani and eleven sector commanders, the Bangladesh Forces waged a mass guerrilla war against the Pakistani military. They liberated numerous towns and cities in the initial months of the conflict. The Pakistan Army regained momentum in the monsoon. Bengali guerrillas carried out widespread sabotage, including Operation Jackpot against the Pakistan Navy. The nascent Bangladesh Air Force flew sorties against Pakistani military bases. By November, the Bangladesh forces restricted the Pakistani military to its barracks during the night. They secured control of most parts of the countryside.The Provisional Government of Bangladesh was formed on 17 April 1971 in Mujibnagar and moved to Calcutta as a government in exile. Bengali members of the Pakistani civil, military and diplomatic corps defected to the Bangladeshi provisional government. Thousands of Bengali families were interned in West Pakistan, from where many escaped to Afghanistan. Bengali cultural activists operated the clandestine Free Bengal Radio Station. The plight of millions of war-ravaged Bengali civilians caused worldwide outrage and alarm. India, which was led by Indira Gandhi, provided substantial diplomatic, economic and military support to Bangladeshi nationalists. British, Indian and American musicians organised the world's first benefit concert in New York City to support the Bangladeshi people. Senator Ted Kennedy in the United States led a congressional campaign for an end to Pakistani military persecution; while U.S. diplomats in East Pakistan strongly dissented with the Nixon administration's close ties to the Pakistani military dictator Yahya Khan.

India joined the war on 3 December 1971, after Pakistan launched preemptive air strikes on North India. The subsequent Indo-Pakistani War witnessed engagements on two war fronts. With air supremacy achieved in the eastern theatre and the rapid advance of the Allied Forces of Mukti Bahini and Indian military, Pakistan surrendered in Dacca on 16 December 1971.

The war changed the geopolitical landscape of South Asia, with the emergence of Bangladesh as the seventh-most populous country in the world. Due to complex regional alliances, the war was a major episode in Cold War tensions involving the United States, the Soviet Union and the People's Republic of China. The majority of member states in the United Nations recognised Bangladesh as a sovereign nation in 1972.

Pakistan is one of nine states to possess nuclear weapons. Pakistan began development of nuclear weapons in January 1972 under Prime Minister Zulfikar Ali Bhutto, who delegated the program to the Chairman of the Pakistan Atomic Energy Commission (PAEC) Munir Ahmad Khan with a commitment to having the device ready by the end of 1976. Since PAEC, which consisted of over twenty laboratories and projects under reactor physicist Munir Ahmad Khan, was falling behind schedule and having considerable difficulty producing fissile material, Abdul Qadeer Khan, a metallurgist working on centrifuge enrichment for Urenco, joined the program at the behest of Bhutto administration by the end of 1974. As pointed out by Houston Wood, "The most difficult step in building a nuclear weapon is the production of fissile material"; as such, this work in producing fissile material as head of the Kahuta Project was pivotal to Pakistan developing the capability to detonate a nuclear bomb by the end of 1984.The Kahuta Project started under the supervision of a coordination board that oversaw the activities of KRL and PAEC. The Board consisted of A G N Kazi (secretary general, finance), Ghulam Ishaq Khan (secretary general, defence), and Agha Shahi (secretary general, foreign affairs), and reported directly to Bhutto. Ghulam Ishaq Khan and General Tikka Khan appointed military engineer Major General Ali Nawab to the program. Eventually, the supervision passed to Lt General Zahid Ali Akbar Khan in President General Muhammad Zia-ul-Haq's Administration. Moderate uranium enrichment for the production of fissile material was achieved at KRL by April 1978.Pakistan's nuclear weapons development was in response to the loss of East Pakistan in 1971's Bangladesh Liberation War. Bhutto called a meeting of senior scientists and engineers on 20 January 1972, in Multan, which came to known as "Multan meeting". Bhutto was the main architect of this programme, and it was here that Bhutto orchestrated the nuclear weapons programme and rallied Pakistan's academic scientists to build an atomic bomb in three years for national survival.At the Multan meeting, Bhutto also appointed Munir Ahmad Khan as chairman of PAEC, who, until then, had been working as director at the nuclear power and Reactor Division of the International Atomic Energy Agency (IAEA), in Vienna, Austria. In December 1972, Abdus Salam led the establishment of Theoretical Physics Group (TPG) as he called scientists working at ICTP to report to Munir Ahmad Khan. This marked the beginning of Pakistan's pursuit of nuclear deterrence capability. Following India's surprise nuclear test, codenamed Smiling Buddha in 1974, the first confirmed nuclear test by a nation outside the permanent five members of the United Nations Security Council, the goal to develop nuclear weapons received considerable impetus.Finally, on 28 May 1998, a few weeks after India's second nuclear test (Operation Shakti), Pakistan detonated five nuclear devices in the Ras Koh Hills in the Chagai district, Balochistan. This operation was named Chagai-I by Pakistan, the underground iron-steel tunnel having been long-constructed by provincial martial law administrator General Rahimuddin Khan during the 1980s. The last test of Pakistan was conducted at the sandy Kharan Desert under the codename Chagai-II, also in Balochistan, on 30 May 1998. Pakistan's fissile material production takes place at Nilore, Kahuta, and Khushab Nuclear Complex, where weapons-grade plutonium is refined. Pakistan thus became the seventh country in the world to successfully develop and test nuclear weapons. Although, according to a letter sent by A.Q. Khan to General Zia, the capability to detonate a nuclear bomb using highly enriched uranium as fissile material produced at KRL had been achieved by KRL in 1984.