John Bolton, Donald Trump's former national security adviser, has pleaded not guilty to charges of mishandling classified information.

The 18 charges stem from allegations he shared or retained sensitive materials, including some characterized as top secret. He entered the plea after surrendering to authorities at a federal court hearing on Friday.

Bolton served during Trump’s first administration but parted with the White House contentiously, and has become one of the president's most vocal public critics.

The indictment makes Bolton, 76, the third of the US president's political opponents to face charges in recent weeks. Bolton has said he would defend his lawful conduct.

Bolton, wearing a dark blue suit and maroon tie, did not speak with reporters as he arrived at the courthouse in Greenbelt, Maryland.

Not guilty, your honor, Bolton, 76, said in court. He was released on his own recognizance and a hearing in the case is scheduled for 21 November.

Prosecutors have accused Bolton of using personal messaging apps and email to illegally transmit sensitive information.

These documents revealed intelligence about future attacks, foreign adversaries, and foreign-policy relations, prosecutors wrote.

Bolton said when he was charged that his actions were lawful conduct.

He added he had become the latest target in weaponizing the Justice Department to charge those he [Trump] deems to be his enemies with charges that were declined before or distort the facts.

The indictment issued this week accused Bolton of sharing diary-like entries with two unnamed individuals, and using his personal email account to transmit messages with sensitive materials.

The indictment also states that between 2019 and 2021, Bolton was allegedly the target of a hacking attack from a cyber actor believed to be associated with the Islamic Republic of Iran who gained access to his account, exposing the classified materials.

Bolton's attorney, Abbe Lowell, has claimed the records in question were unclassified, shared only with his immediate family, and known to the FBI as far back as 2021.

An investigation into Bolton continued into the Joe Biden administration, but did not lead to charges.

The Federal Bureau of Investigation searched Bolton's house and office in August, signaling an active investigation.

Trump has frequently attacked Bolton on social media and criticized him in public statements. Consequently, Bolton's indictment follows charges against other political figures associated with Trump, further complicating the current political climate.