(Bloomberg) -- An appeals court upheld a judge’s decision to restrict Donald Trump’s ability to publicly attack key figures in the federal election-obstruction case against him but narrowed the scope of those limits.

The US Court of Appeals for the DC Circuit ruled on Friday that the former president should continue to be barred from publicly attacking potential witnesses, prosecutors, and court staff. 

In a 3-0 decision, the appeals court panel found that at least some of Trump’s vitriolic comments to date about the case and its key players pose “a significant and imminent threat to the fair and orderly adjudication.” 

But the judges narrowed the order, freeing Trump to comment about Justice Department Special Counsel John “Jack” Smith. They also held that the gag order can only cover Trump’s statements about witnesses related to their “potential participation” in the case. That would give him a green light to make other critical comments about some of the high-profile potential witnesses who have spoken out against him or become political rivals, such as former Vice President Mike Pence or former Attorney General Bill Barr.

“We do not allow such an order lightly. Mr. Trump is a former President and current candidate for the presidency, and there is a strong public interest in what he has to say,” Judge Patricia Millett wrote for the panel. “But Mr. Trump is also an indicted criminal defendant, and he must stand trial in a courtroom under the same procedures that govern all other criminal defendants. That is what the rule of law means.”

The panel clarified that Trump is prohibited from making statements about attorneys and court staff involved in the case, as well as their family members, if his intent is to “materially interfere” with their work, another attempt at narrowing the scope.

Trump’s attorneys previously have said they would ask the US Supreme Court to intervene if the DC Circuit upheld any of the limits on his speech. They contend the entire gag order is unconstitutional as he mounts another White House bid.

Trump spokesperson Steven Cheung released a statement criticizing the ruling and said that Trump “will continue to fight for the First Amendment rights of tens of millions of Americans to hear from the leading presidential candidate at the height of his campaign.”

A special counsel office spokesperson declined to comment.

Read More: Trump’s Push to Lift DC Gag Order Faces Skeptical Appeals Court

A trial in the election-obstruction case, which is one of four criminal indictments Trump faces, is scheduled to begin March 4. Another set of partial gag orders in a civil fraud case in Manhattan state court barring him and his lawyers from making statements about court staff were briefly put on hold, but reinstated in late November by an appeals court.

The order from US District Judge Tanya Chutkan in October barred Trump from making statements that “target” Smith and other prosecutors, potential witnesses and their testimony and court employees. He was also prohibited from directing other people to make such statements.

Chutkan left Trump free to broadly criticize the prosecution effort, the Justice Department, President Joe Biden and his administration, the city of Washington and its jury pool. She also excluded herself from the order, only prohibiting him from making public comments about other courthouse personnel. 

Smith’s office had asked for the gag order mostly based on Trump’s vitriolic online posts about the election-obstruction case, including attacks on Smith and his spouse, accusations of bias against Chutkan and disparaging comments about high-profile witnesses. 

Prosecutors argued that Trump’s running commentary risked intimidating witnesses, inciting his supporters to threaten case participants and otherwise interfering with Chutkan’s ability to ensure a fair trial.

Trump’s defense team argued that limiting his ability to talk about the case absent concrete evidence of “clear and present danger” violated his First Amendment rights, especially given his status as a presidential candidate.

The DC Circuit temporarily halted Chutkan’s gag order while it heard the case and placed the fight on a fast track. Trump, in the meantime, resumed commenting on the case in ways that would likely violate the original terms, including calling Smith “deranged.”

During arguments before the DC Circuit panel on Nov. 20, the judges signaled they were skeptical of arguments by Trump attorney D. John Sauer that nearly any speech restriction was constitutionally off limits to Chutkan ahead of the March 4 trial. Judge Bradley Garcia questioned why Chutkan had to first “wait and see” if Trump’s attacks would lead to real-world threats.

But the judges also probed whether Chutkan’s order was too broad — surely Smith had “thick enough skin,” Judge Cornelia Pillard said — and whether the text was clear enough that Trump and his lawyers could comply with it in the real world and especially on the campaign trail.

Garcia was nominated to the court by Biden. Millett and Judge Cornelia Pillard, who also heard the case, were nominated by former President Barack Obama.

The case is US v. Donald Trump, US Court of Appeals for the DC Circuit, 23-3190.

(Updates with Trump spokesperson in the eighth paragraph.)

©2023 Bloomberg L.P.