Judge Juan Merchan, overseeing the “hush-money” trial on Thursday, said he would not sanction former President Donald Trump for his comment last week during a visit to a Manhattan construction site.

Prosecutors had sought to penalize President Trump when he responded to a question about trial witness David Pecker’s testimony, saying the ex-tabloid publisher is “a nice guy.”

“Just to save you time, I’m not terribly concerned about that one,” Judge Merchan told Trump attorney Todd Blanche. The judge, however, did express concern about the three other comments at issue in the hearing.

Meanwhile, Mr. Blanche earlier cited recent public comments from President Joe Biden in a bid to defend his client from more gag order-related sanctions.

Prosecutors in the “hush-money” case told the judge on Thursday that President Trump should face more penalties for violating the order, alleging he did so when talking to reporters outside the courtroom. Earlier this week, Judge Merchan hit the former president with a $9,000 fine for nine separate posts online, claiming they contravened his order prohibiting him from speaking about potential witnesses or members of the jury.

However, Mr. Blanche invoked a recent comment by President Biden forecasting “stormy weather” for President Trump, which he said is an “obvious” reference to Stormy Daniels. Ms. Daniels, whose real name is Stephanie Clifford, is a central figure in the case, while the “stormy weather” remark was made over the past weekend at the White House Correspondents’ Dinner.

“President Trump can’t respond to that in the way he wants to because of this gag order,” Mr. Blanche said, referring to the Biden comment.

In several court filings, President Trump’s lawyers argued that the gag order was designed to silence him while his opponents, including witnesses Michael Cohen and Ms. Daniels, were allowed to repeatedly attack him. Assistant District Attorney Christopher Conroy said in court on Thursday that’s not true, arguing that the gag order was imposed as a result of President Trump’s “persistent and escalating rhetoric aimed and participants in this proceeding.”

Among the alleged gag order violations are comments President Trump made in the hallway outside the courtroom, where he has often spoken to reporters at the start and end of each day in court.

In one of those monologues,  according to Mr. Conroy, President Trump again described Mr. Cohen as a “liar,” adding: “The defendant is talking about witnesses and the jury in this case, one right here outside this door.”

“This is the most critical time, the time the proceeding has to be protected,” he claimed.

Prosecutors again urged Judge Merchan to impose a $1,000 fine for each of the four alleged violations, adding that prosecutors weren’t yet seeking to have President Trump jailed as punishment because the alleged violations at issue happened prior to Judge Merchan ordering the former president to pay the $9,000 fine for nine previous gag order violations.

“Because we’d prefer to minimize disruption to this proceeding, we are not yet seeking jail, but the court’s decision this past Tuesday will inform the approach we take to future violations,” Mr. Conroy told the judge.

During the hearing, Mr. Blanche argued that the saturation of media coverage has made it impossible for President Trump to conduct interviews without being bombarded with questions about the trial.

“He can’t just say ‘no comment’ repeatedly. He’s running for president,” the defense attorney said, adding the gag order should be seen in the context of “what’s happening behind us,” a reference to the high volume of journalists in the courthouse. “Every time we whisper to our client, it’s livestreamed over all sorts of social media outlets,” he said.

But Judge Merchan said that members of the news media are “not defendants in this case, they’re not subject to the gag order, that’s a very significant issue you’re overlooking.” The judge also said that he had no authority over the media.

“The former president of the United States is on trial,” the judge continued. “He’s the leading candidate for the Republican party right now. It’s not surprising that we have press here, we have press in the overflow room, we have people throughout the world that are interested.”

Aside from the court hearings, President Trump said that the gag order is unfair because he should be able to speak freely as the current leading Republican presidential candidate for the 2024 election. The judge also has told the former president that he must attend trial dates or could face the possibility of being arrested, which President Trump has said is an attempt to keep him off the campaign trail.

The trial is expected to last about another month.