Former CIA Director David Petraeus was sentenced to two years of probation and given a $100,000 fine Thursday in a plea agreement with the U.S. Justice Department for his involvement in leaking classified materials, reported NBC Charlotte. Petraeus, a four-star general who served in Iraq and Afghanistan, shared classified information in notebooks with his biographer, with whom he was having an affair.

Petraeus pleaded guilty to a misdemeanor count of unauthorized removal and retention of classified material, a charge that had a maximum sentence of up to a year in prison. The Justice Department recommended a sentence of two years probation and a $40,ooo fine as a part of the plea agreement. The fine was increased in order to reflect the seriousness of the crime, NBC Charlotte reported.

Petraeus reportedly gave his biographer, Paula Broadwell, eight notebooks that included "the identities of covert officers, war strategy, intelligence capabilities and mechanisms, diplomatic discussions, quotes and deliberative discussions from high-level National Security Council meetings, and defendant David Howell Petraeus's discussions with the President of the United States of America," according to the government, NPR reported. U.S. Attorney General Eric Holder recommended probation for Petraeus, who admitted that he lied to FBI agents in an interview about the case. Lying to federal agents is a charge that can carry a punishment of as much as five years in prison, the New York Times reported

Petraeus resigned from the CIA in 2012 and publicly apologized for the affair. NBC Charlotte reported that supporters wrote 34 letters asking for no jail time on behalf of Petraeus, who has no criminal record, with the defense arguing that "the sentence should fit the offender." 

"I'm honored and humbled by their words and support," Petraeus said to the court, according to CBS Charlotte. "I want to apologize for the pain my actions caused."