US President Donald Trump's former personal lawyer Michael Cohen left prison on Friday to finish his criminal sentence at home, a spokesman for Cohen's attorney said, a day after a judge found he was imprisoned two weeks ago as retaliation for planning to publish a book about Trump.Cohen was picked up at a prison in Otisville, New York, about 70 miles (110 km) northwest of New York City, by his son, the spokesman said. He is expected to return to his Manhattan apartment. In May, Cohen was furloughed from the prison because of concerns about the spread of the novel coronavirus. US District Judge Alvin Hellerstein on Thursday ordered Cohen to be released by 2 p.m. EDT Friday.“We’re just waiting to get him home and then will be considering all next steps, including what the conditions of release will be, who will be supervising him and what, if any, additional legal actions he’ll take,” E. Danya Perry, who represents Cohen, said in an interview on Friday.On July 9, Cohen and his lawyer, Jeffrey K. Levine, met with prison officials to convert his furlough to a home confinement for the final two years of his three-year sentence. After Cohen questioned a provision that barred him from publishing the book, engaging with news organizations and posting on social media, officials shackled him and returned him to prison.Hellerstein said in Thursday's court hearing that he had never seen such a gag provision in his 21 years on the bench."It's retaliatory because of his desire to exercise his First Amendment rights to publish a book," Hellerstein said.Cohen may file a lawsuit seeking compensation for his unlawful imprisonment and violation of his First Amendment rights, his attorney said."The lawsuit will get deeper into how this happened and who ultimately was responsible," Levine said.The probation officer who drafted the agreement for Cohen with the no-media provision told the court that he had not been aware of the book.The Federal Bureau of Prisons also issued a statement after the judge's ruling saying said the book played no role in the decision to return Cohen to prison. The bureau did not immediately respond to a request for comment on Cohen's departure from prison.Cohen, who once said he would “take a bullet” for Trump, was sentenced in 2018 for directing hush payments to pornographic film star Stormy Daniels and former Playboy model Karen McDougal, who said they had affairs with Trump.The president has denied having the encounters and has called Cohen a "rat."In court papers, Cohen said the book will contain his experiences and observations from the decade he worked for Trump, including both before and after he became president. Cohen said it would provide "unflattering details" of Trump's behavior.Even as he turned on Cohen, Trump has voiced his support for people who remained loyal to him.A day after Cohen was sent back to prison, Trump commuted longtime friend and adviser Roger Stone's prison sentence for lying under oath to lawmakers investigating Russian interference in the 2016 US election.