The extensive effort and energy dedicated to concealing Donald J. Trump’s alleged affairs with women during the lead-up to the 2016 election, along with the anxiety among his aides regarding their potential impact on female voters, resurfaced prominently in Michael D. Cohen’s testimony on Monday.


Mr. Cohen, along with a team at The National Enquirer, was in constant communication about silencing these women, even as new allegations emerged that necessitated uncomfortable conversations with the candidate. Witnesses for the prosecution recounted how accounting departments were involved, front companies were established, and misleading invoices were generated.


The release of the “Access Hollywood” tape in 2016, which featured Mr. Trump discussing groping women with impunity, was a significant blow. Mr. Trump urged Mr. Cohen, who was in London at the time, to contact his media contacts. In a text exchange presented in court, Chris Cuomo, then at CNN, warned Mr. Cohen that waiting too long to defend Mr. Trump on TV would be detrimental, saying, “He is dying right now.”


Mr. Cohen testified that Mr. Trump described his comments on the “Access Hollywood” tape as “locker-room talk,” a phrase he credited to his wife, Melania.


Following this, the issue of Stormy Daniels emerged, as she considered going public with her account of a sexual encounter with Mr. Trump. Mr. Cohen recounted that Mr. Trump acknowledged meeting Ms. Daniels at a golf tournament and boasted that women liked him more than football stars at the event.


When Mr. Cohen pressed Mr. Trump about whether he had had sex with Ms. Daniels, Mr. Trump did not answer directly but called her “a beautiful woman.” Upon learning that she might go public, Mr. Trump became irate, referring to the situation as a “total disaster” and expressing concern that “women are going to hate me.”


According to Mr. Cohen, Mr. Trump instructed him to "just take care of it." Consequently, Mr. Cohen set up a bank account for Essential Consultants L.L.C., a company he created in October 2016, funding it from his home-equity line of credit. He has previously stated that he did this to ensure his wife would not discover any transactions with Ms. Daniels. The checks, per Mr. Cohen's instructions, did not include an address.


Approximately two weeks before the 2016 election, Mr. Cohen wired the payment to Keith Davidson, Ms. Daniels’s lawyer.


Gary Farro, a former banker with First Republic, testified that Mr. Cohen’s transactions were unusual and conveyed a sense of urgency each time they communicated.