An attorney for Donald Trump’s personal lawyer Michael Cohen is seeking a court order to bar the attorney representing adult film actress Stormy Daniels from speaking to the media, alleging that his appearances could deprive Cohen of the right to a fair trial in a civil lawsuit.

Daniels' attorney, Michael Avenatti, on Twitter called the motion "a complete joke and baseless."

The motion filed in federal court for the Central District of California relates to a lawsuit brought by Daniels, whose real name is Stephanie Clifford, against Trump and Cohen seeking to invalidate the non-disclosure agreement she signed in exchange for $130,000 payment made a month before the 2016 presidential election.

The motion claims that "Avenatti's actions are mainly driven by his seemingly unquenchable thirst for publicity," and seeks an order restraining Avenatti "from communicating with the press and/or public regarding the merits of this case."

Cohen's motion also touches on a federal probe of his business dealings. It mentions a judge's comments in a Manhattan federal court over material seized in an FBI raid of Cohen’s home and office. Cohen has not been criminally charged.

The motion says that when Avenatti attempted to be admitted to intervene in that case, Judge Kimba Wood said that if he were granted access, Avenatti would have to stop making public comments about his assumption of Cohen's guilt.

The motion filed in the California civil case says that during Avenatti's media appearances and on Twitter he "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."

"Enough is enough. As Judge Wood stated, if Mr. Avenatti wants to participate in a lawsuit in the role of an attorney, he is subject to the ethical guidelines governing attorneys, and his comments to the press/public and malicious attacks on Mr. Cohen must be stopped in its tracks," Cohen's attorney wrote in the motion.

Avenatti seemed unimpressed. "The motion for a gag order is a complete joke and baseless," the attorney said on Twitter.

The motion for a gag order is 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. This must be their birthday present to Mr. Trump. #Basta — Michael Avenatti (@MichaelAvenatti) June 15, 2018

"Mr. Cohen and [his attorney] Brent Blakely can't deal with the truth, the facts, and the law, so they have to resort to unethical, meritless motions," Avenatti said in the tweet.

Daniels claims that she and Trump had sex in 2006, and the money paid in October of 2016 was a "hush" agreement.

The White House and Cohen have denied that Trump had an affair with Daniels.