Image copyright PA Image caption The Royal Navy's Vanguard nuclear submarine

As MPs consider the future of Britain's nuclear deterrent, James Jinks, an expert on the history of the submarine service, examines the prospects for a replacement to Trident.

Early in any new premiership, a new prime minister is asked to write "the last resort letters".

This is a set of instructions for the commanding officers of the Royal Navy's four Vanguard class ballistic missile carrying submarines, which are only to be opened in the event that the prime minister is wiped out in a nuclear attack.

"It's a very big moment," admitted Theresa May's predecessor, David Cameron, in an interview with me and my colleague Peter Hennessey.

"It's the oddest in a way. You've seen prime ministers drive up to Buckingham Palace. You've seen them walking through the door of No 10.

"You can't really believe you're doing it yourself, but that bit in your office, writing out the letters... it is such an extraordinary thing to have to do, you can't really imagine it until you do it."

On Monday, Mrs May will ask the House of Commons to approve a motion on the United Kingdom's independent nuclear deterrent and to support a "decision to take the necessary steps required to maintain the current posture by replacing the current Vanguard-class submarines with four successor submarines".

The debate will mark the culmination of a process that started in December 2006, when Tony Blair's cabinet met and agreed, without a single dissenting voice, to sustain the nuclear deterrent over the period 2020 to 2050 and beyond, by building four new submarines. That's the minimum number required to ensure one submarine is always at sea, providing what is known as continuous at sea deterrence.

The decision was endorsed by parliament in 2007, and in two Strategic Defence and Security Reviews (SDSR) in 2010 and 2015.

The scale, complexity and cost of the acquisition programme is vast.

The government describes it as "a national endeavour… one of the largest government investment programmes, equivalent in scale to Crossrail or HS2".

It is estimated to cost £31bn (including inflation), with a contingency of a further £10bn, spread over 35 years.

Mrs May's views are well known. "It would be sheer madness to contemplate even for a moment giving up Britain's independent nuclear deterrent," she wrote a few weeks ago.

Opponents argue that the UK no longer needs nuclear weapons, that the cost is too high and that emerging capabilities, such as cyber attacks, autonomous underwater vehicles or underwater drones, will make submarines vulnerable.

The government, which devotes considerable resources to assessing the threats from emerging capabilities, rejects such arguments. "The submarines that carry our Trident missiles will not be rendered obsolete by new technologies," said Philip Dunne, minister of state for defence procurement on 19 May.

Given the Conservative majority in the House of Commons, the motion will almost certainly pass. But Mrs May cannot count on the support of some in the Labour Party.

Jeremy Corbyn, a unilateralist and member of the Campaign for Nuclear Disarmament, has spent his life campaigning against nuclear weapons. He believes that ridding Britain of nuclear weapons is a moral issue.

Many Labour MPs disagree. Mr Corbyn is expected to offer Labour MPs a free vote.

"We are going to have a discussion about it," he said last week. "I recognise there are big differences of opinion on it.

"My views are very well known on this, the views of others are well known on this, and so there may well be MPs voting in different lobbies."

If the motion passes work on the "successor" submarines will almost certainly continue until the 2020 election, due under the Fixed-term Parliaments Act.

By that time the first submarine will be taking shape and steelwork for the second will be in full production in the BAE shipyard in Barrow. In addition a multitude of components and sub-assemblies will be being manufactured for all four boats by hundreds of suppliers.

It will be very difficult for a future government to cancel the programme.

There will almost certainly be a British bomb with, as Attlee's foreign secretary Ernest Bevin said in 1946, a "bloody Union Jack on top of it", somewhere in the grey wastelands of the North Atlantic in the 2030s, 2040s and 2050s.

When faced with the nuclear question, Mrs May is the latest in a long line of British prime ministers, who as primary guardians of national security, seem, knowingly or unknowingly, to have been disciples of Cicero, who wrote in De Legibus: Salus populi suprema est lex - The safety of the people is the chief law.

James Jinks is the co-author with Peter Hennessey of The Silent Deep: The Royal Navy Submarine Service Since 1945 (Penguin/Random House, 2016).