French researchers have found a way to save Windows files encrypted by the WannaCry virus, racing against a deadline as the ransomware threatens to start locking up victims' computers first infected a week ago.

WannaCry, which started to sweep round the globe last Friday and has infected more than 300,000 computers in 150 nations, threatens to lock out victims who have not paid a sum of $300 to $600 (£230 to £460) within one week of infection.

A loose-knit team of security researchers scattered across the globe have revealed they have collaborated to develop a workaround to unlock the encryption key for files hit in the global attack, which several independent security researchers have confirmed.

But the researchers said their solution would only work in certain conditions, namely if computers had not been rebooted since becoming infected and if victims applied the fix before WannaCry carried out its threat to lock their files permanently.