Former U.S. President Donald Trump is facing 37 criminal counts related to his handling of the classified documents he took with him upon leaving the White House in 2021, an indictment unsealed Friday showed.

Of the total, 31 are counts of willful retention of secrets pertaining to military activities and capabilities of the United States as well as unnamed foreign countries.

The 49-page indictment said the documents contained information on U.S. nuclear programs, potential vulnerabilities of the country and its allies, and possible retaliation measures against a foreign attack.

"The unauthorized disclosure of these classified documents could put at risk" U.S. national security, foreign relations, the safety of the country's military and the continued viability of sensitive intelligence collection methods, it said.

Former President Donald Trump greets supporters before speaking at the Westside Conservative Breakfast on June 1, 2023, in Des Moines, Iowa. (AP/Kyodo)

The disclosure by the Justice Department came a day after Trump, who seeks to win another term in the 2024 election and remains the clear front-runner for the Republican nomination, announced through his Truth Social platform that he had been indicted.

It marked the first-ever indictment of a former president on federal charges in U.S. history.

The indictment, which also details counts of conspiracy to obstruct justice and making false statements to investigators, alleged with some photographs that Trump kept numerous boxes containing classified documents in such places as a bathroom, ballroom and storage room at his Florida estate.

It said that Trump showed off some of the top-secret materials to visitors on two occasions in 2021.

Trump has criticized the federal investigation as a politically motivated "witch hunt." The former president is due to appear in a Miami court on Tuesday, and faces the possibility of imprisonment if convicted.

Along with the 76-year-old Trump, his aide Walt Nauta was also charged in the case. Nauta is accused of helping him hide classified documents from a grand jury probing the case and making false statements to investigators.

U.S. Special Counsel Jack Smith, who is heading the prosecution, made public comments on Friday, saying, "We have one set of laws in this country and they apply to everyone."

"Applying those laws, collecting facts -- that's what determines the outcome of an investigation. Nothing more and nothing less," said Smith, who did not take questions from reporters.

Related coverage:

Trump indicted over classified docs, 1st federal charges for ex-pres.