Michael Avenatti said federal prosecutors in New York falsely accused him of trying to extort millions of dollars from Nike as payback for his outspoken criticism of President Donald Trump.

Describing himself as "the foil for President Trump," Avenatti on Wednesday asked a U.S. judge in New York to dismiss the case on grounds that it's a "vindictive prosecution" by Trump's allies in the Justice Department.

Trump publicly expressed his disdain for Avenatti as a "third rate lawyer" and "total low-life," potentially swaying prosecutors to unfairly target him in a rushed investigation that led to his arrest in Manhattan in March, Avenatti's attorney, Scott Srebnick, said in the filing.

"This expression of disdain for Mr. Avenatti is especially troubling in view of President Trump's persistent public efforts to target his political enemies, including those who have criticized him in the media or confronted him in the political arena," Srebnick said.

Avenatti's motion doesn't address the other federal case in Manhattan against him, in which he's accused of stealing hundreds of thousands of dollars from the client that helped make him famous, the adult film star Stephanie Clifford, known as Stormy Daniels. His filing is also silent on separate charges against him in California, where he's accused of embezzling money from his other clients, failing to pay millions of dollars in taxes and lying in bank loan applications.

It's unclear whether a judge will consider Avenatti's public clash with Trump. Prosecutors have said they have extensive evidence of wrongdoing, including recordings from Nike lawyers who wore wires in the New York case and records in California indicating Avenatti raided a client's settlement in 2017 in order to pay $2.5 million for his portion of a jet, prosecutors said. Claims that he left a paraplegic client struggling to get by while stealing his multimillion-dollar settlement after an accident added a depravity to the case.

After Avenatti's arrest in the Nike case, Clifford said she wasn't surprised by the allegations.

"Nike will not respond to the allegations of an individual facing federal charges of fraud and extortion," the company said in an email. "Nike will continue its cooperation with the government's investigation into grassroots basketball and the related extortion case."

The embattled California lawyer became a household name after famously clashing with Trump a year and a half ago. He accused Trump of violating campaign-finance laws by paying Daniels hush money before the presidential election, to keep her quiet about an alleged sexual encounter. The claim cast a legal cloud on Trump and helped lead to a guilty plea by the president's longtime "fixer," Michael Cohen, while raising Avenatti's profile. Avenatti even weighed a possible presidential run.

Avenatti on Wednesday requested a search of White House emails that he says will prove he was framed in a effort to silence him and to remove a possible Trump challenger. In a footnote in the filing Srebnick says Steve Bannon, Trump's former chief strategist, had described Avenatti "as a serious threat to Trump's re-election chances in 2020."

The U.S. claims Avenatti demanded as much as $25 million from Nike in exchange for canceling a potentially damaging press conference about the company. At the time Avenatti was representing a coach who claimed to have information about improper payments made to athletes.

Shortly after he was arrested, Avenatti sought to beef up those claims by tweeting out details, hinting at payments Nike made to the mother of Deandre Ayton, the top pick in the 2018 NBA Draft, and to Bol Bol, the son of former NBA center Manute Bol and current freshman at the University of Oregon. Avenatti mentioned a Nike executive by name, and added that federal prosecutors had been "played" by Nike and its lawyers.

According to Avenatti, the case is undermined by how quickly the investigation was conducted, as well as the decision by Assistant U.S. Attorney Geoffrey Berman to not recuse himself as he did in the criminal case against Cohen, "presumably as a result of his ties to President Trump."

Avenatti also wants all internal documents, notes and e-mails that could shed light on why another attorney who Avenatti worked with in the Nike matter, Mark Geragos, wasn't arrested or charged even though he appears to have been involved in the same conduct.

"The evidence gathered by the government after Mr. Avenatti's arrest proves that neither Mr. Avenatti nor Mr. Geragos committed, or conspired to commit, extortion," Srebnick said. "Perhaps that explains why Mr. Geragos has not been charged."

Geragos didn't immediately respond to requests for comment.

Trump's animus toward Avenatti was well-known to Berman, according to the court document.

"Berman's relationship with President Trump, or at least the perception thereof, was sufficient to warrant his recusal from the Michael Cohen investigation," Srebnick wrote. "That USA Berman did not see fit to likewise recuse himself from Mr. Avenatti's case but, instead, has taken a very active role in it, is circumstantial evidence that he may be considered a 'stalking horse' for President Trump."

The case is U.S. v. Avenatti, 19-cr-00373, U.S. District Court, Southern District of New York (Manhattan).