Get all the latest news on coronavirus and more delivered daily to your inbox. Sign up here.

Disgraced lawyer Michael Avenatti may be temporarily released from a New York federal detention center where he’s awaiting sentencing on an extortion conviction -- provided he meets certain requirements, including testing negative for the coronavirus, a federal judge in California said Friday.

"If the defendant is found to be exhibiting symptoms consistent with COVID-19 or is confirmed to have COVID-19, the defendant shall not be released to the public because of the danger the defendant poses to the community," District Court Judge James Selma said in a release order.

After a 14-day quarantine at a federal facility, Avenatti would be released on a $1 million bond to the custody of a childhood friend in Los Angeles for 90 days and must shelter in place, the order said. The friend could be held in contempt of court if Avenatti violates the terms of his release.

Avenatti also would be required to wear a location monitoring bracelet.

Coronavirus outbreak prompts Madoff, Avenatti, Cohen lawyers to push for their release

Avenatti was convicted in February of trying to extort Nike and in the last month, his lawyers have been pushing for his release amid the virus pandemic.

A March court motion requesting home confinement for Avenatti said he was particularly vulnerable to the coronavirus in part because his cellmate was removed from his cell due to flu-like symptoms.

“He is part of the general population incarcerated under unsanitary and disease-prone conditions,” attorney H. Dean Steward wrote in the court filing. “He also had pneumonia six months ago.”

Under the terms of his release, Avenatti would be prohibited from using the internet and from opening new bank or credit card accounts and must provide documentation for all his financial transactions.

He must also avoid contact with anyone associated with the case except his ex-wife, the release order said.

The order added that it doesn’t conflict with “probable cause to believe that defendant committed state and federal crimes while on pretrial release” and that he’s “a danger to the community.”

CLICK HERE FOR COMPLETE CORONAVIRUS COVERAGE

Avenatti was found guilty of extortion, wire fraud and transmission of interstate communications with intent to extort on Feb. 14 and could face decades in prison.

Fox News' Nick Givas, Lucia I. Suarez Sang and Greg Norman contributed to this report.