NEW YORK (AP) — The judge in Donald Trump’s civil fraud trial fined the former president $10,000 on Wednesday, saying Trump violated a limited gag order barring personal attacks on court staffers.

The fine came after Trump was called to the witness stand to explain his comment outside the courtroom about “a person who’s very partisan sitting alongside” the judge in the case, Judge Arthur Engoron.

Weeks ago, Engoron ordered all participants in the trial not to comment publicly about his staff. The narrow gag order imposed on Oct. 3 came after Trump made a social media post maligning the judge’s principal law clerk, who sits beside Engoron in court.

The judge ordered Trump to take down that post and Trump did. But it lingered on his campaign website for weeks, prompting a $5,000 fine for Trump on Friday.

Trump and his lawyers said his comment Wednesday was about witness Michael Cohen, not the clerk.

Three of Trump’s attorneys objected to the fine, insisting that the comment was referring to Cohen, and they reiterated Trump’s claim that the judge’s law clerk was unfairly biased.