Michael Avenatti, the former lawyer for adult film star Stormy Daniels and prominent critic of Donald Trump, has temporarily been released from jail amid fears of the spread of the coronavirus in the prison system.

Avenatti was convicted in February of trying to extort up to $25m from Nike. His sentencing was set for June.

He is still awaiting trial on charges of defrauding Ms Daniels, as well as separate accusations of cheating clients and lying to the Internal Revenue.

Avenatti rose to prominence representing Ms Daniels over claims that she was paid off after having an affair with Mr Trump shortly after the birth of his youngest son. The president has denied the accusation.

He spoke of himself as a possible challenger to Mr Trump in November and lambasted him on Twitter, often using the hashtag "#basta", Italian for "enough".

US District Judge James Selna ordered that the 49-year-old be released from the Metropolitan Correctional Centre in New York because of fears of the spread of the virus, which has killed more than 18,000 Americans.

His lawyer argued that he was at "extreme risk" of contracting Covid-19 within the prison system.

Avenatti will be quarantined for 14 days to make sure he does not already have the virus and is then expected to move to the home of a friend, Jay Manheimer, in Venice, California.

He will have to wear an electronic bracelet, will not be allowed to use the internet and will have to return to prison in 90 days.

Several other high profile prisoners have had requests for temporary freedom denied, including Mr Trump's former personal lawyer, Michael Cohen, and singer R Kelly. Bill Cosby has requested release, while disgraced former movie mogul Harvey Weinstein is believed to have contracted coronavirus.

Reuters contributed to this report