The former CIA Director and retired commander of US fighting forces in Iraq and Afghanistan will avoid jail time despite pleading guilty to revealing highly sensitive state secrets to a biographer that he was sleeping with, and then lying about the whole matter to FBI agents.

David Petraeus admitted to committing one misdemeanor charge of removing and retaining classified information. The prosecution in the case recommended two years probation and a $40,000 fine – hardly a slap on the wrist compared to the punishment meted out to other government officials, like Stephen Kim and John Kiriakou, who revealed classified information to journalists.

According to court records released on Tuesday, Petraeus shared with his biographer, Paula Broadwell, notebooks he had accumulated throughout his tenure as commander of the International Security Assistance Forces in Afghanistan. Referred to as “black books” in the legal documents, they contained classified information of a far more sensitive nature than what Kiriakou and Kim were accused of dealing, including “the identities of covert officers, war strategy, intelligence capabilities and mechanisms, diplomatic discussions, quotes and deliberative discussions from high-levels National Security Council meetings, and…Petraeus’s discussions with the President of the United States.”

Between Aug. 28, 2011 and Sept. 1, 2011, Petreaus left the notebooks at a “DC Private Residence” where Broadwell could use them as “source material” for a biography on the general. Published later, that book contained no classified information.

Petraeus himself knew of the restrictions on the information in the notebooks, telling Broadwell in an email that they were “highly classified” and contained “code word stuff.” However, Petraeus unlawfully stored the notebooks at his home in the top drawer of a desk that, according to court records, was unlocked.

He later lied to FBI agents who were conducting an investigation into the matter. While sitting in his office at CIA Headquarters in Langley, Va., Petraeus denied that he had ever provided any classified information to his biographer.

“These statement were false,” The DOJ’s complaint read.

Despite the gravity of accusations leveled at Petraeus–then-allegations that ultimately cost him his job–he has garnered mostly deference from government officials and Members of Congress.

As The Sentinel reported, only one lawmaker went on record saying the retired general should be prosecuted, which stands in contrast to the large number of members who’ve called for tough punishment against others accused of leaking government secrets in recent years.

In February, former CIA agent John Kiriakou was released from prison after serving nearly two years for blowing the whistle on the agency’s use of waterboarding. Kiriakou detailed classified aspects of the program, including the name of an agent involved in the torture regime.

That same month, former State Department contractor Stephen Kim pleaded guilty to one felony count of revealing classified information to a Fox News reporter. He was sentenced to 13 months in prison.

Under sentencing guidelines, Petraeus was docked not just for his base offense of improperly handling classified materials, but also for “Abuse of Position of Trust” and “Obstruction of Justice.”

Still, the former head of the CIA is facing no jail time and, in exchange for his guilty plea, Petraeus will have immunity from further prosecution for infractions related to the case.