Former US military commander and CIA director David Petraeus was sentenced to two years of probation and ordered to pay a US$100,000 (S$134,000) fine but was spared prison time on Thursday after pleading guilty to mishandling classified information.
The retired four-star general apologised as he admitted in federal court in Charlotte, North Carolina, to giving the information to his mistress, who was writing his biography. He agreed under a plea deal to a misdemeanour charge of unauthorized removal and retention of classified material.
US Magistrate Judge David Keesler raised the fine from the $40,000 that had been recommended to the maximum possible financial penalty for that charge, noting it needed to be higher to be punitive and reflect the gravity of the offence.
"This constitutes a serious lapse of judgment," Keesler said during the hour-long hearing.
The guilty plea ended an embarrassing chapter for a man described in letters to the court as one of the finest military leaders of his generation. Petraeus, 62, a counter-insurgency expert with a Princeton University doctorate, served stints as the top US commander in the wars in Iraq and Afghanistan and was once considered a possible vice presidential or presidential candidate.
He resigned from the CIA in 2012 after it was revealed that he was having an affair with the biographer, Army Reserve officer Paula Broadwell.
Dressed in a dark suit and blue tie, he showed no emotion as he read from a prepared statement in court.
"Today marks the end of a two-and-a-half year ordeal that resulted from mistakes that I made," he told reporters after the sentencing. "As I did in the past, I apologise to those closest to me and many others."
Petraeus was accompanied at the hearing by three attorneys, but it did not appear that his family members attended, nor did Broadwell, who lives in Charlotte.
Keesler said the heads of state, senators and high-ranking US military officials who wrote letters submitted by defence attorneys in support of Petraeus agreed he had "committed a grave but very uncharacteristic error in judgment."
The judge said the retired Army general's actions stood in stark contrast to his nearly four decades of public service.
Petraeus now serves as chairman for the private equity firm Kohlberg Kravis Roberts' captive economic and geopolitical think tank, the KKR Global Institute. The White House also has continued to consult him on occasion for advice on national security matters.
Civil liberties and government transparency advocates had questioned the plea deal, saying the government's lenient treatment of Petraeus suggested prosecutors maintain double standards. Defendants in other leak cases have received harsher punishments, including prison.
"A slap on the wrist is the most one could say about what can barely be called a sentence for what could have been treated as serious crimes including espionage," said Michael Ratner, a US lawyer who represents WikiLeaks founder Julian Assange.
But Petraeus' attorney, David Kendall, said in court it would have been unprecedented to incarcerate him for the charge he faced, which carries a maximum prison term of one year.
"This is not a case about the dissemination to the public of classified information," Kendall said. "No classified information appeared in the biography. Not a single syllable."
A court document signed by Petraeus and prosecutors says that in 2011, just before he became the CIA director, the general illegally gave Broadwell access to official binders.
Known as "black books," the binders contained classified information including identities of covert officers, code word information, war strategy, intelligence capabilities, diplomatic talks and information from high-level White House National Security Council meetings, according to court records.
Petraeus also was accused of improperly storing classified materials at his Virginia residence and falsely telling the FBI in October 2012 that he had not shared any classified information with Broadwell.
US prosecutor James Melendres noted that Petraeus had been entrusted with the government's highest secrets.
"The defendant betrayed that trust," he said.