The prime minister has stressed the need for the UK to retain its Trident nuclear deterrent, saying it would be "foolish to leave Britain defenceless" in the face of the growing threat posed by North Korea and Iran.

David Cameron's insistence on the need for an independent nuclear deterrent came as the US said it was moving a missile defence battery to the Pacific island of Guam as Pyongyang continued to ratchet up the rhetoric against South Korea and its American ally.

What did Cameron say?

Writing in Thursday's Daily Telegraph, the prime minister said such "evolving threats" underlined the need for the UK to maintain the ultimate deterrent.

"We need our nuclear deterrent as much today as we did when a previous British government embarked on it over six decades ago," he said. "Of course, the world has changed dramatically. The Soviet Union no longer exists. But the nuclear threat has not gone away. In terms of uncertainty and potential risk it has, if anything, increased."

Cameron said Iran was continuing to defy the will of the international community over its nuclear programme while North Korea may already be building a nuclear arsenal.

"The highly unpredictable and aggressive regime in North Korea recently conducted its third nuclear test and could already have enough fissile material to produce more than a dozen nuclear weapons," he said.

"Last year North Korea unveiled a long-range ballistic missile which it claims can reach the whole of the United States."

Were such a weapon to exist, he said, the whole of Europe – including the UK – would be affected.

The prime minister added: "Does anyone seriously argue that it would be wise for Britain, faced with this evolving threat today, to surrender our deterrent?

"Only the retention of our independent deterrent makes clear to any adversary that the devastating cost of an attack on the UK or its allies will always be far greater than anything it might hope to gain."

What do the PM's comments mean for the future of Trident?

Cameron's comments underline the Conservatives' commitment to a like-for-like replacement for the ageing Trident submarine fleet, although their Liberal Democrat coalition partners are seeking a cheaper alternative.

The shadow defence minister, Kevan Jones, said that while it was "absolutely right and necessary" for the UK to retain an independent nuclear deterrent, the costs involved needed to be taken into account.

"World events demonstrate that in an unpredictable era our country needs the ultimate security guarantee," he said. "The precise nature of the deterrent must be judged on meeting military capability requirements and cost."

The prime minister attempted to head off such questions in his Telegraph article, arguing that national security was worth the price of the deterrent.

"Our current nuclear weapons capability costs on average around 5%-6% of the current defence budget," he said. "That is less than 1.5% of our annual benefits bill. And the successor submarines are, on average, expected to cost the same once they have entered service. It is a price which I, and all my predecessors since Clement Attlee, have felt is worth paying to keep this country safe."

How much would renewing Trident cost?

According to conservative estimates, renewing Trident would cost £100bn. The key choice on a Trident replacement will arise in 2016, when the government will need to decide whether to spend between £25bn and £30bn on replacing the four Vanguard-class submarines, which are due to be taken out of service in the mid-2020s, with a Successor class. If the government commits to replacing the Trident nuclear deterrent fleet, the cost could swallow 35% of the military equipment budget over the coming years at a time when the MoD is facing deep cuts.

Where do the political parties stand on Trident?

The Conservatives are committed to replacing Trident with a "continuous at-sea deterrent" in which, similar to current practice, nuclear warheads on intercontinental ballistic missiles are carried on four Vanguard-class submarines.

The Lib Dems have raised the possibility of a land or air-based system or carrying smaller nuclear warheads on cruise missiles on board Astute-class submarines.

Labour has a long standing commitment to a like-for-like replacement to Trident but is believed to be rethinking it and is yet to state a firm policy.

The future of Trident is also likely to feature in next year's looming Scottish independence referendum campaign, with the SNP insisting that it would not allow nuclear missiles to be based in an independent Scotland.

The timing of the Trident decision means it could be a major issue in the 2015 general election.