Michael Cohen, President Donald Trump‘s former long-time lawyer, was sentenced to three years in prison by a federal judge on Wednesday.

Cohen was sentenced for bank fraud, tax evasion, campaign-finance violations, and lying to Congress.

NEW YORK (AP) — Ex-Trump lawyer Cohen gets 3 years in prison for crimes including hush-money payments that prosecutors say Trump ordered. — Zeke Miller (@ZekeJMiller) December 12, 2018

During the sentencing, Cohen said his time working for the president was a “mental incarceration,” according to CNN.

“I have been living in a personal and mental incarceration ever since the day that I accepted the offer to work for a real estate mogul whose business acumen that I deeply admired,” he reportedly said during Wednesday’s hearing.

He also referenced the president calling his former lawyer “weak.” Cohen told the court he felt it was his “duty to cover up” Trump’s “dirty deeds.”

Cohen letting loose on Trump: "Recently the president tweeted a statement calling me weak and it was correct but for a much different reason than he was implying. It was because time and time again I felt it was my duty to cover up his dirty deeds" — Abby D. Phillip (@abbydphillip) December 12, 2018

Part of the sentencing revolved around hush-money payments made to adult film actress Stormy Daniels and Karen McDougal, both of whom allege they had affairs with Trump before he became president.

Cohen must surrender to authorities to head to prison on March 6, USA Today reports.

Trump’s former long-time lawyer had agreed to cooperate with Special Counsel Robert Mueller, and within his guilty plea filed late last month there were numerous references to “Individual 1,” believed to be the president.

Many people on Twitter pointed to an old tweet of Cohen’s where he taunted Hillary Clinton about going to jail–a popular theme from Trump’s 2016 presidential campaign.

This tweet was sent 36 months ago, which is the exact same prison term Michael Cohen was sentenced to just minutes ago. pic.twitter.com/uBMFmEUTZ9 — Frank Luntz (@FrankLuntz) December 12, 2018

Congratulations on receiving three years of free room and board, #MichaelCohen! pic.twitter.com/NGPnd10tUi — Nick Jack Pappas (@Pappiness) December 12, 2018

Damn this aged well. Free room and board for Michael Cohen!! pic.twitter.com/rczylSDojw — Get Social With Tèja 👑 (@tejaatej) December 12, 2018

There’s a Michael Cohen tweet for everything. pic.twitter.com/rCMGxrNXzG — Philippe Reines (@PhilippeReines) December 12, 2018

Michael Cohen is going to prison and this tweet might be in history books. pic.twitter.com/e0Kj1cVRDM — Frozen Political Takes (@ColdTakeArchive) December 12, 2018

Other people cracked jokes.

Michael Cohen’s worst crime? Liking his own tweets. pic.twitter.com/L0EPPUM4pT — James O'Malley (@Psythor) December 12, 2018

Let us #neverforget: Michael Cohen paid more than $3000 for this jacket pic.twitter.com/gf9reHJUrP — Hadley Freeman (@HadleyFreeman) December 12, 2018

READ MORE: