NEW YORK — The judge overseeing former President Trump’s New York fraud trial issued a limited gag order for all parties Tuesday after Trump’s Truth Social account made a post targeting the judge’s principal clerk while she sat just feet away from him in the courtroom.

Judge Arthur Engoron issued the gag order barring Trump and any party in the case from posting or speaking publicly about members of his staff, after Trump released personally identifying information about the principal clerk on Truth Social while the hearing was underway.

The trial judge, without naming Trump, addressed the court on the matter, saying “one of the defendants” posted a “disparaging, untrue and personally identifying post” about his staff, and though the judge ordered it deleted, it had been emailed out to “millions of other recipients.”

“Personal attacks on members of my court staff are not appropriate, and I will not tolerate it under any circumstance,” Engoron said.

He added that he warned counsel off the record about the former president’s comments yesterday, but the warning went unheeded.

In a Truth Social post that went up while Trump was sitting in the courtroom Tuesday, Trump targeted Engoron’s principal law clerk — who was sitting just a few feet away — calling her “Schumer’s girlfriend” and reposting a picture of her alongside Senate Majority Leader Chuck Schumer, a fellow New York Democrat.

It is unclear what connection, if any, Schumer has with the clerk. Schumer’s office has not responded to a request for comment from The Hill.

Trump’s campaign also sent out an email shortly after the Truth Social post Tuesday while the court was on a lunch break that lambasted the judge himself.

The gag order came after the court session resumed following a longer-than-expected lunch break.

It came on the second day of the fraud trial, which Trump is attending. Prosecutors have laid out a case against Trump and his company for what they allege are years of fraudulently inflating the value of some of his most famed real estate properties, including ones in which he has a residence.

This is not the first time Trump has had to deal with a gag order in a legal case because he targeted those involved.

Last month, special counsel Jack Smith requested the judge overseeing Trump’s federal Jan. 6 case impose similar restrictions limiting what Trump can say publicly, citing recent posts threatening witnesses in the case.

Updated at 3:37 p.m. ET