Former CIA Director David Petraeus hid materials in insulation in his attic as the FBI pursued its case about his mishandling of classified information, the bureau's director, James Comey, said Thursday.

Comey made the disclosure to argue the point that the prosecution of Petraeus, who knew he had top secret information and lied to the FBI about it, differed from the investigation into Hillary Clinton's handling of classified information.

Comey did not recommend charges against Clinton, the presumptive Democratic candidate for president, over her personal email server while she was secretary of State. He said his team found no evidence that she lied under oath or broke the law by discussing classified information in an unclassified setting.

In contrast, Petraeus pleaded guilty last year to knowingly sharing binders of classified information with his biographer, a woman with whom he was having a sexual relationship. The Justice Department made clear that the retired Army general knew the material was top secret when he divulged it and had lied to the FBI about it.

"The Petraeus case, to my mind, illustrates perfectly the kind of cases the Department of Justice is willing to prosecute. Even there, they prosecuted him for a misdemeanor," Comey told the House Oversight and Government Reform Committee.

"In that case, you had vast quantities of highly classified information ... not only shared with someone without authority to have it, but we found it in a search warrant hidden under the insulation in his attic and then he lied to us about it during the investigation," Comey said.

"So you have obstruction of justice, you have intentional misconduct and a vast quantity of information. He admitted he knew that was the wrong thing to do. That is a perfect illustration of the kind of cases that get prosecuted. In my mind, it illustrates importantly the distinction to this case."

Prosecutors said that while his biographer, Paula Broadwell, was writing her book in 2011, Petraeus gave her eight binders of classified material he had improperly kept from his time as the top military commander in Afghanistan. Days later, he took the binders back to his house.

Among the secret information contained in the "black books" were the names of covert operatives, the coalition war strategy and notes about Petraeus' discussions with President Barack Obama and the National Security Council, prosecutors said.

Those binders were later seized by the FBI in an April 2013 search of Petraeus' Arlington, Virginia, home, where he had kept them in the unlocked drawer of a desk in a ground-floor study. It's unclear when investigators learned that Petraeus had hid materials in the attic insulation.

Prosecutors said that after resigning from the CIA in November 2012, Petraeus had signed a form falsely attesting he had no classified material. He also lied to FBI agents by denying he supplied the information to Broadwell, according to court documents.