It's the closest the nuclear clock has come to midnight. It is October 1962, Soviet freighters are about to breach a US naval blockade of Cuba, where days earlier a US spy plane has provided photographs of secret missile sites being constructed on the island, just 90 miles from the United States.

President John F Kennedy has warned that breaching the embargo will provoke nuclear war. And today, October 27, another U-2 has been shot down over Cuba and the pilot, Major Rudolph Anderson, killed.

It was the culmination of the most dangerous phase of the Cold War, with Russian president Nikita Khruschev testing Kennedy, not even two years since winning the election against Richard Nixon, with the young JFK determined not to quail.

The episodic drama really began with the Cuban Revolution in 1959 when the corrupt Batista regime was overthrown by Fidel Castro, his brother Raul, Che Guevara and the small band of men who landed from the ship Granma and swept up support as they went, before arriving triumphantly in Havana.

Raul was a committed communist, Fidel not quite so, the US government would have no truck with the revolutionaries so they looked to Moscow for aid and support.

READ MORE: Trevor Royle on a Cold War thriller with Soviet soul

Khruschev, for his part, was looking for a way to equal the United States massive superiority in long-range missile capability.

"Why not throw a hedgehog in Uncle Sam's pants?" he said to foreign minister Rodion Malinovsky.

He later told his defence council: ''The Americans had surrounded our country with military bases and threatened us with nuclear weapons, and now they would learn just what it feels like to have enemy missiles pointing at you.''

The decision was taken to build the bases in Cuba but the plan, rather naively, relied on US intelligence not detecting them, so that Kennedy would be presented with a fait accompli, and that the president, when he learned of the sheaf of missiles pointed at the US and able to strike most parts of it, he would not order their obliteration.

On October 14 the 13 days that shook the world began. A U-2 spy plane piloted by Major Richard Heyser took hundreds of photographs which revealed the newly-built installations in the Cuban countryside.

For days to come Heyser was consumed with worry that history would record him as the man who started the nuclear war.

A day later CIA analysts detected launchers, transport trucks and missiles capable of striking targets across the United States.

On October 16, defence secretary Robert McNamara, presented Kennedy with three options – diplomacy, talks with Khruschev Castro, or an air attack to destroy the sites which will inevitably kill hundreds of Soviet personnel and trigger a Soviet counter-attack, likely to be in Berlin, or a naval quarantine - he's careful to call it that because a blockade is an act of war – to buy time to negotiate a missile withdrawal. Kennedy opts for the third and sends in the ships.

READ MORE: From Mars to Dundee: The prison ship that shaped generations

On Monday, October 22, Kennedy began a dramatic, 18-minute speech to the US public, and the world, reveals incontrovertible evidence of the missile threat and announced that the US would prevent ships carrying weapons reaching Cuba, as well as demanding Russia withdraw the missiles.

Along with this the US Ambassador to Cuba was delivering a message to Khruschev – there was no hot line then – about the determination of the United States and the hope that the two countries not be plunged into a war "which could only result in catastrophic consequences to the whole world, including the aggressor.”

A day later Khruschev writes to JFK rebuffing the demand, insisting the missiles are only defensive ones. Kennedy immediately responds by telling the Soviet leader that he started the crisis.

Ambassador to the UN Adlai Stevenson explains it all to the Security Council as US warships move into place, shadowed by Soviet nuclear submarines. The 25 Soviet freighters pause in the water.

On October 24 Khruschev sends an angry letter to JFK accusing him of threatening the USSR. "You are no longer appealing to reason but threatening us."

The following day 24 of the Soviet ships turn back, but the Bucharest continues with two US warships preparing to intercept it, which would almost certainly have led to war.

Kennedy allows the ship through because it has been established that it carries no weaponry.

On Friday, October 25 Castro sends a letter to the Soviet president urging him to launch a nuclear first strike, instead, a day later, Khruschev writes to JFK urging him to work with him to de-escalate the crisis so that it did not "doom the world to the catastrophe of thermonuclear war".

The following day, on this day in 1962, the U-2 plane was shot down over Cuba and nuclear war seemed to be, once more, the likely outcome.

However Kennedy, stepping back, reckoned, quite rightly, that Khruschev had not authorised it.

JFK's brother Robert, then US Attorney General and part of the inner Ex-Comm team gathered in Washington, told Soviet ambassador Anatoly Dobrynin, "You have drawn first blood ... . [T]he president had decided against advice ... not to respond militarily to that attack, but he [Dobrynin] should know that if another plane was shot at, ... we would take out all the SAMs and anti-aircraft ... . And that would almost surely be followed by an invasion."

But rather than precipitating the war, the incident had a salutary effect on both leaders who realised that the crisis was spiralling dangerously out of control.

Khruschev sent another letter to JFK demanding that in any deal there is a quid pro quo, with the US withdrawing missiles from Turkey. RFK, in his meeting with Dobrynin, tells the ambassador that the US was already planning to withdraw them, but would not say publicly.

Face was saved on both sides.

On October 28, in an open message to Kennedy on Moscow Radio, Khruschev announced that an agreement had been reached and all Soviet missiles in Cuba would be dismantled and shipped back to Russia.

JFK reciprocated by promising that the US would not invade Cuba, while secretly agreeing to take out the threatening Turkish missiles.

The missiles were removed from Cuba by the end of 1962 and a year later the US ones were withdrawn from Turkey and hot line between the US and USSR was set up to prevent a similar crisis occurring.

And the nuclear clock returned to five minutes to midnight.