On December 30, 1999, Richard Myers, then a four-star general in the United States Air Force, sat down for dinner with his wife of thirty-five years, Mary Jo. They lived on Peterson Air Force Base, at the eastern edge of Colorado Springs. Despite the impending New Year, the mood was sombre. When dinner was over, they got in the car. Mary Jo drove for thirty minutes, leaving Myers at the gates of an immense underground missile-command center excavated inside Cheyenne Mountain, known for its role in the 1983 film “WarGames.”

“I kissed my wife goodbye that night,” Myers recalled, with a laugh. “I said, ‘Well, I’ll probably be O.K. Other than a direct nuclear attack, we can exist for a long time inside the mountain. But I hope you guys on the civilian side will be fine.’ ” Mary Jo drove home. Myers retreated underground to begin a gruelling thirty-hour work shift, waiting for the end of the world.

It can be difficult to remember how scary Y2K really was. In retrospect, it can resemble a fever dream—a secular doomsday whose prophets were deeply, even comically, misguided. To some extent, its status as a punch line reflects the scale of its threat. Things couldn’t possibly have been that bad, we think; surely someone, somewhere, was exaggerating. That’s not how Myers—a man who once flew with tactical fighter squadrons in Europe and Southeast Asia and who later became the chairman of the Joint Chiefs of Staff, making him the most senior military official in the United States—recalls it. Without hesitation, he told me that Y2K was the most daunting thing he experienced during his forty years of military service.

Y2K revealed a vulnerability lurking just beneath the surface of things—in their very source code—that, even at the time, seemed both laughably simple and terrifyingly complex. Around the world, virtually all computer systems relied on internal calendars programmed to use just two digits to represent the year. “1998” was “98”; “1999” was “99”; and “2000” was—well, that was the problem exposed by Y2K. When January 1, 2000, rolled around, computers all over the world, from stock-market systems and A.T.M.s to nuclear power stations and gas pumps, would jump back to “00,” a catastrophic resetting of machine time that, it was feared, could trip them into failure or malfunction. Airplanes could turn off midair and fall from the sky; financial systems might freeze; municipal water-filtration plants could fail, polluting drinking supplies for millions; and electrical plants might shut down, plunging civilization into darkness. What’s more, the effects of Y2K would persist. Computers wouldn’t simply start working again when the clock read “01.” Experts feared that the breakdown of digital infrastructure could push the modern world into a new dark age.

On his way underground, passing through Cheyenne Mountain’s massive, twenty-ton blast doors and concrete-lined, reinforced tunnels, Myers knew that something even worse could be in store when the clocks struck midnight. Military command-and-control systems also risked failure—including the early-warning radar networks used to detect incoming missiles. For years, an international crew of computer experts had been working to upgrade or reprogram American military gear in advance of Y2K. But Myers and his colleagues feared that their Russian counterparts hadn’t done the same. There was, they thought, a very real possibility that some sort of error—most likely a radar glitch—might trigger a fatal overreaction on the Russian side, leading to an unprovoked nuclear attack on the United States.

The Department of Defense began preparing for Y2K in 1996, in a vast military-wide effort. Every piece of equipment—from navigation technology and missile-launch platforms to meteorological equipment and radar, from battlefield signalling systems to international communication networks, and even on-base H.V.A.C.—had to be checked. Teams of mechanics and technical troubleshooters were assembled. Military computer programmers worked alongside engineers, on bases all over the world. The teams would roll forward clocks, add software patches, and reset dates, insuring that the world’s largest military wouldn’t shut down at the dawn of the new millennium, its missiles exploding like popcorn in their submarines and silos.

By 1998, it had become clear that the scale of the undertaking required a new, dedicated leadership structure. General Myers was reassigned from his role as Commander of Pacific Air Forces, based in Hawaii, to Colorado’s snowy Peterson Air Force Base, from which he would lead the global Y2K effort. Joining him in a deputy role, and relocating from MacDill Air Force Base, in Florida, was Harry Raduege, then a two-star general. “We had technicians, globally, who went through the entire U.S. military and checked each piece of equipment in command centers, in squadrons and operational areas, around the world,” Raduege said. Particular attention was paid to strategically or organizationally important sites, such as Naval Station Norfolk, Langley Air Force Base, and Camp Pendleton, outside San Diego. When a piece of gear or a particular computer passed the test, a technician would put a small sticker on it, declaring it Y2K-compliant.

Raduege possesses an avuncular joviality, discussing life-and-death matters as though they’re plays in a football game. This made him an excellent ambassador for the Defense Department. Throughout the autumn of 1999, he led a series of town-hall meetings, held in high-school gymnasiums and other places in Colorado Springs, meant to address local questions. “Some people had become very concerned and were stockpiling food and water, with the anticipation that power would go out in major sectors of the United States,” he recalled. “Now, ‘conspiracy theories’ isn’t the right word, but there were a lot of overblown fears that people had. They were really full-spectrum—everything from, ‘Am I going to be safe?’ and ‘Am I going to have food?’ to the possibility of the end of the world.”

Raduege sought to put such fears in context—but the fact of the matter was that he and his team were taking concrete steps to avert the apocalypse. In December, 1999, an exchange program began between the governments of Russia and the United States. Greg Frazier, a civilian employee of the Department of Defense who worked on special communications projects—he helped maintain the emergency teletype system connecting the White House and the Kremlin—was dispatched to Moscow to help install a network of satellite telephones through which the American and Russian governments could communicate during the New Year’s transition. Meanwhile, on December 22nd, nine days before the 2000 rollover, Generals Myers and Raduege welcomed a group of eighteen Russian military advisers to Colorado Springs. The Russians planned to stay well into the new year, and to help their American counterparts watch for signs of global catastrophe.

At Peterson Air Force Base, officials went to great lengths to make their Russian guests feel comfortable. Because federal regulations prohibited smoking indoors, they constructed an outdoor smokers’ deck; apparently, they temporarily revised the base rules so that small quantities of vodka could be kept inside the Russians’ observation room. (Myers also vividly remembers that, when the Russians first arrived at their Colorado Springs hotel, they drank all the miniature bottles of spirits in their minibars.) Members of the Russian delegation received a daily stipend from the U.S. government; compared to their salaries back home, it was apparently quite luxurious. Some used it to pay for dental work; others got prescription eyeglasses. Many bought expensive winter parkas and gloves from Colorado’s numerous sporting-goods stores. Hundreds of social invitations flooded in from local families who wanted to host the Russians for a friendly lunch or dinner. When the delegation stayed in, they arranged for free rentals at Blockbuster.