Britain's nuclear deterrent is protected from cyber attacks which wreaked havoc across the NHS, Defence Secretary Sir Michael Fallon has said.
Sir Michael 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.
Sir Michael 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."
Sir Michael 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."
Sir Michael 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.
Sir Michael 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."
Sir Michael was forced to defend himself over a visit to see Syrian president Bashar Assad in 2007 after being challenged by shadow foreign secretary Emily Thornberry.
In response to attacks on Labour leader Jeremy Corbyn over his past, Ms Thornberry said on May 27, 2007 Sir Michael had been "celebrating at a reception the re-election of president Assad with 99% of the vote".
Sir Michael said he was on a parliamentary visit with MPs from across the Commons on a "fact finding" mission but insisted "I didn't celebrate his re-election".
"There is a huge moral difference between talking to other foreign leaders - I meet them all the time as Defence Secretary - and Jeremy Corbyn's quite open support for the IRA," he said.
Ms Thornberry rejected the claim, adding: "You can't go around making this stuff up. There's an election on and people need to make decisions on the basis of the truth."
And she dismissed as "bollocks" a suggestion by Sir Michael that Labour would negotiate over the future of the Falklands.