Former Trump administration National Security Adviser John Bolton was sentenced to six months in federal prison Friday after pleading guilty to illegally retaining classified national defense information and sharing it with relatives through his personal email account.

U.S. District Judge Theodore Chuang imposed the prison sentence during a hearing in Maryland, rejecting Bolton's request for probation. The judge determined that a period of incarceration was necessary, saying probation alone would be "insufficient."

Bolton, 78, acknowledged his wrongdoing in court, telling the judge that he had "erred seriously" in handling classified information. Reading from a prepared statement, he said his actions were wrong but insisted he never intended to expose sensitive information to America's adversaries.

"I would never intentionally hurt the country that I love so dearly, but I was wrong," Bolton said.

The Justice Department had recommended a five-year prison sentence, arguing that Bolton's actions represented a serious threat to national security. His attorneys sought probation, pointing to his decades of public service, his remorse and the absence of evidence that he deliberately provided classified information to a foreign government.

Bolton pleaded guilty in June to one felony count of illegally retaining national defense information. He originally faced 18 counts related to the retention and dissemination of classified material. The felony carries a maximum possible sentence of 10 years, although his plea agreement capped the recommended prison term at five years.

As part of the agreement, Bolton also agreed to pay a $2.25 million fine, forfeit retirement pay tied to his federal service, undergo a debriefing with intelligence officials and complete up to 100 hours of community service.

Prosecutors argued that Bolton abused his access to sensitive government information while preparing a memoir about his time in the Trump administration. The investigation centered on hundreds of pages of diary-style notes containing details about national security briefings, government activities and other classified information. Bolton shared the material with his wife and daughter through a personal email account.

Authorities also said a hacker linked to Iran gained access to the personal email account after Bolton left the administration. Prosecutors argued that the breach exposed sensitive national defense information to a foreign adversary, even though there is no evidence Bolton's relatives passed the material to anyone else.

"As a result," prosecutors wrote, "Mr. Bolton's actions placed our nation's most sensitive secrets directly in the hands of a significant geopolitical adversary who poses a relentless threat to U.S. national security."

Bolton's defense attorney, Abbe Lowell, acknowledged in court that his client's conduct was careless and potentially reckless but disputed the prosecution's characterization of the case. Lowell argued that Bolton believed keeping a personal diary of his government service was permissible and had no intention of deliberately disclosing classified information.

"His conduct is serious. His conduct violated the law," Lowell said.

Bolton's lawyers also described the case as unusual, arguing that it was the first prosecution they knew of involving the retention of classified information in a private diary. They maintained that Bolton intended to preserve a historical record of his government service rather than undermine national security.

In a letter to Chuang, Bolton expressed regret over his actions, writing that he was "profoundly sorry" and that his conduct had fallen short of the principles that guided his professional career.

His legal team also submitted letters from supporters asking the judge to impose a lenient sentence. Among them was former Vice President Mike Pence, who praised Bolton's patriotism and commitment to national security. Pence wrote that Bolton's advice during the first Trump administration helped advance policies that made Americans safer.

Bolton served as Trump's national security adviser for approximately 17 months beginning in 2018. He later became a vocal critic of the president and published the memoir The Room Where It Happened, which detailed his time in the administration and offered a critical account of Trump's leadership.

Trump celebrated Bolton's guilty plea on social media, calling him a "terrible person" and writing, "Hopefully, he will be dealt with harshly!"

Bolton's government career began during the administration of President Ronald Reagan and continued under President George H.W. Bush. President George W. Bush later appointed him U.S. ambassador to the United Nations in 2005.