Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Michael Cohen, President Donald Trump's longtime personal lawyer, filed a declaration in federal court on Wednesday asserting his Fifth Amendment rights against self-incrimination in the ongoing lawsuit filed against him by porn star Stormy Daniels.

"Based on the advice of counsel, I will assert my Fifth Amendment rights in connection with all proceedings in this case due to the ongoing criminal investigation by the FBI and U.S. attorney for the Southern District of New York," Cohen said in the court filing.

Daniels, whose legal name is Stephanie Clifford, is suing Cohen for defamation for suggesting that she lied about an affair with Trump in 2006. She is also suing Trump, alleging that the nondisclosure agreement that Cohen had arranged with her is invalid because the president never signed it.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Last week, a federal judge told Cohen that he himself needed to file the declaration asserting his Fifth Amendment rights because it was not enough for Cohen's lawyer to do it for him, according to The Associated Press.

This news comes as Trump's lawyer told a federal judge on Wednesday that the president will make himself available "as needed" in the continuing legal battle over the documents seized in the raid.

Joanna Hendon, Trump's attorney, said in a letter to the judge that the president would aid in a potential review of the materials that were taken by the FBI to determine which items are subject to attorney-client privilege should a special master be appointed to oversee the filtering of the seized materials. Trump's involvement would need to be authorized by the judge.

The search took place earlier this month, seeking information about the $130,000 payment Cohen made to Daniels days before the 2016 election and other matters. Rod Rosenstein, the deputy attorney general who oversees the Russia probe, personally signed off on the raid.

The search warrants were sought and executed by FBI agents and federal prosecutors in New York in coordination with special counsel Robert Mueller's team and later drew the ire of Trump, who called it "an attack on our country ... what we all stand for."

Cohen previously sought to stop federal investigators from reviewing materials, but U.S. District Court Judge Kimba Wood denied that motion.

As part of a review of the materials seized from Cohen, Trump could seek to designate various documents as privileged between him and his lawyer, but the decision on that would be up to the special master.

Ty Cobb, a White House lawyer, said the White House is not commenting on the Cohen case.

Cohen is due back in court on Thursday in Manhattan, where an update on the legal issues in the case is expected. Wood said Wednesday that "the agenda will include an update from the government on its production to Mr. Cohen's counsel of a set of the seized materials."

She also asked each side in the case to submit a letter to hammer out the details of filtering potentially privileged documents.