Court documents released on Wednesday reveal that the special counsel Jack Smith obtained a search warrant for materials related to Donald Trump's Twitter account and that the social platform was later held in contempt for its delayed response to the warrant.
The warrant requested "data and records" connected to Mr Trump's account on Twitter, now known as X, as part of Mr Smith's investigation into the former US president's efforts to overturn the 2020 election.
The filing states that the Washington court that approved the search warrant "found probable cause to search the Twitter account for evidence of criminal offences".
It is not clear what Mr Smith's team was specifically looking for, as Mr Trump's Twitter account is public, but the search warrant could include private messages and tweet drafts.
Mr Trump has been charged over allegedly leading a conspiracy to subvert the 2020 election that he lost to Democrat Joe Biden as well as over his actions before, during and after the insurrection at the US Capitol on January 6, 2021. He pleaded not guilty in court last week.
He used his Twitter account to call for supporters to gather at a rally in Washington on January 6.
The platform banned Mr Trump shortly after the deadly attack.
The court order for the information was accompanied by a non-disclosure agreement, requiring that Twitter not publicly share news of the search warrant.
It was served in late January but Mr Smith's team did not hear from Twitter management until February - "four days after the compliance deadline" - because the company objected to the validity of the non-disclosure order.
Twitter believed the non-disclosure order violated the First Amendment of the US Constitution.
A court ruled that Twitter's argument to vacate the non-disclosure agreement was invalid, and later hit the company with a $350,000 contempt sanction for failing to comply with the warrant in a timely manner.
After billionaire Elon Musk bought the company, Mr Trump had his Twitter account reinstated after a nearly two year suspension — but he has not yet tweeted as @realDonaldTrump. He has opted to post on his Truth Social platform instead.