Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LOS ANGELES — Michael Avenatti, the lawyer who represented Stormy Daniels and was later charged with embezzlement, was arrested Tuesday by the IRS on allegations that he violated the terms of his pretrial release, a spokesman for federal prosecutors said.

Details were not released, and the court documents are under seal, said Thom Mrozek, spokesman for the U.S. Attorney's Office in Los Angeles.

Avenatti is expected to appear in federal court Wednesday in Santa Ana, south of Los Angeles, Mrozek said.

H. Dean Steward, an Orange County lawyer representing Avenatti in two of three cases he faces, said Avenatti was in court in Los Angeles on a state bar matter and was arrested by IRS agents around 6 p.m.

"It's my understanding it has something to do with a bail violation, but I don't have the warrant," Steward said Tuesday evening.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"Exactly what the details are I don't know. But I'm almost positive it has something to do with finances," Steward said. He said Avenatti owes millions from civil judgments.

Download the NBC News app for breaking news

Avenatti is charged in California with wire fraud, trying to obstruct the IRS, identity theft, bank fraud and false testimony under oath during bankruptcy. He is accused of embezzling $4 million from a paraplegic man whom he had represented, federal prosecutors have said.

Avenatti denies all of the allegations "vehemently, every chance he gets," Steward said.

The Daily Beast reported that the arrest happened during a break in testimony in the state bar matter. Avenatti said he was "completely innocent" as he was led out of the courthouse, it reported.

Avenatti is accused in New York of trying to extort more than $20 million from Nike, according to prosecutors there.

He has also been charged in New York with stealing almost $300,000 from Daniels, the adult film actress who claimed that she had an affair with Donald Trump in 2006, long before he ran for office. Trump has denied it; Avenatti, who no longer represents Daniels, has pleaded not guilty.

Avenatti is scheduled to begin trial in the Nike case next week, and Steward questioned the timing of Tuesday's arrest so close to the trial.

Steward said he expects Avenatti to remain in custody until Wednesday’s court appearance.