There have been scores of books, some of them very good, about the Cuban missile crisis and several documentary movies of varying quality. But Nuclear Folly is arguably the most authoritative and cleverly written work on the subject yet produced.

Packed with fresh information from newly declassified Russian sources, including a KGB archive no researcher has previously accessed, Harvard history professor Serhii Plokhy’s account doesn’t significantly change the story: autumn 1962 was the closest the world has so far come to nuclear Armageddon. What Nuclear Folly does, through a gripping narrative, is to explore the series of bad judgment calls and worse information-gathering that took the US and Soviet leaders to the brink, and how they finally managed, by luck more than wisdom, to avoid catastrophe.

On October 16 1962 the CIA told President John Kennedy they had evidence that the Soviets had installed (as yet unarmed) nuclear missiles in Cuba and that more weapons were on the way. Kennedy knew at once that his presidency would be over if he didn’t find a way of swiftly removing a nuclear threat just 90 miles from mainland US.

In the preceding weeks there had been rumours in the American press about Russian military deployments in Cuba. Nikita Khrushchev, the Soviet leader, assured the president that there were fewer than 10,000 Russian military on the island for defensive purposes, along with old-fashioned munitions, but definitely no nuclear weapons. That is what Kennedy believed and told the American people.

Six days after the CIA revelations, Kennedy was forced to go on TV and tell the world something approaching the truth. The two weeks of eyeball-to-eyeball negotiations between Washington and Moscow, while the world watched, gripped by fear, became part of cold war mythology.

In Washington there were long debates about how to react. True to stereotype, the US military wanted to bomb the Soviet bases and invade Cuba. So at first did Kennedy, though his main fear was that the Russians would retaliate by seizing Berlin, which could have sparked war in Europe.

The president, however, came round to his defence secretary Robert McNamara’s idea of a US naval blockade of Cuba. It is fortunate he did so. What the Americans didn’t know, because their spies somehow managed to miss them, was that there were 43,000 Russian troops in Cuba and nine armed nuclear bombs on warplanes with orders to deploy them against an invasion force. This was revealed 30 years later at a history conference and Plokhy quotes a “horrified” McNamara to conclude “it meant that had a US invasion been carried out . . . there was a 99 per cent probability that nuclear war would have been initiated.”

Nuclear Folly is excellent on the main actors in the drama. In 1962, Kennedy was not the tragic hero he has since become in history. He was inexperienced and had suffered a Cuban humiliation the previous year with the Bay of Pigs invasion fiasco. He could claim few domestic successes and even many of his supporters believed him out of his depth. Khrushchev, by contrast, 23 years older, had experience (he was running Ukraine as local Communist Party chair while Kennedy was still at Harvard).

Why did Khrushchev take the huge gamble of placing missiles on Cuba? Essentially, to change the global balance of forces. The Americans had placed medium-range nuclear missiles in Turkey, closer to the USSR than Cuba was to the US. Moscow had barely objected. Khrushchev did not understand that America would never accept potentially offensive weapons so close to home. The deal that resolved the crisis involved Washington agreeing to remove the missiles in Turkey, though Kennedy insisted the concession be kept secret. In reality, if not in PR terms, the Russians can be said to have “won’’ the Cuban missile crisis — though that did not save Khrushchev, who was removed from power in a Kremlin coup two years later.

Plokhy reveals, from the KGB archives, another of Khrushchev’s mistakes. He had tried to help Kennedy get elected in 1960 against his Republican opponent Richard Nixon and felt he was owed something. During the election he had engineered meetings between Robert Kennedy, the president’s brother and campaign manager, and a KGB agent Yurii Baruskov — “meetings which in today’s parlance would qualify as nothing less than ‘collusion’,” Plokhy notes laconically.

For the past half century many hawkish cold war historians have argued that the Cuban crisis was not so serious as neither side wanted war and that in any case it seemed to justify the “MAD” — mutually assured destruction — theory that kept humanity going. Plokhy, who is also the author of a brilliant history of Chernobyl, vehemently disagrees. In 1962, he writes, there were two powers who didn’t want war but very nearly had one before they looked for a way to avoid it. Now there are several powers who might see a way of winning a war — or prefer losing a war than losing face.

Nuclear Folly: A New History of the Cuban Missile Crisis, by Serhii Plokhy, Allen Lane, RRP£25, 464 pages

Join our online book group on Facebook at FT Books Café