It started in 1964. On october 16 to be precise, when China completed its firsts nuclear tests, two years after winning a quick war against India. Since its independence in 1947, India was striving to become a nuclear power. But after 1964, the country redoubled its efforts till 1974, when India led its first nuclear test in the Thar desert, very near the Pakistan border. Since then, Zulfikar Ali Bhutto, then Prime minister of Pakistan, decided his country had to become a nuclear power too, regardless of the cost.
The reason why Pakistan was so eager to have the bomb is because the Indian conventional forces were stronger than the Pakistani ones. There had been already three wars between the two countries : in 1947, 1965 and 1971. All wars had been won by India. So, only the nuclear weapon would give to Pakistan a margin to manoeuvre towards its Indian neighbour and enemy. Moreover, if they succeeded, Pakistan would be the first muslim country to become a nuclear power. It would be a source of national pride for the country and an object for the muslims around the world.
So Pakistan led a clandestine nuclear weapons program that benefitted from many supports : financial from arab countries, technological from China and western companies. The U.S.A. didn’t approve this program but turned a blind eye because Pakistan autorities helped the U.S.A. to fight the U.S.S.R. in Afghanistan. Because of the good relations between Pakistan and U.S.A., the general Zia ul-Haq, the new ruler of Pakistan since 1977, could strenghten its combat aircraft ( whose primary target could only be India). And in 1987, the same general said its country had the technology to assemble a bomb.
After the end of the Afghanistan war in 1989, Washington started a sanctions policy towards Pakistan. But without success. In 1990, China delivered M-11 missiles or their components and in april 1998, the Ghauri I ( with a 1500 kms range, something like 900 miles range) essay was conducted. It was the answer to the Agni missile test led by India earlier. The Indian nuclear tests led the same year on may 11 and 13 led to the reply of Pakistan. On may 28 and 30, six nuclear tests were conducted ( in the Chagaï hills near the Afghanistan border) despite of the U.S.A. pressures.
Since 1971, India and Pakistan have never been at war again, though the Kargil fightings in 1999 could have led to another war between the two neighbours. The seventies as well as the eighties have illustrated this logic of cold war or armed peace that has resulted in the accelerated quest for nuclear weapons. Since then, the two main countries of South Asia have never experimented such a long period of peace.