John Bolton has been sentenced to six months in prison for keeping classified national security meeting notes on a home computer and emailing them to his wife and daughter, exposing material to a hacker with suspected Iranian ties, prosecutors said.

The former US national security adviser, 78, pleaded guilty in June to mishandling classified information under the Espionage Act. US district judge Theodore Chuang sentenced him on Friday in Maryland. Bolton had faced 18 counts of retaining or disseminating classified information when charged last year.

Justice Department prosecutors sought five years, describing his conduct as a reckless threat to national security. His lawyers requested probation, citing remorse and his long government service. Bolton said he had “erred seriously”, adding: “I would never intentionally hurt the country that I love so dearly, but I was wrong.”

Under his plea agreement, Bolton must pay $2.25 million, forfeit his federal retirement pay, undergo a debriefing with intelligence officials and perform up to 100 hours of community service.

Bolton gathered the notes for The Room Where It Happened, his memoir criticising Donald Trump’s first term. None of the classified material appeared in the book. Prosecutors said a hacker with suspected ties to Iran compromised the AOL account used to send it.

Chuang identified Bolton’s direct presidential work, access by a hostile foreign power and a profit motive as distinguishing features. The absence of classified material from the published memoir therefore did not settle the question of how seriously its earlier handling should be punished.

The court received 70 letters seeking leniency, including from Mike Pence, Mitt Romney, Karl Rove and Garry Kasparov. Several alleged inconsistent enforcement. Former acting attorney general George J Terwilliger III argued that comparable cases were treated differently.

Former newspaper executive Melanie Kirkpatrick accepted that consequences were necessary but wrote: “I will add, other government officials have made mistakes without penalty”. The wider comparison included the 2025 “Signalgate” episode, when defence secretary Pete Hegseth and other officials shared pending strike plans against Houthi positions with a journalist; Kirkpatrick did not explicitly mention it.

Former Homeland Security chief of staff Miles Taylor recalled Bolton checking whether reporters or cameras could read classified pages Trump had displayed after Jamal Khashoggi’s murder.

Bolton served Trump for 17 months from 2018 before their disputed 2019 departure: Trump said he fired him; Bolton said he resigned. Within minutes of sentencing, Trump welcomed the punishment on Truth Social.

Chuang challenged the leniency appeals, pointing instead to the risk of preferential justice for wealthy, well-connected Washington insiders. Supporters’ claims of unequal enforcement and the judge’s concern about privileged treatment rested on sharply different views of what equal justice required.