Three North Korean computer programmers have been charged by the US over their alleged involvement in a number of global cyber attacks, including the WannaCry attack on the NHS in 2017.

The US Department of Justice said the range of attacks also included the 2014 targeting of Sony Pictures and an extortion scheme attempting to steal more than 1.3 billion dollars (£934 million) from banks and other financial institutions.

Officials said the three men are accused of being members of the Reconnaissance General Bureau (RGB), a military intelligence agency in North Korea which engaged in criminal hacking – including the creation of the WannaCry 2.0 ransomware which hit the NHS in 2017 and spread to more than 100 other countries.

The virus, which hit dozens of NHS Trusts, blocked access to computer software and demanded a ransom in order to return control to the user, leading to widespread chaos inside the health service, with thousands of appointments cancelled and diagnostic equipment infected.

The three men, named as Jon Chang Hyok, Kim Il and Park Jin Hyok, are accused of carrying out the attacks to generate funds for the benefit of the North Korean regime.

They have been charged with conspiracy to commit computer fraud and abuse and conspiracy to commit wire fraud and bank fraud.

All three are not in custody and are believed to be in North Korea.

Park was previously charged in 2018 over links to the NHS and Sony Picture attacks, as well as the targeting of a British production company making a series which involved a British nuclear scientist taken prisoner in North Korea.

Assistant attorney general John C Demers, of the US Justice Department’s National Security Division, said: “As laid out in today’s indictment, North Korea’s operatives, using keyboards rather than guns, stealing digital wallets of cryptocurrency instead of sacks of cash, are the world’s leading bank robbers.

“The Department will continue to confront malicious nation-state cyber activity with our unique tools and work with our fellow agencies and the family of norms abiding nations to do the same.”