LOS ANGELES — President Trump’s personal lawyer must declare in writing that his Fifth Amendment right against self-incrimination may be jeopardized if legal proceedings aren’t delayed in a lawsuit filed by porn actress Stormy Daniels, a federal judge said Friday.

Los Angeles federal Judge S. James Otero said there were “gaping holes” in Michael Cohen’s request for a delay and it was not enough for his attorney to file a statement on his behalf. He gave Cohen until Wednesday to do so himself.

Daniel’s lawsuit is aimed at dissolving a confidentiality agreement that prevents her from talking about an alleged affair with Trump. She’s also suing Cohen for defamation.

Cohen sought to delay the civil case 90 days after FBI agents raided his New York office and residence, seeking records about the $130,000 agreement that Daniels signed days before the 2016 presidential election.

Otero said it was “substantially likely” there would be some criminal action.

“This is not your standard case,” Otero said. “I would expect something big to follow.”

Cohen’s lawyer argued that because the criminal investigation overlaps issues in the lawsuit, Cohen’s right against self-incrimination “may be adversely impacted if this case proceeds” because he won’t be able to respond and defend himself.

Otero said attorney Brent Blakely had not shown a large enough overlap between the legal matters to justify a delay, though he noted the defense was in a conundrum because the “breadth and scope of the investigation is a mystery.”

Daniels’ attorney, Michael Avenatti, said it was a “strategic and purposeful” decision by Cohen not to previously file a declaration. Outside court, Avenatti said it was “clear to me Michael Cohen and the president do not want to publicly state” Cohen intends to invoke the Fifth Amendment.

Daniels, whose real name is Stephanie Clifford, has offered to return the $130,000 so she can “set the record straight.” She argues the agreement is legally invalid because it was only signed by her and Cohen, not by Trump.

Cohen, who has denied there was ever an affair, said he paid the money out of his pocket using a home equity loan. He has said neither the Trump Organization nor the Trump campaign was a party to the transaction with Daniels and he was not reimbursed for the payment.