Former CIA Director David Petraeus has agreed to plead guilty to one federal charge of mishandling and removing classified information Tuesday in Charlotte, N.C. 

In the plea deal, the 62-year-old retired four-star general admitted to giving eight "black books" containing classified information to his mistress, who was writing his biography, according to Reuters. Petraeus could be sentenced to one year maximum in prison, however, his lawyers have asked for a $40,000 fine and two years of probation. 

The "black books" contain personal notes Petraeus kept during his time as commander in Afghanistan, CNN reported. He then allegedly gave them to Paula Broadwell, his married mistress and mother of two, who served as a military officer. The classified information in the books included names of covert officers, war strategy, notes from diplomatic and national security meetings and security code words. 

In August 2011, Petraeus left the books at a house in Washington D.C. so Broadwell could retrieve them, according to court documents. In 2012, Petraeus resigned and told the government he had no classified documents in his possession. The FBI conducted a search of his house in April 2013 and discovered the black notebooks in an unlocked desk drawer on the first floor. 

Furthermore, the court documents said Petraeus lied to the FBI in October 2012, prior to his resignation, about providing classified information to Broadwell, Reuters reported. The plea deal permits Petraeus to avoid a criminal trial where details of his affair would be revealed. 

Petraeus graduated from Princeton University with a doctorate's degree. He served as the top U.S. commander in Iraq and Afghanistan.