Former US President Donald Trump suffered a legal defeat in the legal dispute surrounding the investigation into his handling of secret government documents.

An appeals court ruled it was illegal to appoint a special agent to review documents seized at Trump's home, at Trump's request.

The decision was published on Thursday evening.

The district court that ruled on the Special Master's appeal had no authority to prohibit the state from using lawfully seized documents in a criminal investigation, it said.

This is a win for the US Department of Justice, which has been investigating Trump for several months.

Search in Mar-a-Lago

In August, the FBI searched Trump's Mar-a-Lago mansion in Palm Beach, Florida, and confiscated various classified information, some with the highest level of secrecy.

By keeping the documents in his private home long after Trump left office, he could have committed a criminal offense.

It is still unclear whether Trump could ultimately be charged.

Trump criticizes the actions of the authorities against him as politically motivated and sees it as an attempt to prevent him from moving into the White House again.

The Republican has since officially announced that he wants to run again as a candidate for his party in the 2024 presidential election.

Whether the Republicans will ultimately make him their presidential candidate remains to be seen.

Trump also took legal action against the investigation.

He fought in court to appoint the special representative and to stop the authorities from examining the government documents until then.

Both have now been overturned by the decision of the Court of Appeal.