New York State Supreme Court Justice Arthur Engoron on Tuesday issued a partial gag order preventing former President Donald Trump and others from posting information about court officials.

Engoron's ruling came after Trump shared — and then deleted — a photo of the judge's clerk, Ashley Greenfield.

"Schumer's girlfriend, Alison [sic] R. Greenfield, is running this case against me. How disgraceful! This case should be dismissed immediately," Trump wrote.

POLL: Should Trump be allowed to run for office?

After a lengthy conference with attorneys on Tuesday afternoon, Engoron said he would issue a "gag order."

"Consider this statement a gag order forbidding all parties from posting ... about any member of my staff," the judge said, according to courtroom reporter Frank G. Runyeon. "Failure to abide by this order will result in serious sanctions."

But in a statement Tuesday afternoon, Trump denied there was a gag order and said he was having "a very good day in court."