(Reuters) - Michael Cohen, U.S. President Donald Trump’s former personal lawyer, on Friday lost his bid for an emergency gag order to stop Michael Avenatti, a lawyer for adult film actress Stormy Daniels, from maligning him in frequent media appearances.

In a brief order, U.S. District Judge James Otero in Los Angeles said Cohen had not shown he would face “immediate, irreparable injury” without an immediate restraining order.

The judge also admonished Cohen in a footnote, saying such requests “throw the system out of whack” by creating more work for the court, forcing adversaries to respond in a hurry and allowing some litigants to “cut in line” ahead of others.

Daniels, whose real name is Stephanie Clifford, is suing Cohen and Trump to get out of an agreement under which Cohen paid her $130,000 not to discuss an alleged sexual encounter she had with Trump. The president has denied having sex with her.

Otero did not decide whether a restraining order should eventually be granted. He gave Avenatti until June 25 to formally respond to Cohen, who can reply by July 2.

“Mr. Avenatti either needs to respect and observe the Code of Professional Conduct (for lawyers) or remove himself from this case,” Cohen’s lawyer Brent Blakely said in an email.

He noted that U.S. District Judge Kimba Wood, who is deciding which files seized from Cohen can be reviewed by prosecutors in a criminal probe into his business dealings, recently admonished Avenatti not to use her Manhattan courtroom in connection with a “publicity tour.”

Slideshow ( 5 images )

In a Thursday night filing, Blakely said Avenatti had discussed the Daniels case in at least 121 television appearances and 439 tweets, threatening to turn it into a “media circus” and deprive Cohen of his right to a fair trial.

Avenatti has “repeatedly denigrated Mr. Cohen, predicted that Mr. Cohen would be indicted for bank fraud, wire fraud, campaign finance violations, and accused Mr. Cohen of hiring a ‘thug’ to allegedly threaten Ms. Clifford,” the filing said.

“Mr. Avenatti’s actions are mainly driven by his seemingly unquenchable thirst for publicity,” it added.

Avenatti posted Otero’s order on his Twitter feed, where he had called the gag order request a “complete joke and baseless.”

“Mr. Cohen and Brent Blakely can’t deal with the truth, the facts, and the law, so they have to resort to unethical, meritless motions,” Avenatti tweeted.

A separate hearing in Daniels’ case is scheduled for June 21.

The case is Clifford v Trump et al, U.S. District Court, Central District of California, No. 18-02217.