The judge questioned his defense lawyer’s credibility. The prosecution accused him of orchestrating a criminal conspiracy to influence the 2016 presidential election. And his former friend corroborated that accusation, delivering hours of gripping testimony about their secret plot to protect his campaign.

Donald J. Trump’s criminal trial in Manhattan is off to an ominous start for the former president, and it might not get any easier in the days ahead.

The judge presiding over the case, Juan M. Merchan, is expected to rule soon on a request from prosecutors to hold Mr. Trump in contempt of court for attacking witnesses and jurors alike. And the first witness — David Pecker, longtime publisher of The National Enquirer — will return to the stand on Thursday after the trial’s weekly Wednesday hiatus.

Mr. Pecker, who was once close to Mr. Trump, is expected to face hours of additional questioning from prosecutors in the Manhattan district attorney’s office, before Mr. Trump’s lawyers get a chance to cross-examine him.

Already, Mr. Pecker has delivered some compelling testimony, transporting jurors back to a crucial 2015 meeting with Mr. Trump and his fixer Trump Tower in Midtown Manhattan.

Prosecutors called it the “Trump Tower conspiracy,” arguing that Mr. Pecker, Mr. Trump and Michael D. Cohen, who was then Mr. Trump’s personal lawyer and fixer, hatched a plot at the meeting to conceal sex scandals looming over Mr. Trump’s campaign.