Michael Avenatti, attorney for Stormy Daniels, arrives for a court proceeding regarding the search warrants served on President Donald Trump's longtime personal attorney Michael Cohen, at the United States District Court Southern District of New York, April 13, 2018 in New York City. (Drew Angerer/Getty Images)
PHOTO: Drew Angerer/Getty Images
Michael Avenatti, attorney for Stormy Daniels, arrives for a court proceeding regarding the search warrants served on President Donald Trump's longtime personal attorney Michael Cohen, at the United States District Court Southern District of New York, April 13, 2018 in New York City. (Drew Angerer/Getty Images)
Now playing
01:45
Avenatti demands Cohen recordings be released
PHOTO: CNN Illustration/Getty Images
Now playing
01:53
What the Manafort and Cohen case results mean
PHOTO: Fox News
Now playing
02:10
Trump on flipping: Almost ought to be illegal
PHOTO: Getty Images
Now playing
00:38
Trump: Need a lawyer? Don't hire Michael Cohen
Now playing
02:09
Attorney: Cohen will not seek Trump pardon
Michael Cohen, a longtime personal lawyer and confidante for President Donald Trump, leaves the United States District Court Southern District of New York on May 30, 2018 in New York City. (DON EMMERT/AFP/Getty Images)
PHOTO: DON EMMERT/AFP/Getty Images
Michael Cohen, a longtime personal lawyer and confidante for President Donald Trump, leaves the United States District Court Southern District of New York on May 30, 2018 in New York City. (DON EMMERT/AFP/Getty Images)
Now playing
01:58
Internet objects to Cohen's GoFundMe page
NEW YORK, NY - AUGUST 21: Michael Cohen, President Donald Trump's former personal attorney and fixer, exits federal court, August 21, 2018 in New York City. Cohen reached an agreement with prosecutors, pleading guilty to charges involving bank fraud, tax fraud and campaign finance violations. (Photo by Drew Angerer/Getty Images)
PHOTO: Drew Angerer/Getty Images
NEW YORK, NY - AUGUST 21: Michael Cohen, President Donald Trump's former personal attorney and fixer, exits federal court, August 21, 2018 in New York City. Cohen reached an agreement with prosecutors, pleading guilty to charges involving bank fraud, tax fraud and campaign finance violations. (Photo by Drew Angerer/Getty Images)
Now playing
01:08
Michael Cohen pleads guilty on 8 counts
NEW YORK, NY - MAY 30: Michael Cohen, (L) former personal lawyer and confidante for President Donald Trump, exits the United States District Court Southern District of New York on May 30, 2018 in New York City.  According to a filing submitted to the court Tuesday night by special master Barbara Jones, federal prosecutors investigating Michael Cohen, a longtime personal lawyer and confidante for President Donald Trump, are set to receive 1 million files from three of his cellphones that were seized last month. (Photo by Eduardo Munoz Alvarez/Getty Images)
PHOTO: Eduardo Munoz Alvarez/Getty Images North America/Getty Images
NEW YORK, NY - MAY 30: Michael Cohen, (L) former personal lawyer and confidante for President Donald Trump, exits the United States District Court Southern District of New York on May 30, 2018 in New York City. According to a filing submitted to the court Tuesday night by special master Barbara Jones, federal prosecutors investigating Michael Cohen, a longtime personal lawyer and confidante for President Donald Trump, are set to receive 1 million files from three of his cellphones that were seized last month. (Photo by Eduardo Munoz Alvarez/Getty Images)
Now playing
01:35
Michael Cohen surrenders to FBI
Now playing
00:46
Attorney: Cohen thinks Trump is a danger to US
NEW YORK, NY - MAY 30: Michael Cohen, (C) former personal lawyer and confidante for President Donald Trump, exits the United States District Court Southern District of New York on May 30, 2018 in New York City.  According to a filing submitted to the court Tuesday night by special master Barbara Jones, federal prosecutors investigating Michael Cohen, a longtime personal lawyer and confidante for President Donald Trump, are set to receive 1 million files from three of his cellphones that were seized last month. (Photo by Eduardo Munoz Alvarez/Getty Images)
PHOTO: Eduardo Munoz Alvarez/Getty Images
NEW YORK, NY - MAY 30: Michael Cohen, (C) former personal lawyer and confidante for President Donald Trump, exits the United States District Court Southern District of New York on May 30, 2018 in New York City. According to a filing submitted to the court Tuesday night by special master Barbara Jones, federal prosecutors investigating Michael Cohen, a longtime personal lawyer and confidante for President Donald Trump, are set to receive 1 million files from three of his cellphones that were seized last month. (Photo by Eduardo Munoz Alvarez/Getty Images)
Now playing
02:09
Cohen in talks to plead guilty to charges
Michael Cohen, U.S. President Donald Trump's personal attorney, takes a phone call as he sits outside near the Loews Regency hotel on Park Ave on April 13, 2018 in New York City. (Yana Paskova/Getty Images)
PHOTO: Yana Paskova/Getty Images
Michael Cohen, U.S. President Donald Trump's personal attorney, takes a phone call as he sits outside near the Loews Regency hotel on Park Ave on April 13, 2018 in New York City. (Yana Paskova/Getty Images)
Now playing
01:37
WSJ: Cohen under investigation for tax fraud
NEW YORK, NY - AUGUST 21: Michael Cohen, former lawyer to U.S. President Donald Trump, exits the Federal Courthouse on August 21, 2018 in New York City. Cohen reached an agreement with prosecutors, pleading guilty to charges involving bank fraud, tax fraud and campaign finance violations.(Photo by Yana Paskova/Getty Images)
PHOTO: Yana Paskova/Getty Images North America/Getty Images
NEW YORK, NY - AUGUST 21: Michael Cohen, former lawyer to U.S. President Donald Trump, exits the Federal Courthouse on August 21, 2018 in New York City. Cohen reached an agreement with prosecutors, pleading guilty to charges involving bank fraud, tax fraud and campaign finance violations.(Photo by Yana Paskova/Getty Images)
Now playing
02:08
Sources: Feds preparing charges against Cohen
PHOTO: CNN
Now playing
02:56
Schlapp on Cohen 'duping' Trump: It can happen
PHOTO: CNN
Now playing
01:05
Giuliani: Wouldn't pardon Cohen if I was Trump
PHOTO: The Daily Show / Comedy Central
Now playing
01:48
Late night skewers Trump over Cohen recording
PHOTO: Photo Illustration/cnn
Now playing
02:33
Why the Trump-Cohen tape is a big deal
(CNN) —  

