The federal judge presiding over the criminal investigation into Trump attorney Michael Cohen agreed Thursday to appoint an independent "special master" to review the material seized in a recent FBI raid, granting a request first made by Cohen's lawyers.

During a court hearing in New York City Thursday, Judge Kimba Wood announced the appointment of Special Master Barbara Jones, who will now look through material seized in the raid on Cohen's apartment, office and hotel room.

The decision comes after federal prosecutors also endorsed the call. The appointment allows an independent reviewer to lead “an expeditious and fair review of the materials,” according to a letter U.S. Attorney Robert Khuzami submitted to the judge early Thursday.

At the same time the special master reviews the documents, Cohen’s attorneys will have the opportunity to go through and flag any seized material that they deem protected under attorney-client privilege.

Federal prosecutors for the Southern District of New York said Thursday they were dealing with data from over a dozen devices in addition to hard copy documents.

Also Thursday, the lawyer for adult film star Stormy Daniels, Michael Avenatti, filed a motion to join the case. Avenatti said he wanted “a seat at the table” to review any documents obtained in the FBI raid that could be related to his client, whose legal name is Stephanie Clifford.

Cohen paid Daniels $130,000 weeks before the 2016 presidential election in exchange for her silence about an alleged sexual encounter with Donald Trump in 2006. Daniels initially denied any involvement with Trump.

Avenatti said that he believed Daniels’ previous attorney, who negotiated the nondisclosure agreement and payment, may have improperly shared information with Cohen, without Daniels’ knowledge or consent -- as recently as days before the FBI raid.

Avenatti claimed he knew that text messages between Cohen and Daniels’ ex-attorney existed.

Federal prosecutors said they would file Monday on whether they will object or allow Avenatti to join the case. The judge will make the final ruling.

Cohen’s attorney on Wednesday said that his client would exercise his Fifth Amendment rights in a separate Stormy Daniels civil lawsuit, due to the ongoing criminal investigation.

On Thursday morning, President Trump weighed in on Cohen’s case, defending him as “a good person” and a “great guy,” but stressing the investigation “doesn’t have to do with me.”

“Michael is a businessman, he’s got business. He also practices law, and they’re looking at something having to do with his business. I have nothing to do with his business,” Trump said in an exclusive phone-interview with “Fox & Friends.”

Trump said that while Cohen serves as his attorney, he has “many attorneys.”

“Sadly I have so many attorneys you wouldn’t even believe it,” Trump said, noting that of his overall legal work, Cohen represented a “tiny, tiny little fraction.”

Trump did, however, note that Cohen represented him “with this crazy Stormy Daniels deal.”

“And from what I see, he did absolutely nothing wrong. There were no campaign funds going into this,” Trump said.

Trump said earlier this month that he did not know about the payment to Daniels from Cohen, which is now part of the investigation led by the U.S. Attorney’s Office in the Southern District of New York.

Fox News’ Kathleen Foster, Jake Gibson and Courtney Crawford contributed to this report