Harold Martin, a 54-year-old former contractor for the US National Security Agency, was sentenced Friday to nine years in prison for stealing a treasure trove of the agency’s classified documents and storing them at his Maryland home.

During his sentencing in a Baltimore courtroom, Martin told US District Judge Richard Bennett that he recognized his misdeeds, saying, “My methods were wrong, illegal and highly questionable.”

“This case is enormously significant not only for the [US] Justice Department, but also for the intelligence community,” Robert Hur, the US attorney for the District of Maryland, told AP prior to Martin’s sentencing.

“In any case where you have someone who holds a security clearance at the level that Mr. Martin did, and chooses to betray that public trust in such a profound way, it puts national security at risk.”

As part of a plea deal, Martin pleaded guilty to a single count of unauthorized and willful retention of national defense information in March 2019. At the time, Martin told the presiding judge that “it’s time to close Pandora’s Box.”

Martin didn’t come under the spotlight until August 2016, when officials at security software company Kaspersky Labs informed the US government that they had received unusual messages via Twitter that appeared to be linked to a theft of NSA data.

A subsequent raid carried out on Martin’s home, car and storage shed turned up terabytes of classified documents that the former NSA contractor had nabbed. Although early reports suggested that the amount of stolen documents totaled nearly 50 terabytes, Hur has indicated that the number has been revised “significantly downward,” WTOP reported.

The classified data included personal details regarding government employees, email chains labeled top secret and handwritten notes describing the agency’s classified computer infrastructure, among other information.

During the trial, Martin’s lawyers argued that their client never intended to publish the information, and that he was an obsessive hoarder who believed that having the data near him would allow him to become a better employee.