WASHINGTON (AFP) - Former CIA chief David Petraeus was given two years' probation and fined US$100,000 (S$135,000) on Thursday for providing classified secrets to his mistress, capping a dramatic fall from grace for the man feted for changing the course of the Iraq war.
Petraeus, a decorated four-star general and the most revered commander of his generation, pleaded guilty in a North Carolina court, avoiding a trial that would have cast an embarrassing light on details of his affair and his flouting of secrecy laws.
The Justice Department had previously said that Petraeus, 62, had acknowledged giving eight "black books" - logs he kept as the US commander in Afghanistan - to his lover and biographer, Paula Broadwell.
In a statement following sentencing, acting US Attorney Jill Westmoreland Rose said that Petraeus "admitted to the unauthorised removal and retention of classified information and lying to the FBI and CIA about his possession and handling of classified information.
"Petraeus was sentenced to a two-year probationary term and was ordered to pay a US$100,000 fine."
Petraeus, who could have faced prison had he decided to fight the charges, had been expected to admit his guilt after signing a plea deal.
"Today marks the end of a two-and-a-half-year ordeal that resulted from mistakes that I made," Petraeus said in a terse statement outside court, refusing to take any questions from a swarm of reporters, before a vehicle whisked him away.
"As I did in the past, I apologise to those closest to me and many others, including those with whom I was privileged to serve in government and in the military over the years," he said.
"I want to take this opportunity also to thank those who have expressed and demonstrated support for me as I have sought to move forward since November of 2012."
The five-by-eight-inch notebooks were meant to serve as source material for Broadwell's book about the general, All In: The Education Of General David Petraeus.
They included Petraeus' daily schedule, classified notes, the identities of covert officers, details about US intelligence capabilities, code words and accounts of his meetings with President Barack Obama, according to court documents.
The black books contained "Top Secret" and "national defence information," they said.
An official Defence Department historian gathered up classified papers that Petraeus had collected while in uniform, but the general never provided the notebooks to the historian as required.
Instead, Petraeus kept the notebooks in a rucksack, he told Broadwell in a conversation that she recorded.
"They are highly classified, some of them... I mean there's code word stuff in there," the general told her.
Petraeus later e-mailed Broadwell promising to give her the notebooks, and personally delivered them to a residence where she was staying in Washington. He retrieved the black books a few days later and kept them at his home.
In October 2012, FBI agents questioned Petraeus at CIA headquarters while he was still director. The retired general, who resigned a month later, told them he had never provided any secret information to Broadwell - a lie that he acknowledged in his plea deal.
Passing the sensitive information to Broadwell and then keeping the notebooks at his home clearly violated his legal obligation to safeguard classified information, authorities said.
None of the classified information appeared in Broadwell's book, which was published by Penguin in 2012.
Petraeus was given hero status in Washington for overseeing the troop "surge" in Iraq in 2007 and US leaders credited him for salvaging the troubled war effort. He later served as the top US commander in Afghanistan, where his tenure achieved mixed results.
When he left his post at the Central Intelligence Agency, Petraeus signed a non-disclosure agreement promising that he had no classified material in his possession.
But the black books were still at his home. And in April 2013, the FBI arrived with a search warrant at the general's residence and found the notebooks in an "unlocked desk drawer" on the first floor of the house.