Forget Dr Strangelove: the real-life records of our narrowest escape make for explosive reading. Adam Newey reports; One Hell of a Gamble: the secret history of the Cuban missile crisis by Aleksandr Fursenko and Timothy Naftali John Murray, pounds 25 The Kennedy Tapes : inside the White House during the Cuban missile crisis edited by Ernest R May and Philip D Zelikow Harvard University Press, pounds 23.50
For those who like to indulge in counterfactual history, the Cuban missile crisis has long provided some hefty food for thought. How would Khrushchev have responded if Kennedy had followed his first instinct and ordered air strikes on the Soviet missile bases? What if the American blockade of Cuba hadn't worked? Would we even be here, 35 years on, to argue the point?

The publication of these two detailed and authoritative books - one based on hitherto-unseen Soviet documents, the other on secretly recorded tapes of White House meetings - blows all such questions out of the water. "The Soviets," Fursenko and Naftali write in their introduction to One Hell of a Gamble, "were compulsive notetakers." Thanks to this, we now have something of an answer to what then was the great unknowable: what on earth were the Russians playing at?

Fursenko and Naftali start at the beginning, just prior to Castro's victorious entry to Havana on New Year's Day, 1959. They examine closely the revolutionary government's gradual alignment towards Moscow, a far from preordained outcome. One of their strengths is that it treats the Cubans as more than simply a chip in the global game of superpower poker.

The book shows how extraordinarily dangerous a game that was, and how high the stakes. From this distance the major players, Kennedy, Khrushchev and Castro, look as though they are recklessly spoiling for a scrap. Even the generally docile Cuban president, Osvaldo Dortcos, boasted to the UN that Cuba could "become the starting point of a new world war". As the missiles rolled into Cuba, Castro echoed him: "The US could begin it," he warned, "but they would not be able to end it."

It wasn't just rhetoric. The book argues convincingly that the Soviet commander in Cuba came within an ace of being authorised by Moscow to use tactical nuclear weapons in the event of a US invasion. Kennedy came within an ace of ordering that invasion.

Yet the locker-room machismo that fuelled the crisis is partly offset by the disarming naivety of some of the stratagems employed, in particular on the Soviet side. When they wanted to fool US intelligence into thinking the Cuban nuclear shipment (cunningly codenamed Operation Ortsac) was actually heading for Siberia rather than the Caribbean, they loaded it up with sheepskin coats, felt boots and fur hats.

With the Kremlin desperately seeking any indication of what the White House was thinking, they relied heavily on what Johnny Prokov, the barman at the National Press Club in Washington, overheard at the bar. This isn't the Cold War of John Le Carre and Frederick Forsyth; more like Abbott and Costello.

The Kennedy Tapes, on the other hand, is an unremitting white-knuckle ride through the 14 crucial days in which the world seemed to be hurtling towards nuclear wipeout. Unknown to anyone except his secretary, Kennedy recorded the meetings of the Executive Committee which he assembled to debate the options open to him. The tapes were released in full late last year; now they have been painstakingly transcribed and expertly edited.

The start of each chapter gives the background to that day's events. The febrile, closeted atmosphere in the Oval Office and Cabinet Room comes through strongly, as the Ex Comm debates lurch between "eliminating the Cuban problem by actually eliminating the island", as Secretary of State Dean Rusk puts it on day one, to the eventual decision to blockade Cuba and hope for the best.

The book is long but grips the reader with all the macabre compulsiveness of a Stephen King thriller. The frequent elisions, where poor tape quality has defeated the editors' attempts at decipherment, only serve to crank up the tension. This is a chilling drama, all the more so for the apparent sangfroid with which the most horrendous consequences are anatomised. At one point, Ex Comm works through Khrushchev's likely response to a US invasion of Cuba:

JFK: He'll grab Berlin, of course.

McGeorge Bundy: If we could trade off Berlin and not have it our fault...

Robert McNamara: Well, when we're talking about [the USSR] taking Berlin, what do we mean, exactly? That they take it with Soviet troops?

JFK: That's what I would think.

Unidentified: Then what do we do?

George Ball: Go to general war.

JFK: You mean a nuclear exchange?

Unidentified: Mmm-hmm. That's right.

The Kennedy Tapes gives an extraordinary insight into high-level decision- making at a time of unprecedented crisis. Taken together, these two books form the nearest thing to a definitive account of the period one could hope for. It's a miracle we're still around to enjoy them.