Somewhere out in the North Atlantic, every hour of the day, every day of the year, a lone submarine glides through the ocean with no real destination. Since 1969, one of the four boats of the UK’s Continuous At-Sea Submarine Deterrent has always been on patrol. Its location known to only a handful, even many of her crew will have no idea where they are.

While many Royal Navy captains hold responsibility for their crew, Trident submarine commanders also bear a far more macabre role: the duty to play Britain’s final political and diplomatic hand possible. Within the bowels of each boat lays two safes, an outer and an inner, and within that inner safe sits the letter of last resort.

One of the first tasks of the Cabinet Secretary on the appointment by the Queen of a new Prime Minister, is to have the new leader write that very letter. After the elation of an election victory, the civil servant informs the politician that this letter will lay out the action the Prime Minister wishes to take, should the government and chain of command be totally destroyed by nuclear attack. Tony Blair, according to his cabinet secretary, was said to have gone “quite white” on being told of his options. Options which do allow a great deal of latitude, with varying degrees of widespread destruction of human life:

Retaliate with nuclear weapons without prejudice. Do not retaliate at all. Allow the commander to act within his own discretion. Place the boat under the control of an allied navy, specifically the Royal Australian Navy or US Navy.

Given some time alone, the Prime Minister is requested to decide and write it in a letter addressed to the commanders of each of the Vanguard-class submarines in the navy. The message is then sealed in an envelope and sent to be placed into the boats’ safes. So far, none of these missives have been opened, and the letters are burned at the end of each premier’s term. The only Prime Minister to comment openly on their orders was Lord Callaghan in an interview with historian Peter Hennessy.

“If it were to become necessary or vital, it would have meant the deterrent had failed, because the value of the nuclear weapon is frankly only as a deterrent. But if we had got to that point, where it was, I felt, necessary to do it, then I would have done it. I’ve had terrible doubts, of course, about this. I say to you, if I had lived after having pressed that button, I could never ever have forgiven myself.”

To get to the stage where the letters can be opened is a long and purposefully difficult journey. First, the Prime Minister must have perished or become incapacitated in some way. Then, his proposed alternate decision makers would had to have met the same fate. It is only after that point that the submarine commanders go anywhere near their safes.

If the Prime Minister or his alternates survive an attack, they will likely be conveyed to a secure bunker underneath the Ministry of Defence in Whitehall, without their families. From there, what remains of the government will issue orders to retaliate through the headquarters of Royal Navy Taskforce 345, based in a bunker under the Chiltern Hills.

In a room described as “quite bland” by a previous commanding officer, two people are on watch 24/7 and are in constant communication with the submarines at sea. It is they who pass on all messages, including those to fire. If the Prime Minister decides to do so, he will submit a code which will then, similarly to the submarines, be confirmed by information contained in the bunker’s safe. Should the authorisation be authenticated, the submarine commander is then given permission to fire.

However, the above scenario relies on a crucial aspect: the centre of government surviving the opening plays of an all-out nuclear war. Which is where the letters of last resort then come in. Should a submarine commander not receive contact from his superiors for some time, he will execute a number of checks. One of which famously is to attempt to listen to the Radio 4 Today programme for several days. The latter requirement caused a scare in 2004 when the station went off air for 15 minutes.

If the tones of James Naughtie do not drift into the control room of the submarine for three successive days, the commander and his executive officer will use their individual keys and unlock the outer and inner safes, and find the fate of Britain resting in a No. 10 Downing Street envelope instructing them exactly what, or perhaps not, to do.