A former FBI intelligence analyst was sentenced Wednesday to nearly four years in prison for illegally withholding hundreds of classified documents at her home.

Kendra Kingsbury, 50, of Garden City, Kansas, was sentenced to three years and 10 months in federal prison without parole by US District Judge Stephen R. Bough.

In October, Kingsbury pleaded guilty to two counts of unlawful withholding of national defense-related documents. Similar to the charges former President Donald Trump faces, Kingsbury’s case involved alleged violations of the Espionage Act.

Kingsbury, who held a TOP SECRET/SCI security clearance and was an intelligence analyst for the FBI for more than 12 years, was accused of repeatedly removing sensitive government materials from a secure workspace. Some of the documents he removed and retained at his north Kansas City residence included classified documents related to national defense.

Prosecutors alleged in court documents that Kingsbury illegally removed and withheld about 386 classified documents. The withheld documents were stored in various formats, including hard drives and compact discs, prosecutors said.

Kingsbury allegedly admitted to investigators that he withheld and destroyed other documents that might have included classified or national defense-related information.

In their sentencing memorandum, prosecutors said, «The FBI ultimately determined that more than 20,000 documents originating from the FBI or some other government agency were found at the defendant’s residence.»

Kingsbury put national security at risk «by retaining classified information in his home that, if in the wrong hands, would have revealed some of the government’s most important and secret methods of collecting essential national security intelligence,» they wrote.

Some of the documents were classified as «SECRET» by the FBI, prosecutors said, and detailed intelligence sources and methods linked to the federal government’s counterterrorism and counterintelligence efforts, as well as defense against cyber threats.

Documents linked to sensitive human-sourced operations in national security investigations and the FBI’s technical capabilities were also found, as well as documents that delved into FBI priorities and goals or were linked to open investigations, prosecutors said.

The national defense information that Kingsbury illegally withheld also included documents classified by another government agency as «SECRET,» according to court documents.

Supposedly hidden in that batch of withheld documents was information on intelligence sources and methods related to US government efforts to gather information on terrorist groups, including al Qaeda, and information on a suspected associate of Osama bin Laden.

Prosecutors said the FBI discovered that Kingsbury had also «initiated searches» of classified FBI databases using information obtained from classified and confidential government materials discovered at his home.

An FBI investigation into why the documents were removed «revealed more questions and concerns than answers,» prosecutors said.

Pushing for parole, Marc Ermine, a Kingsbury attorney, had argued that she «suffered extensive health problems and family tragedies during her tenure with the FBI,» including the murder of a family member, sparking fights. mental and physical and caused difficulty at work.

Kingsbury’s lawyers did not immediately respond to a request for comment on his sentencing, which comes about two months before Trump’s scheduled trial date.

Trump is accused of removing and storing classified and national defense information in various parts of his Mar-a-Lago club in Palm Beach, Florida. He pleaded not guilty in Miami this month to charges that include 31 felonies related to withholding classified materials.

Ken Dilanian contributed.