On May 30, 1990, President Mikhail Gorbachev of the Soviet Union arrived in Washington for his second summit meeting with President George Bush. The Cold War was over, and the publicly announced agenda reflected that fact: the two world leaders would concentrate their talks on the future of unified Germany and on renewed negotiations to reduce long-range nuclear weapons. Most Americans were increasingly upbeat about the prospects for world peace. A Times/CBS public-opinion poll of more than eleven hundred Americans taken a week before the summit showed that fewer than one in five believed nuclear war to be likely by the year 2000—far fewer than those interviewed in earlier polls.

There was a fearful irony in the poll, because in the days before Gorbachev’s visit the Bush Administration became convinced that the world was on the edge of a nuclear exchange between Pakistan and India, as both nations continued their tug-of-war over control of the state of Kashmir, on India’s northern border, whose status has been in dispute since the collapse of the British Empire in India, in 1947. During months of increasing tension, India had massed two hundred thousand troops, including paramilitary forces, in Kashmir, and had deployed five brigades of its most sophisticated attack unit, the Indian Army Strike Corps, fifty miles from the Pakistani border in the south. Pakistan, against which the much larger India had fought—and won—three wars since 1947, openly deployed its main armored tank units along the Indian border and, in secret, placed its nuclear-weapons arsenal on alert. There would be no repeat of the disastrous two-week war of December, 1971, when Pakistan, outgunned and outgeneraled, was dismembered by an Indian blitzkrieg and lost what is now Bangladesh.

The American intelligence community, also operating in secret, had concluded by late May that Pakistan had put together at least six and perhaps as many as ten nuclear weapons, and a number of senior analysts were convinced that some of those warheads had been deployed on Pakistan’s American-made F-16 fighter planes. The analysts also suspected that Benazir Bhutto, the populist Prime Minister of Pakistan, had been cut out of—or had chosen to remove herself from—the nuclear planning. Her absence meant that the nation’s avowedly pro-nuclear President, Ghulam Ishaq Khan, and the Pakistani military, headed by Army General Mirza Aslam Beg, had their hands, unfettered, on the button. There was little doubt that India, with its far more extensive nuclear arsenal, stood ready to retaliate in kind.

Since the last week of May was summit week, President Bush and his top aides were preoccupied with Gorbachev and crucial questions about his status inside the Soviet Union. A full understanding of what could happen in South Asia during those days was thus most vivid to the men and women running American intelligence, who knew that Pakistan had long been America’s ally in the clandestine war against the Soviet Union. As early as 1950, the Pakistani government had effectively ceded remote areas of its northern provinces to the Central Intelligence Agency and to the National Security Agency—the larger and still more secretive group that, from its headquarters, at Fort Meade, in Maryland, is responsible for communications intelligence. It was from northern Pakistan that the N.S.A. eavesdropped on the Soviet nuclear facilities in Kazakhstan; it was Pakistan that provided secret bases for America’s U-2 spy flights; and it was Pakistan that served as a key jumping-off point for intelligence gathering and anti-Soviet activities by the C.I.A.

Pakistan was rewarded for its support with large amounts of American military and economic aid. The American intelligence community, to protect its investment and its continuing operations, spent many millions of dollars to recruit agents and to install technical equipment to learn as much as possible about the inner workings of its ally. Those agents and that equipment enabled America to ascertain, in the early spring of 1990, that Pakistan had gone nuclear, and that its leadership was fully prepared to use the weapons, if necessary, in a war against India.

Two of the men most deeply involved in the May, 1990, crisis recently agreed, for the first time, to discuss in on-the-record interviews what had happened. Richard J. Kerr, an even-tempered, low-key career intelligence officer, who, as deputy director of the C.I.A., coördinated the intelligence reporting in May of 1990, described the confrontation in stark terms: “It was the most dangerous nuclear situation we have ever faced since I’ve been in the U.S. government. It may be as close as we’ve come to a nuclear exchange. It was far more frightening than the Cuban missile crisis.” Kerr retired as deputy director last year, after thirty-two years in the C.I.A.

At the height of the American concern, President Bush called on Robert M. Gates, a former longtime C.I.A. official who was then serving in the White House as the deputy national-security adviser, to fly on his behalf to Islamabad and New Delhi and negotiate a stand-down between the two perennial enemies. Gates’s career at the C.I.A. had been mired by his closeness to William J. Casey, Ronald Reagan’s controversial C.I.A. director, who led the nation into the Iran-Contra morass. After Casey’s death, in early 1987, Reagan failed in an attempt to install Gates at the top of the C.I.A., and the young Casey protégé—he was forty-three years old at the time—was eventually moved into the White House job. His performance as deputy national-security adviser finally won him respect throughout the bureaucracy. Gates told me that he, too, knew that a holocaust was at risk in May. “The analogy we kept making was to the summer of 1914,” he said, referring to the inadvertent outbreak of the First World War. “Pakistan and India seemed to be caught in a cycle that they couldn’t break out of. I was convinced that if a war started, it would be nuclear.”

An enduring mystery is why the essential details of the India-Pakistan confrontation have remained a secret for almost three years, especially since it was the intervention of President Bush’s personal White House envoy that defused what looked to be inevitable warfare. Stopping a nuclear exchange seemed made to order for the public-relations machinery of the White House. A few newspaper and television reports since 1990—most notably in the Sunday Times of London and the Los Angeles Times and on NBC’s “Nightly News”—have given some details of the India-Pakistan nuclear crisis, but the reports, whose sources were not named, were debunked by the Bush Administration as exaggerations. Similarly, many officials assured me, in the course of my reporting for this article, that, as a retired Under-Secretary of State put it, “there was a lot of oversell going on.”

An obvious explanation for the high-level quiet revolves around the fact, haunting to some in the intelligence community, that the Reagan Administration had dramatically aided Pakistan in its pursuit of the bomb. President Reagan and his national-security aides saw the generals who ran Pakistan as loyal allies in the American proxy war against the Soviet Union in Afghanistan: driving the Russians out of Afghanistan was considered far more important than nagging Pakistan about its building of bombs. The Reagan Administration did more than forgo nagging, however; it looked the other way throughout the mid-nineteen-eighties as Pakistan assembled its nuclear arsenal with the aid of many millions of dollars’ worth of restricted, high-tech materials bought inside the United States. Such purchases have always been illegal, but Congress made breaking the law more costly in 1985, when it passed the Solarz Amendment to the Foreign Assistance Act (the amendment was proposed by former Representative Stephen J. Solarz, Democrat of New York), providing for the cutoff of all military and economic aid to purportedly non-nuclear nations that illegally export or attempt to export nuclear-related materials from the United States.