(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.

Read More