Main articles: Benazir Bhutto, Nawaz Sharif, Indo-Pakistani War of 1999, Chagai-I, Chagai-II, Atlantique Incident, and Civil war in Afghanistan (1996–2001)
From 1988 to 1999, Pakistan through constitutional amendments was reverted back to Parliamentary democracy system, and Pakistan was ruled by elected civilian governments, alternately headed by Benazir Bhutto and Nawaz Sharif, who were each elected twice and removed from office on charges of corruption. During the late 1990s, Pakistan was one of three countries which recognized the Taliban government and Mullah Mohammed Omar as the legitimate ruler of Afghanistan. Allegations have been made of Pakistan and other countries providing economic and military aid to the group from 1994 as a part of supporting the anti-Soviet alliance. It is alleged that some post-invasion Taliban fighters were recruits drawn from Pakistan's madrassahs. Economic growth declined towards the end of this period, hurt by the Asian financial crisis, and economic sanctions imposed on Pakistan after its first tests of nuclear devices in 1998. The Pakistani testing came shortly after India tested nuclear devices and increased fears of a nuclear arms race in South Asia. The next year, Kargil attack by Pakistan backed Kashmiri militants threatened to escalate to a full-scale war.
In the 1997 election that returned Nawaz Sharif as Prime Minister, his party received a heavy majority of the vote, obtaining enough seats in parliament to change the constitution, which Sharif amended to eliminate the formal checks and balances that restrained the Prime Minister's power. Institutional challenges to his authority led by the civilian President Farooq Leghari, military chief Jehangir Karamat and Chief Justice Sajjad Ali Shah were put down and all three were forced to resign - Shah doing so after the Supreme Court was stormed by Sharif partisans.