(WASHINGTON) -- Special counsel Jack Smith obtained a search warrant for records and data from former President Donald Trump's Twitter account earlier this year, newly revealed court documents show.
The existence of the search warrant was confirmed in a Wednesday order from a three-judge panel with the U.S. Court of Appeals for the District of Columbia, which upheld a $350,000 fine against Twitter imposed by a judge in D.C. District Court that found the company in contempt for initially failing to comply with Smith's warrant.
The newly-released opinion describes an unusual legal dispute when Smith's office sought information from Trump's Twitter account and -- after apparent technical issues -- Twitter resisted complying, claiming constitutional protections, ultimately leading to a six-figure contempt penalty from the court.
The appellate opinion states that Smith's office obtained the warrant for Trump's Twitter account information on Jan. 17, in addition to a non-disclosure order that would have prohibited the company from sharing the existence of the search warrant with any person, including Trump himself.
At the time the warrant was served, the district court's chief judge, Beryl Howell, found there were "reasonable grounds to believe" that disclosing the warrant to Trump "would seriously jeopardize the ongoing investigation" by giving him "an opportunity to destroy evidence, change patterns of behavior, or notify confederates," the appellate opinion states.
It's not clear why Smith was seeking records from Trump's account.
Smith was named as a special counsel last year to oversee the Department of Justice's investigations into Trump. His team has since charged Trump in two federal cases, in Florida and Washington: one related to Trump’s alleged mishandling of government secrets and the other related to Trump’s push to overturn the 2020 election results. He has pleaded not guilty and denies all wrongdoing.
Trump was permanently suspended from Twitter two days after the Jan. 6 assault on the Capitol over what the company said at the time was "the risk of further incitement of violence."
Elon Musk reinstated Trump's account shortly after taking control of the company last year, which he has now rebranded as X, though Trump has not yet returned to using his old account while continuing to use his own digital platform, Truth Social.
The appellate court opinion states that when the government initially served Twitter the warrant for data from Trump's account, they encountered what appeared to be technical difficulties followed by a formal objection to handing over the data by the company on Feb. 1 -- four days after the deadline to comply.
"Although the company did not question the validity of the search warrant, it asserted that the nondisclosure order was facially invalid under the First Amendment," the appeals court wrote in their opinion. "Twitter informed the government that it would not comply with the warrant until the district court assessed the legality of the nondisclosure order."
While Twitter moved in court to quietly challenge the order, the government asked a judge to order Twitter to explain why it should not be held in contempt of court.
In its argument challenging the non-disclosure order, Twitter argued compliance with it could preclude Trump from asserting executive privilege related to his presidency over communications he made via his Twitter account.
The government countered that regardless of the company's objections to the non-disclosure order, it should have complied with the search warrant in a timely manner.
In February, in sealed court proceedings, a district judge rejected Twitter's arguments and held the company in contempt -- while giving it an opportunity to purge its contempt by producing Trump's account information.
The government suggested sanctions against the company should accrue at a rate of $50,000 per day, to double each day Twitter failed to comply -- citing Twitter's sale to Elon Musk and Musk's reported net worth.
Although Twitter produced some records from Twitter's account later that day in February, "its production was incomplete."
It did not hand over the full amount of required data in compliance with the warrant until three days later, which the government argued merited a total fine against the company of $350,000.
The district court agreed, finding Twitter in civil contempt and ordering a $350,000 sanction.
As Twitter appealed that order, the government filed a separate motion in June that proposed to permit Twitter to notify Trump of the existence of its warrant against his Twitter account. The government later changed its position that it could move forward with notifying Trump due to other information that had surfaced at the time "about investigations of the former President [that became publicly available]," Wednesday's opinion states.
The three-judge appellate panel that upheld the district court's order and released Wednesday's redacted opinion is comprised of two appointees by President Joe Biden and one appointee by former President Barack Obama.
In finding Twitter's arguments against the non-disclosure order unconvincing, the judges wrote, "The whole point of the nondisclosure order was to avoid tipping off the former President about the warrant's existence."
"Because the nondisclosure order was a narrowly tailored means of achieving compelling government interests, it withstood strict scrutiny," they ruled.
ABC News has reached out to Trump and Twitter for comment.