Michael Cohen
Michael CohenReuters

A federal judge ordered the release of former Trump lawyer Michael Cohen to house arrest Thursday.

US District Judge Alvin K. Hellerstein said that the conditions of Cohen's probation following his July 9 arrest constituted a violation of his First Amendment rights and a retaliation by the government for his intention to publish a book about US President Trump before the US elections in November.

Hellerstein ordered that Cohen be released from prison by 2 PM tomorrow.

"How can I take any other inference than that it's retaliatory?" Hellerstein asked when the prosecutors insisted that Cohen's probation officers knew nothing about his book when they included orders banning him from speaking to the media.

“It’s retaliatory because of his desire to exercise his First Amendment rights to publish a book and discuss the book … on social media,” Hellerstein said.

Cohen was convicted of tax evasion, bank fraud, and lying to Congress and sentenced to three years in prison. He was released to house arrest in May after serving one year due to concerns over the spread of the coronavirus in his prison.

Cohen was arrested again on July 9 after eating at a diner in violation of orders restricting him to his house.