Scandal, hush-money payments, secret recordings and Donald Trump's alleged gag order violations took centre stage during his tenth day in court.
The court heard testimony from Keith Davidson, a lawyer who brokered porn star Stormy Daniels' hush-money deal.
Questioning of Mr Davidson grew hostile, as the defence tried to paint him as a sleazy Hollywood profiteer.
He pushed back, alleging the defence had wrongly used words like "extortion" to describe valid legal settlements.
"We're both lawyers. I'm not here to play lawyer games with you," the ex-president's lawyer Emil Bove said on Thursday in a particularly heated moment during cross-examination.
Mr Bove unearthed several celebrity scandals that Mr Davidson allegedly was involved in keeping quiet, apparently in an effort to shake the witness' credibility.
Mr Trump's lawyer asked whether Mr Davidson had "extracted sums of money" from actor Charlie Sheen and if he worked with a "sex-tape broker" on the behalf of reality star Tila Tequila. There were also stories about actress Lindsay Lohan's visit to a rehabilitation facility and professional wrestler Hulk Hogan's sex tape.
Mr Davidson repeatedly maintained that the settlements he was involved in were fair and legitimate. He also regularly cited attorney-client privilege.
Prosecutors, meanwhile, had called Mr Davidson to connect Mr Trump, his ex-lawyer Michael Cohen, and the $130,000 hush-money payment he paid to Ms Daniels ahead of the 2016 presidential election.
The former president pleaded not guilty to 34 counts of falsifying business records to conceal the payment. He also has denied any sexual encounter with Ms Daniels.
Mr Davidson detailed how the payout to Ms Daniels was shaped. He was also involved in an earlier deal with the National Enquirer magazine to conceal Playboy model Karen McDougal's claim that she had a romantic affair with Mr Trump.
The lawyer, who is based in Beverly Hills, California, emphasised that he assumed Mr Trump was behind keeping Ms Daniels quiet in October 2016. Emails and text messages indicated that he and others believed the hush-money agreement with his former client helped Mr Trump win the presidency just a month later.
"What have we done?" Mr Davidson texted National Enquirer editor-in-chief Dylan Howard as the results rolled in on election night.
Asked to explain the message, Mr Davidson told the court: "There was an understanding that our efforts may have in some way… our activities may have in some way assisted the presidential campaign of Donald Trump."
During a second set of questions, prosecutor Joshua Steinglass played recordings of Mr Davidson and Cohen on the phone, "surreptitiously recorded" by Cohen.
In one recording, Cohen says that Mr Trump told him several times that he "hate[s] the fact that we did it". Mr Davidson testified that he was referencing Stormy Daniels' hush-money deal.
"But my comment to him is, 'but every person that we've spoken to told you it was the right move'," Mr Cohen adds in the recording.
A court sketch of Keith Davidson's testimony on Thursday
Prosecutors called Douglas Daus, who works in the high-tech analysis unit at the New York County District Attorney's Office, toward the end of the day.
Mr Daus told the court he analysed two phones owned by Mr Cohen, extracting the data and 39,745 contacts - more than 10 pages included various contact details for Mr Trump alone.
Mr Cohen is expected to testify soon, but it is unclear exactly when.
Justice Juan Merchan's ruling also is expected after prosecutors and the defence debated on Thursday whether Mr Trump violated his gag order again. He has been fined $9,000 for previous infractions.