- Video report by ITV News Political Correspondent Paul Brand
An online attack on the NHS was "always going to happen", the former head of the body managing the healthcare system's cyber security has said.
The Government has invested to protect against a cyber attack on the NHS, ex-NHS Digital chairman Kingsley Manning said, but he added that it can be "difficult" to ensure trusts spend on cyber security.
He described "a patchwork of regulation" around who is responsible for making sure appropriate safeguards are in place.
Mr Manning's comments came as the Prime Minister insisted the Government has taken major steps to protect against cyber attacks.
Theresa May's comments came in response to criticism that NHS computer systems have been left outdated and vulnerable to attack.
Mrs May's comments come a day after a "major" cyber attack hit the NHS in England and Scotland.
Home Secretary Amber Rudd has said patient data does not appear to have been accessed, but 48 of the 248 NHS England trusts and 13 NHS Health Boards in Scotland were affected, delaying and cancelling health service works.
Speaking at the Balmoral Show in Northern Ireland, Mrs May defended the Government's position on cyber security: "What is crucial is that this Government has actually put £2 billion into cyber security strategy and set up the National Cyber Security Centre, which has been advising organisations in the public sector like the NHS, but outside the public sector as well about cyber security."
Mr Manning added that the Government was "very well aware" that NHS computer systems might be seen as a target to attack.
"We were very well aware that this was a threat and indeed the Secretary of State and the Government has always seen it as being a threat," Mr Manning told BBC Radio Four's PM programme.
He continued: "In fact we were investing and have been investing significant amounts of money in the anticipation that this sort of thing would happen. It was always going to happen...
"There is also a patchwork of regulation in this area by comparison to, say, medical equipment or drugs."
He said it is not clear which organisation within the NHS "has the responsibility for seeing that trusts' cyber security is fit for purpose".
Mr Manning's comments came as Jeremy Corbyn claimed NHS computer systems had not been updated since 2001 and left vulnerable to attack after a security package was stopped in 2015.
The Labour leader changed his General Election campaign plans to include a visit to Norfolk where the James Paget University Hospitals NHS Foundation Trust, was one of the 48 in England hit by the attack, and said that more should have been done to protect against an attack.
"The contracts to continue protection of the systems within the NHS was not renewed in 2015," Mr Corbyn said.
He continued: "It should have been, it could have been, and indeed they were warned about this by many."
Mr Manning estimated that adequate systems for the health service could cost around £100 million each year, adding: "In a world where every last £1 million of NHS spending is under severe scrutiny it is very difficult to get individual trusts, even if you provide the money centrally, to actually use that money for this purpose."
However, the Home Secretary stressed that it was not just the NHS which had fallen victim to the attack.
"This is a virus that attacked Windows platforms. The fact is the NHS has fallen victim to this," Ms Rudd said.
As well as the NHS, Nissan has also announced that it's UK plant in Sunderland was affected, while around 100 different countries across the globe are thought to have been targeted.
"There have already been good preparations in place by the NHS to make sure they were ready for this sort of attack," Ms Rudd said.
Yet earlier on Saturday the Home Secretary said: "They [NHS trusts and health boards] have been asked to move from Windows XP, the Secretary of State for Health has been very clear in that direction.
"But people don't always move as quickly as you'd like in these situations, but I think there are lessons to be learned from this sort of example."
Health Secretary Jeremy Hunt has not spoken publically about the attack, and the Liberal Democrats have called for an inquiry into what happened.