Britain's nuclear deterrent is protected from cyber attacks which wreaked havoc across the NHS, Defence Secretary Michael Fallon has said.
Mr Fallon ruled out concerns over the threat of viruses on Trident operating systems, after the global attack which hit 48 NHS trusts in England and 13 Scottish health boards.
The Government had set aside more than £1.9 billion to tackle cyber threats, of which some £50 million went to the NHS, after an official security review highlighted hacks as a major threat, he said.
Mr Fallon told the BBC's Andrew Marr Show: "We never comment on the different systems, obviously for reasons of security, that our submarines use but our vanguard submarines I can absolutely assure you, are safe and operate in isolation when they are out on patrol, and I have complete confidence in our nuclear deterrent."
Pressed further, he said: "I can assure you that the nuclear deterrent is fully protected."
Mr Fallon said the NHS had been warned over cyber threats in the months before Friday's attack but every effort is going into protecting the NHS.
He added: "Let me just assure you we are spending money on strengthening the cyber defence of our hospital system."
Mr Fallon defended the Government's record on military recruitment as army numbers sat at 79,000, below the Government's pledge of keeping the numbers at 82,000.
He said: "First of all we cannot force people to join the army, we don't have conscription in this country, the army has to compete with other sectors in the economy.
"It was a promise over the parliament, over the five years, we are only two years into the old parliament and I can assure you that we are spending a lot of money on recruiting but also on giving the armed forces the equipment they need."
Asked about defence spending, he rejected criticism of "accounting deceit", saying the UK's 2% spend was in line with Nato's target.
He hinted at cuts to funding for military equipment, despite promises of "the biggest equipment programme in generations" over the next decade.
Mr Fallon said: "That is a ten-year programme and part of the cost of that programme has to come from efficiency savings, getting rid for example of land and barracks and buildings that we don't need, being more efficient in the way that we work."