FILE - The house of Harold Thomas Martin III is seen in Glen Burnie, Md.
FILE - The house of Harold Thomas Martin III is seen in Glen Burnie, Md.

BALTIMORE - A former National Security Agency contractor who stored two decades' worth of classified documents at his Maryland home has been sentenced to nine years in prison.

Harold Martin apologized Friday before he was sentenced in Baltimore's federal court.

The sentencing resolves a mysterious case that broke into the open in 2016, when FBI agents conducting a raid found stolen government documents inside his home, car and storage shed.

The case has attracted particular attention since hacking tools stolen from the NSA were also published by a cryptic Internet group that called itself the Shadow Brokers. Prosecutors never linked Martin to the Shadow Brokers.

Even so, they alleged that his habit of taking home documents jeopardized national security. Martin's defense lawyers described him as a compulsive hoarder who never betrayed his country.