Former President Donald Trump on Tuesday pleaded not guilty to federal charges related to his handling of classified documents at his Mar-a-Lago estate – with his appearance at a federal courthouse in downtown Miami bringing out supporters and opponents in their droves.

The 2024 frontrunner turned himself into the federal court on Tuesday, where he was booked on the charges and pleaded not guilty.

The indictment, unsealed last week, accused Trump of failing to comply with demands to return classified documents, including plans for a retaliatory attack on an unnamed foreign power. Other documents include defense and weapon capabilities of the U.S. and details of the U.S. nuclear program.

TRUMP PLEADS NOT GUILTY TO 37 FEDERAL FELONY CHARGES IN CLASSIFIED RECORDS CASE

Demonstrators rally outside of a Miami Federal Courthouse ahead of Donald Trumps arraignment

Demonstrators rally outside the Wilkie D. Ferguson Jr. U.S. Courthouse ahead of former President Donald Trump’s arraignment in Miami, Florida on Tuesday, June 13, 2023. (Mega for Fox News Digital)

"The unauthorized disclosure of these classified documents could put at risk the national security of the United States, foreign relations, the safety of the United States military, and human sources and the continued viability of sensitive intelligence collection methods," the indictment said.

It also accused him of storing the documents in a bathroom and other places at the residence, and of showing off the documents to visitors. In one instance, he is said to have told individuals of a document, "as president, I could have declassified it," and, "Now I can't, you know, but this is still a secret."

Demonstrators rally outside of the Wilkie D. Ferguson Jr. U.S. Courthouse

Demonstrators rally outside the Wilkie D. Ferguson Jr. U.S. Courthouse during former President Donald Trump’s arraignment in Miami, Florida on Tuesday, June 13, 2023. (Mega for Fox News Digital )

Trump has dismissed the charges as a "political hit job" against him by the Biden Department of Justice, and on Tuesday pleaded not guilty to the charges. This is the first time in United States history that a former president has faced federal criminal charges.

While he did not speak in court, he did commentate on his social media platform Truth Social.

Former U.S. President Donald Trump waves as he makes a visit to the Cuban restaurant Versailles

Former U.S. President Donald Trump waves as he makes a visit to the Cuban restaurant Versailles after he appeared for his arraignment on June 13, 2023, in Miami, Florida.  (Alon Skuy/Getty Images)

"Thank you Miami. Such a warm welcome on such a SAD DAY for our Country!" he said after the appearance.

"The targeting prosecution of a leading political opponent is the type of thing you see in dictatorships like Cuba and Venezuela," Trump lawyer Alina Habba said earlier in the day. "It is commonplace there for rival candidates to be prosecuted, persecuted and put into jail."

Demonstrators rally outside of a Miami Federal Courthouse ahead of Donald Trumps arraignment

Demonstrators rally outside the Wilkie D. Ferguson Jr. U.S. Courthouse ahead of former President Donald Trump’s arraignment in Miami, Florida on Tuesday, June 13, 2023. (Mega for Fox News Digital)

Trump's motorcade made its way to the courthouse on Tuesday afternoon from the Doral golf club, where supporters and opponents wielding signs and dressed in costumes had already gathered.

On his departure, one protester was dragged away after he ran in front of the motorcade.

NEARLY HALF THE COUNTRY SUPPORTS TRUMP FEDERAL INDICTMENT, BUT BELIEVES POLITICS WERE INVOLVED

Demonstrators rally outside of the Wilkie D. Ferguson Jr. U.S. Courthouse

Demonstrators rally outside of the Wilkie D. Ferguson Jr. U.S. Courthouse during former President Donald Trump’s arraignment in Miami, Florida on Tuesday, June 13, 2023. (Mega for Fox News Digital )

Trump briefly stopped off at Café Versailles, where he bought food and where supporters prayed over him and sang "Happy Birthday" ahead of his birthday on Wednesday. 

TRUMP INDICTMENT INCREASES PRESSURE ON BIDEN SPECIAL COUNSEL ROBERT HUR

A protestor is detained as former President Donald Trump’s motorcade departs the Wilkie D. Ferguson Jr. U.S. Courthouse in Miami, Florida on Tuesday, June 13, 2023. (Mega for Fox News Digital )

CLICK HERE TO GET THE FOX NEWS APP

Trump eventually boarded his plane to New Jersey – where he is holding a fundraiser for his 2024 presidential bid.

The former president was released under several conditions – including that he appear in court for future hearings. Trump did not have to surrender his passport and does not have any restrictions on his travel. The former president could face decades in federal prison if convicted on all 37 federal counts stemming from Smith's probe.

Fox News' Brooke Singman and Jake Gibson contributed to this report.