The former US military commander in Iraq and Afghanistan and director of the CIA, David Petraeus, has been fined $100,000 (92,000 euros) and sentenced to two years of probation for mishandling classified information.
The 62-year-old retired general apologised to the court in North Carolina after pleading guilty under a plea deal.
The fine was raised from the $40,000 that had been recommended, the judge noting that it needed to be higher to be punitive.
US Magistrate Judge David Keesler said Petraeus had “committed a grave but very uncharacteristic error of judgement”.
The ex-commander admitted giving information to his mistress, Army Reserve officer Paula Broadwell, who was writing his biography.
In his defence, his lawyer said no classified information had been made public.
A court document said that in 2011, before he became CIA director, Petraeus illegally gave Broadwell access to official binders.
Known as “black books”, they contained classified information including the identities of covert officers, code word information, war strategy, intelligence capabilities, diplomatic talks and information from White House National Security Council meetings.
Petraeus, who served stints as the top US commander in the wars in Iraq and Afghanistan, resigned from the CIA in 2012 after his affair was revealed.
Get a different perspective
Every story can be told in many ways: see the perspectives from Euronews journalists in our other language teams.