LOS ANGELES (AP) — Michael Avenatti, the brash former attorney for the porn actress Stormy Daniels, was arrested for allegedly violating bail by committing numerous financial crimes to conceal assets from creditors while living a lavish lifestyle, U.S. prosecutors alleged in a court document released Wednesday.

Avenatti was arrested by IRS agents at a state bar court hearing on Tuesday, where he was facing suspension of his license to practice for allegedly stealing from a client, said Thom Mrozek, spokesman for the Los Angeles U.S. Attorney’s office.

“Completely innocent,” Avenatti said as he was being led out of the courthouse, according to the Daily Beast, which reported that the arrest occurred during a break in testimony.

The arrest threatens to disrupt Avenatti’s trial scheduled next week in Manhattan on charges he tried to extort $25 million from Nike, a New York federal judge said during a hearing Wednesday.

“The arrest of Mr. Avenatti this close to the trial has essentially thrown the trial into chaos,” U.S. District Judge Paul G. Gardephe said. “Mr. Avenatti has been on bail in the California case for a long time. So there are certainly questions in my mind about why it was necessary to raise allegations about bail violations so close to the trial and it certainly has put defense counsel in a very difficult position.”

Court documents supporting Tuesday’s arrest lay out several schemes orchestrated by Avenatti to hide his assets from an ex-wife, a former legal partner and a client, while living in an $11,000-a-month apartment, being chauffered in a Mercedes and staying in luxury resorts. He pocketed a $1 million in legal fees during the period and then shifted the money around to conceal the payment despite mounting debts that surpassed $10 million.

Prosecutors are seeking to hold Avenatti while facing trial for allegedly committing wire and mail fraud, both federal crimes, as well as possible state crimes in California and Washington state.

“Defendant’s extensive pattern of criminal conduct and the overwhelming evidence supporting those charges demonstrate that defendant is a substantial danger to the community,” prosecutors wrote in a court document. “If allowed to remain on bond, defendant will almost certainly continue to engage in further fraudulent and obstructive conduct.”

Avenatti was expected to appear in federal court in Santa Ana, California, late Wednesday morning. His defense lawyer did not immediately reply to requests for comment.

Avenatti faces trial in May in California on a 36-count indictment that includes allegations that he defrauded clients of millions of dollars, stiffed the IRS and committed bank fraud.

He has pleaded not guilty to those charges, along with the Nike extortion allegations and a separate case charging him with ripping off ex-client Daniels of proceeds of a book deal. Gardephe said he would decide what to do about scheduling the Nike case after Avenatti’s bail hearing in California.

The arrest of Avenatti marks a new low for the attorney who was flying high a year ago while in the spotlight championing Daniels case against President Donald Trump.

Daniels, whose real name is Stephanie Clifford, went to court to tear up a $130,000 hush money deal she said she made to cover up an affair with Trump before he was president.

Although Trump has denied the affair he chose not to challenge that effort, so she effectively won what she was seeking. But the president won his legal fees in successfully challenging a related defamation case that Daniels brought against him.

Avenatti had positioned himself as a Trump troll of sorts, attacking the president on Twitter frequently, and even flirted with running for president at one point.

Despite losing the Daniels defamation case, Avenatti had claimed he would eventually prevail and win her even larger lawyer fees than the nearly $300,000 she owed Trump. But Daniels hired a new lawyer to take the case and Avenatti’s own criminal legal problems began with his arrest in New York in March.