Michael Cohen, the former personal attorney to President Donald Trump, asked a Manhattan federal judge late Monday night to order his immediate release from prison, claiming that he had been taken back into custody in retaliation for a planned book detailing his work as the president's fixer.

In a petition for habeas corpus, Cohen's attorneys said that officials with the federal Bureau of Prisons had conditioned his transition to home confinement on an "unconstitutional demand" that he not engage with "any kind of media" and stay off of social media platforms.

Cohen, who had been released on furlough from FCI Otisville because of the COVID-19 pandemic May 21, claimed the requirement was designed to prevent the publication of his tell-all book, which he had been planning to publish in this fall, just ahead of the Nov. 3 presidential election.

According to the lawsuit, Cohen's book describes his "first-hand experiences" with Trump "behind closed doors," and includes accounts of "virulently racist remarks" that Trump had allegedly made against Black leaders, including President Barack Obama and Nelson Mandela.

In the lawsuit, Cohen called his jailing an act of "textbook" discrimination that aimed to silence his First Amendment rights and threatened to expose him to serious health problems associated with the virus.

"Respondents' adverse action was likely caused by the fact that Mr. Cohen's speech would cast President Trump in a negative light shortly before the presidential election," his attorneys wrote in a court filing Monday.

"Respondents' abuse of their authority, in an apparent attempt to prevent publication of a book that promises to reveal negative information about the incumbent president, is textbook viewpoint discrimination," they said.

Cohen is represented by attorneys from the American Civil Liberties Union and the law firm Perry Guha in Manhattan.

The BOP declined to comment Tuesday, citing a policy of not publicly discussing pending litigation. A spokeswoman for U.S. Attorney General William Barr, who was also named in the filing, did not immediately provide comment Tuesday morning.

Monday's petition was the latest development in a saga surrounding Cohen's sentence, after he pleaded guilty in 2018 to tax fraud and lying to Congress about facilitating hush money payments to women who said they'd engaged in extramarital affairs with Trump, allegations that the president had denied.

Cohen, who is serving a three-year prison sentence, was released in May as a result of the BOP's handling of the pandemic. His attorneys said that officials with the BOP had never objected to Cohen's release until he started advertising his book on social media.

According to the filing, Cohen has been held in solitary confinement in Otisville since he was remanded to federal custody following a July 9 meeting at the U.S. Probation Office in Manhattan.

During the meeting, Cohen's attorneys said, he was presented with a location-monitoring program agreement that included a provision barring him from engaging with "print, TV, film, books, or any other form of media/news." It also required him to "communicate with friends and family to exercise discretion in not posting on your behalf or posting any information about you."

"The purpose is to avoid glamorizing or bringing publicity to your status as a sentenced inmate serving a custodial term in the community," the provision said, according to court filings.

The petition said that Cohen and his attorney, Jeffrey Levine, sought to clarify the "broad language" of the agreement with probation officers, who responded that they would run the request "up the chain of command" for a decision. However, Cohen said he never got the chance to sign the agreement and was taken back into custody by U.S. marshals.

According to the filing, Cohen had "pleaded" with officers as he was being handcuffed, asking that he be allowed to sign the agreement, rather than return to prison.

The BOP said through a spokesman July 9 that Cohen had been remanded "as a result of his refusal to consent to the terms of the program," and later issued a second statement saying that he had "declined to agree with all of the terms of the FLM program, most notably electronic monitoring, and as a result, he was returned to a BOP facility for service of his sentence."

In Monday's filing, Cohen's attorneys said the BOP's "pretextual explanations for its conduct are false," and accused the agency of mischaracterizing the nature of the provision.

"The Prior Restraint Provision was not a requirement that Mr. Cohen merely seek 'pre-approval' for media interviews—rather, it was an absolute prohibition on his ability to speak publicly," the filing said. The Prior Restrain Provision is not reasonably related to any legitimate penological purposes."

The case, captioned Cohen v. Barr, has been assigned to U.S. District Judge Alvin K. Hellerstein of the Southern District of New York.

READ MORE: