Former CIA Director David Petraeus has agreed to plead guilty to mishandling classified information, with the retired four-star general admitting to giving eight "black books" full of such data to a military mistress who was writing his biography.

Petraeus, 62, will plead guilty to a misdemeanor charge of unauthorized removal and retention of classified material under the deal, according to documents filed on Tuesday in federal court in Charlotte, North Carolina.

The plea agreement announced by the Justice Department marks the latest chapter in an astonishing fall from grace for Petraeus, an intellectual with a Princeton University doctorate and a counterinsurgency expert widely considered one of America's most important military leaders of recent decades.