An anonymous cybersecurity analyst in his early twenties has been credited with discovering a way to halt the global spread of the malicious WannaCry software currently infecting the NHS.

The 22-year-old researcher, who tweets under MalwareTech, bought a domain name hidden in the program for about £8.29, which it is thought hackers wrote into the software to act as a kill switch.

In an interview with The Daily Beast he said his actions appear to have stopped large numbers of attacks “completely by accident”, although he said, “If we did stop it, there’s like a hundred percent chance they’re going to fire up a new sample and start that one again. As long as people don’t patch it’s just going to keep going.”

The National Cyber Security Centre (NCSC) whose teams are “working round the clock” to fix the crisis, today said the media had "rightly praised the efforts of MalwareTech to tackle the WannaCry cyber attack".

The extent of the impact the cyber attack has had on the NHS is yet to be realised, but many people have had operations cancelled at the last minute, and reports from doctors and nurses reveal that patient records have been unavailable, and ambulances forced to divert.

An NHS worker in London who didn't want to be named told Dazed that the hack basically meant "people could die". 

"I work on a cancer ward and yesterday we had to revert to writing down patient details with pen and paper," they said.