Porn star Stormy Daniels’ attorney, Michael Avenatti, withdrew his motion to participate in the court battle involving the FBI raid of President Donald Trump’s attorney’s hotel and office Wednesday after a federal judge warned him he would have to “stop your publicity tour.”

Avenatti, who practices law in California, had requested to be admitted into the New York proceedings, but was met with fierce objection from the attorney for Michael Cohen, Trump’s long-time lawyer, who cited Avenatti’s frequent television appearances, public statements about Cohen’s guilt and his release of Cohen’s personal financial information.

In a nod to that, Judge Kimba Wood told Avenatti that for him to be admitted, “you would have to change your conduct” and “stop your publicity tour.” Wood said she didn’t mean that in a derogatory way but later said “this conduct is inimitable to giving Mr. Cohen eventually a fair trial.”

Wood did not rule on whether to allow Avenatti to appear formally in court but made clear that his time speaking before her was limited. “Until you are admitted I don’t expect you to stand here and be heard,” the judge told him. About an hour after the hearing ended Avenatti withdrew his motion to appear without prejudice, meaning he could take it up later.

The hearing was set to provide an update of the review of documents seized in the FBI raid but was sidetracked by allegations lobbed by Avenatti about secret audio recordings he alleged Cohen or his associates leaked to the media involving Daniels’ previous attorney and by Cohen and Trump’s attorneys saying Avenatti’s conduct was unfitting.

Wood is giving Trump’s attorney’s lawyers until June 15 to finish reviewing documents seized when the FBI raided Cohen’s home, office and hotel room, rejecting their requests for additional time, saying she wants to keep the investigation on track.

Cohen’s attorney said his legal team received 3.7 million files from the government and had finished reviewing 1.3 million of them. They asked to have until July to finish their review, saying attorneys were working around the clock, sleeping on couches and one was sent home with an injury.

Prosecutors said the only items left to be turned over are two BlackBerry phones and the contents of a shredding machine, which were described as not voluminous.

Despite pleas for additional time by Cohen’s lawyer, the judge said Cohen’s lawyers could have until mid-June to complete their review of documents for attorney-client privilege and whatever items have not been reviewed by that time would be handled by a government “taint team” of independent attorneys.

Wood said she wanted to keep the review for privileged documents moving so the investigation could continue. The judge appointed a special master to handle disputes over privilege so that the seized material could be handled over to the prosecutors investigating Cohen. Prosecutors were expected to receive over 1 million items by Wednesday.

The tone in court turned more hostile when the judge allowed Avenatti to address his request to be allowed to formally appear in the case.

Avenatti accused Cohen or “someone associated with Cohen” of leaking an audio recording of a conversation between Cohen and Daniels’ first attorney, Keith Davidson, in which Davidson shared information that Avenatti said would have been privileged between Daniels and Davidson. Avenatti said he learned of the recording by a reporter and found it “very surprising and disturbing to me.”

With palpable tension, Cohen’s attorney Stephan Ryan objected to allowing Avenatti to appear before the judge. He acknowledged any recordings were kept “under lock and key.”

Immediately following the hearing Avenatti seized on Cohen’s lawyer’s comment that the recordings were protected, “It is clear from today’s proceedings that Mr. Cohen and his attorneys are hellbent on continuing to hide the truth from the American people. As a result of or efforts there was a shocking admission in court today, namely that just like the Nixon tapes years ago we now have what I will refer to as the ‘Trump Tapes.’”

Inside the courtroom, Ryan, becoming increasingly agitated, cited Avenatti’s public comments about Cohen’s guilt and the release of financial information about Cohen that Ryan said Avenatti shared with at least three news organizations the day before it was publicly released.

“My phone rang off the hook the day before he released an embargo from at least three different entities,” Ryan said. He said Avenatti’s release of Cohen’s financial records also included other individuals named Michael Cohen and was “entirely reckless and improper” and a “drive-by shooting of anyone named Michael Cohen.” He added, it was “intentional, malicious and prejudicial” for Avenatti to release the records.

A lawyer for Trump echoed objections made by Ryan and produced three emails that she said “raise questions” about how Avenatti would conduct himself If he were admitted into the process.

Last week a US bankruptcy court judge ordered the law firm of Eagan Avenatti LLP to pay a $10 million judgment to an attorney who once worked for the firm. The judgement came after Eagan Avenatti LLP failed to make the first payment on a $4.85 million settlement with lawyer Jason Frank, a one-time partner at the firm. Avenatti filed an affidavit with the court Tuesday saying that law firm never represented Daniels.

Joanna Hendon, Trump’s attorney, produced emails, including one from March 2018, that showed Avenatti was still using an email address associated with Eagan Avenatti, in an attempt to undermine the accuracy of his affidavit.

In court, Avenatti called Ryan’s comments “quite the tale” but he did not address the emails.

About an hour after the hearing Avenatti withdrew his motion to formally appear in the matter.