A New York appeals court has reinstated a gag order that barred Donald Trump from commenting about court personnel after he disparaged a law clerk in his New York civil fraud trial.

The decision from a four-judge panel came two weeks after an individual appellate judge had put the order on hold while the appeals process played out.

The trial judge, Arthur Engoron, imposed the gag order on October 3 after Mr Trump posted a derogatory comment about the judge’s law clerk to social media.

The post, which included a baseless allegation about the clerk’s personal life, came on the second day of the trial in New York attorney general Letitia James’ lawsuit.

Ms James alleges Mr Trump exaggerated his wealth on financial statements used to secure loans and make deals. The former US president denies any wrongdoing.

Judge Engoron later fined Mr Trump 15,000 dollars (£11,800) for violating the gag order and expanded it to include his lawyers after they questioned clerk Allison Greenfield’s prominent role on the bench, where she sits alongside the judge, exchanging notes and advising him during testimony.

Mr Trump’s lawyers filed a lawsuit against Judge Engoron that challenged his gag order as an abuse of power.

They sued the judge under a state law known as Article 78, which allows lawsuits over some judicial decisions.