The US Department of Justice has charged a former employee of the US Department of Energy and the Nuclear Regulatory Commission (NRC) of trying to hack government computers in order to steal information about nuclear weapons.

According to the indictment which was unsealed in court on Friday, Charles Harvey Eccleston, 62, is accused of having attempted to email "spear-phishing" attacks to more than 80 Energy Department employee email accounts in January 2015.

Spear-phishing involves sending emails that are made to look legitimate, but actually deliver a computer virus once opened. Eccleston is accused of hoping to damage the Energy Department's computer network, and thus gain access to information about nuclear weapons

READ MORE: Cybercriminals may provoke nuclear disaster - US, Russian generals

"Combating cyber-based threats to our national assets is one of our highest priorities,” said Assistant Attorney General John Carlin in a press release. “Eccleston sought to compromise, exploit and damage US government computer systems that contained sensitive nuclear weapon related information with intent to allow foreign nations to gain access to that material.”

Eccleston was detained in March in the Philippines, after the FBI foiled his attack. He had been living in the Philippines since 2011 and was deported to the US to face charges. He first came to the attention of the FBI after he had approached a foreign embassy and offered to provide classified information taken from the US government,according to the five-page indictment.

Which nation Eccleston intended to provide the classified information to was not disclosed in the indictment, but the FBI said it foiled the attack by posing as representatives of the same country. In exchange for a promise of future payment, Eccleston offered to design and send spear-phishing emails. The Washington Post has reported the foreign country was China.

READ MORE: DOJ, security experts warn of increased overseas cyberattacks

“This former federal employee is charged with trying to launch a cyber-attack to steal sensitive information from the Department of Energy,” said Acting US Attorney Cohen in a statement. “Thanks to an innovative operation by the FBI, no malicious code was actually transmitted to government computers.”

Eccleston is charged with four felony offenses, including three counts of attempted unauthorized access of computers. Each charge is punishable by a fine or various amounts of prison time, the longest of which is 10 years. Eccleston is also charged with attempted wire fraud, which is punishable by fine or imprisonment of not more than 20 years.