U.S. Army Gen. David Petraeus (ret.) has reached a plea deal with the U.S. Justice Department and admitted providing his highly classified journals to a mistress when he was the director of the CIA.

According to The New York Times, Petraeus has agreed to plead guilty to one count of unauthorized removal and retention of classified material, a misdemeanor. He is eligible for up to one year in prison, but prosecutors will recommend a sentence of probation for two years and a $40,000 fine.

His mistress, Paula Broadwell, was a married former Army Reserve officer who, in 2011, was interviewing him for a biography titled “All In: The Education of General David Petraeus.” The four-star general was accused of providing her access to his “black books,” notebooks that contained handwritten classified notes about official meetings, war strategy, intelligence capabilities, and the names of covert officers.