A 51-year-old government contractor with access to highly classified information was charged with stealing sensitive documents and other digital files.

Harold Thomas Martin III, 51, of Glen Burnie, Md., was formally charged with theft of government property and unauthorized removal and retention of classified materials, according to court documents unsealed Wednesday.

The contractor’s government affiliation was not identified in court documents, but a federal law enforcement official said that he worked with the National Security Agency. The official is not authorized to comment publicly on the matter.

Martin was arrested in secret on Aug. 27 after a search of his Maryland home, two storage sheds and vehicle turned up a mix of classified paper documents and digital files stored on multiple devices. Among the material, according to court documents, was information classified both as top secret and the higher level "sensitive compartmented'' or SCI.

Six of the files , according to the court documents, "appear to have been obtained from sensitive intelligence'' produced in 2014.

"These six documents were produced through sensitive government sources, methods and capabilities which are critical to a wide variety of national security issues,'' the four-page government complaint states, adding that their "unauthorized disclosure reasonably could be expected to cause exceptionally grave damage to the national security of the United States.''

Martin, according to the court documents, agreed to be interviewed during the August search of his property and "at first denied'' but later "admitted'' taking the material when confronted with the seized materials.

"Martin stated that he knew he did not have authorization to retain the materials at his residence or in his vehicle,'' the complaint states. "Martin stated that he knew what he had done was wrong and that he should not have done it because he knew it was unauthorized.''