Image copyright PA

The UK could carry out military strikes in response to cyber attacks, the UK defence secretary has said.

Sir Michael Fallon told the Chatham House think tank the UK had the ability to respond to hackers "from any domain - air, land, sea or cyber".

Sir Michael also emphasised the UK's ability to carry out "offensive" cyber attacks of its own.

His comments came after hackers mounted a "determined attack" on the UK Parliament last Friday.

Up to 90 email accounts were compromised, although government sources said the attack was later contained.

Companies across the globe, including one of Britain's biggest companies, advertising agency WPP, are reporting that they have been struck by a major ransomware cyber-attack.

And in May, NHS services across England and Scotland were hit by a large-scale cyber-attack that has disrupted hospital and GP appointments.

Commenting on the cyber attack on Parliament, Mr Fallon said: "Last Friday we saw the UK hit by yet another cyber attack, this time directed against our parliamentary IT systems.

"Investigations so far have found that the hackers were attempting to carry out a sustained and determined attack on all parliamentary user accounts in an attempt to identify weak passwords to gain access to users' emails."

He added: "We have no evidence yet as to who was behind the attack on Parliament, it is too early to speculate what kind of actor was involved.

"When we know, we have got to consider how to respond."

Image copyright Reuters Image caption Concerns have been raised about potentially vulnerable systems on HMS Queen Elizabeth

Sir Michael said that, when identified, perpetrators should be prosecuted when possible but the UK was investing in "full spectrum capabilities" ranging from cyber attacks to more conventional military responses.

The government was "signalling to potential cyber strikers that the price of an online attack could invite a response from any domain - air, land, sea or cyberspace", he said.

"When it comes to the latter, we are making sure that offensive cyber is an integral part of our arsenal.

"We now have the skills to expose cyber criminals, to hunt them down and to prosecute them. To respond in kind to any assault at a time of our choosing."

He added that the UK has carried out its own successful cyber attacks against so-called Islamic State in Iraq and Syria and offered the UK's "support to Nato operations as and when required".

The defence secretary has also been forced to deny the Royal Navy's most powerful warship was vulnerable to hackers after fears about outdated software.

According to the Times, the 280-metre, 65,000-tonne HMS Queen Elizabeth has a computer in its control room running Windows XP, an outdated system Microsoft no longer runs security updates on.

Sir Michael told BBC Radio 4's Today programme: "It's not the system itself, of course, that's vulnerable, it's the security that surrounds it.

"I want to reassure you about Queen Elizabeth, the security around its computer system is properly protected and we don't have any vulnerability on that particular score."