David Petraeus, the former CIA director and top US army general whose affair with his biographer brought down what many considered a bright political future, has agreed to plead guilty to mishandling classified materials.
The plea agreement was filed in US District Court in Charlotte, North Carolina.
Petraeus was charged with one count of unauthorised removal and retention of classified material, which carries a possible penalty of up to a year in prison, a 100,000 dollar (£65,000) fine and five years of probation.
According to court documents, Petraeus gave his biographer, Paula Broadwell, binders of classified material from Afghanistan while she was writing her book.
Petraeus admitted having an affair with Ms Broadwell when he resigned from his position in November 2012. Both have publicly apologised and said their romantic relationship began only after he retired from the military and started at the CIA.
The binders were known as "black books" and were seized by the FBI in a search of Petraeus's home, according to court documents. He also lied about providing them to Ms Broadwell, according to court documents.
The court papers give the following account:
There were eight binders in all, each containing classified information about Petraeus's time as the top general in Afghanistan. The material included his daily schedule and notes he took during official briefings. The books were top secret and also included notes about Petraeus's discussions with the US president.
Petraeus retained the black books in his home even after he left the defence department. On August 28 2011, he delivered them to a private residence in Washington where Ms Broadwell was staying. Petraeus left the books with her so she could use them as source material for the biography on Petraeus that she wrote, which was released in 2012. On September 1, Petraeus brought the books back to his home in Arlington, Virginia.
When Petraeus resigned from the CIA, he signed a security exit form indicating he had no classified material in his possession. However, he still had the black books in his home at that time. On April 5 2013, the FBI searched his home and seized the black books from an unlocked desk drawer in a first-floor study.
When interviewed by the FBI in 2012, Petraeus said he never provided classified information to his biographer. Prosecutors say that was false, and that Petraeus lied to federal investigators.
Petraeus's lawyers David Kendall and Robert Barnett in Washington declined to comment.