A federal judge in Manhattan sentenced President Donald Trump’s former personal lawyer Michael Cohen to three years in federal prison on Wednesday. Cohen previously pleaded guilty to numerous criminal charges related to lying to Congress and violating campaign finance law through paying hush money to women who allegedly had sexual affairs with Trump.

Cohen, 52, faced two separate cases ― one from U.S. Attorney’s Office for the Southern District of New York and another from special counsel Robert Mueller’s office ― covering a range of criminal offenses.

“I take full responsibility for each act that I pled guilty to: the personal ones to me and those involving the president of the United States of America,” Cohen reportedly told the judge before his sentencing. He said he had been living “in a personal and mental incarceration ever since the day that I accepted the offer to work for a real estate mogul.”

Responding to a Trump tweet that called him weak, Cohen said that he was weak because “time and time again I felt it was my duty to cover up his dirty deeds.”

Lanny Davis, an adviser to Cohen, said that Cohen would “state publicly all he knows about Mr. Trump” at an appropriate time.

“Michael has owned up to his mistakes and fully cooperated with special counsel Mueller in his investigation over possible Trump campaign collusion with Russian meddling in the 2016 election,” Davis said. “While Mr. Mueller gave Michael significant credit for cooperation on the ‘core’ issues, it is unfortunate that SDNY prosecutors did not do the same. To me, their judgment showed a lack of appropriate proportionality.”

The U.S. Attorney’s Office for the Southern District of New York also announced Wednesday that it had reached a non-prosecution agreement with AMI, the parent company of the National Enquirer. AMI admitted to making the $150,000 payment “in concert with [Trump’s] presidential campaign” as part of an effort to hide Playboy playmate Karen McDougal’s alleged affair with the now-president from voters. The company has agreed to cooperate with prosecutors.

Federal prosecutors had recommended last week that Cohen serve 42 months in prison for his crimes, rejecting the notion he should be given leniency for pleading guilty and providing information to authorities. Mueller’s office, however, detailed in their pre-sentencing filing how Cohen had offered extensive assistance to their investigation into Russian meddling in the 2016 U.S. election.

Cohen’s lawyers had requested that their client serve no time in prison, stating in a court filing that his cooperation with prosecutors was extensive and that he gave seven interviews to Mueller’s team. Cohen told the special counsel’s office about the Trump Organization’s real estate plans in Moscow, and also outlined his own contacts with Russian interests during the presidential campaign.

The FBI raided Cohen’s office, hotel room and home in April of this year, making him a key figure in Mueller’s probe. Since then, he has pleaded guilty in multiple cases that include payoffs to porn star Stormy Daniels and McDougal, as well as lying to congressional committees about the Trump Organization’s proposed projects in Russia.

Brendan McDermid / Reuters Michael Cohen, President Donald Trump's former attorney, arrives for his sentencing in the Manhattan borough of New York City, Dec. 12, 2018.

Cohen acted as Trump’s fixer for years, carrying out tasks that ranged from overseas business negotiations to trying to kill negative press coverage. Federal prosecutors stated in a court filing last week that during the presidential campaign, Trump directed Cohen to pay off women who alleged they had sex with Trump while he was married to his wife, Melania. Cohen told a Manhattan court in August that he paid Daniels $130,000 during the 2016 campaign to have her stay quiet about her alleged affair with Trump.

Cohen’s court date Wednesday is the first of three high-profile sentencing hearings for former Trump officials. Former national security adviser Michael Flynn, who Mueller’s office recommended receive no prison time due to his cooperation, will receive his sentence on Dec. 18. Meanwhile, Trump’s former campaign chairman Paul Manafort will have to wait until March for his sentencing after Mueller’s office outlined last week how he lied to investigators and violated his plea deal in a court filing last week.

Although Trump would have the power to pardon Cohen, the prospect is extremely unlikely. Trump turned on Cohen after his former lawyer began assisting Mueller, and has publicly berated him as weak and stupid. Earlier this month, Trump tweeted that Cohen should serve a “full and complete sentence.”

This has been updated.