WASHINGTON — A scheme that stole a trove of highly classified documents from the National Security Agency was “breathtaking in its longevity and scale’’ and authorities are now weighing espionage charges against a 51-year-old government contractor, federal prosecutors said Thursday.

In new court documents filed in the case against Harold Thomas Martin III, originally charged with theft of government property and unauthorized removal and retention of classified materials, prosecutors asserted that at least 50,000 gigabytes – or 50 terabytes - of information could have been stolen over two decades.

Edward Snowden, who in 2013 stole vast caches of classified information about government surveillance programs and later provided them to reporters, has been estimated to have taken about 60 terabytes of data. The Pentagon Papers leak last year was estimated to involve about 2.6 terabytes of compromised information.

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.

“The defendant’s decades of criminal behavior were in flagrant violation of his many promises and oaths, as well as the law,’’ according to court documents filed in advance of a detention hearing scheduled for Friday. “The government intends to file additional serious felony charges . . . After betraying the most important trust the United States can grant, the defendant presents a high risk of flight, a risk to the nation and to the physical safety of others.’’

Martin, according to the court documents filed earlier in the case, 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 initial 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.”

Martin worked for Booz Allen Hamilton, the same firm that employed Snowden. The latter, who fled the country and was ultimately granted asylum in Russia, reacted to news of Martin’s initial arrest, writing on Twitter that it was “huge.” Snowden’s breach triggered a landmark debate over the bounds of privacy and national security needs, resulting in legislation last year that effectively ended the government’s bulk collection of telephone records involving millions of Americans.

Martin’s alleged thefts, prosecutors alleged, involved “classified government materials that were dated from 1996 through 2016, spanning two decades worth of extremely sensitive information,’’ including notes describing the “NSA’s classified computer infrastructure and detailed descriptions of classified technical operations.’’

“A conservative estimate of the volume of the digital information seized from the defendant is approximately 50,000 gigabytes,’’ the court documents state. The defendant was in possession of an astonishing quantity of marked classified documents which he was not entitled to possess . . . Many of the marked documents were lying openly in his home office or stored in the backseat and trunk of his vehicle.’’