Celebrity attorney Michael Avenatti has been released from a federal jail over concerns that he was at risk for coronavirus.

He was being held at the Metropolitan Correctional Center in Manhattan, and a federal judge ordered that he return to custody in 90 days. Avenatti’s lawyers said that he was at a greater risk for contracting the virus because he had pneumonia last year.

The attorney will have to go through a self-quarantine for 14 days at a prison facility to make sure he doesn’t have the disease, and then he will be on house arrest at his home in Venice, Calif. His bond was set at $1 million. The judge also ruled that Avenatti will not be allowed to access the Internet, leave his home unless he has a medical emergency or conduct any transactions that cost more than $500.

Avenatti is best known for representing adult-film actress Stormy Daniels in her lawsuits against President Donald Trump that included a defamation suit and an attempt to void a non-disclosure agreement. He was arrested in 2019 and faced federal charges in New York and Los Angeles for bank fraud, misappropriating client funds and trying to extort Nike for more than $20 million.

In February, he was convicted of the New York charges, and a ruling on his disbarment in California is still pending.