A National Security Agency contractor has been arrested over the theft of top secret information after the leak of classified codes developed to hack foreign governments.

According to an official, Harold Thomas Martin, 51, of Maryland, worked for Booz Allen Hamilton, the same company that employed whistleblower Edward Snowden, who made damaging disclosures about the US government's surveillance activities in 2013.

The company said in a statement when it "learned of the arrest of one of its employees by the FBI," he had been immediately fired and the firm had offered full cooperation to the agency.

Martin's arrest in August, which has only just been made public, came just weeks after a leak of classified source code used by the NSA to hack computer systems, such as those of Russia, China, Iran and North Korea.

Those documents were leaked by a group calling itself the "Shadow Brokers".


The contractor, who had top-level clearance, has been accused of the theft of classified government material that could cause "exceptionally grave danger" to national security if disclosed.

Martin faces up to 10 years in prison if convicted, but his defence lawyer has insisted he did not intend to betray his country.

Following the Snowden case, the latest arrest threatens to be another embarrassment to the US intelligence community.

A published affidavit said: "Martin at first denied, and later when confronted with specific documents, admitted he took documents and digital files from his work assignment to his residence and vehicle that he knew were classified.

""Martin stated that he knew what he had done was wrong and that he should not have done it because he knew it was unauthorised."