CNN  — 

A federal judge has temporarily released celebrity attorney Michael Avenatti from a federal jail over coronavirus concerns.

The judge said Avenatti will have to return to custody in 90 days. The temporary release came after Avenatti’s lawyers said he was at risk for contracting coronavirus because he had pneumonia last year.

Avenatti has been held at the Metropolitan Correctional Center in Manhattan after a California judge revoked his bail earlier this year, finding he engaged in suspicious financial transactions. The MCC has reported cases of the virus among inmates.

Avenatti will be required to be held in quarantine at the jail facility for 14 days to ensure he doesn’t have the virus and can’t spread it into the community, the judge said.

Once jail officials determine Avenatti doesn’t have the virus, he will be released to home confinement at his friend’s house in Los Angeles and will not be allowed to use the internet. A second friend posted a $1 million bond securing the release.

Avenatti was convicted earlier this year of attempting to extort over $20 million from Nike.

He has been charged in two separate indictments with embezzling $300,000 from his former client, adult film star Stormy Daniels, and with tax fraud and stealing several million dollars from other clients. Avenatti has pleaded not guilty to those charges.

His trials have been set for later this year.