Updated

Michael Cohen, President Trump's former personal attorney, was sentenced to three years in prison after pleading guilty to tax evasion, campaign finance violations and lying to Congress.

Earlier this year, Cohen, 52, admitted to violating federal campaign finance laws by arranging hush-money payments to porn star Stormy Daniels and former Playboy model Karen McDougal in the weeks leading up to the election "at the direction" of Trump, who was then a candidate. He pleaded guilty to tax evasion, making false statements to a financial institution, willfully causing an unlawful corporate contribution and making an excessive campaign contribution.

The excessive campaign contribution was regarding the $130,000 payment made to Daniels, whose real name is Stephanie Clifford, ahead of the election in exchange for her silence about an alleged sexual encounter with Trump.

Prosecutors had recommended a substantial prison term with a modest amount of credit for his cooperation. Cohen's lawyers, however, argued he shouldn't spend any time behind bars.

Before he was sentenced, Cohen blamed Trump for making him cover up his "dirty deeds" and said his "blind loyalty" to the president made him "take a path of darkness instead of light."

Read on to look at some of the legal issues and controversies he’s faced.

Campaign finance

Cohen pleaded guilty to violating federal campaign finance laws in August by offering payments to women who claimed to have relationships with Trump in exchange for their silence. He said he arranged the payments to adult film star Stormy Daniels and former Playboy model Karen McDougal  "at the direction" of Trump, who was then just a presidential candidate.

Cohen pleaded guilty to five counts of tax evasion, one count of making false statements to a financial institution, one count of willfully causing an unlawful corporate contribution and one count of making an excessive campaign contribution. He faced up to 65 years in prison, but his plea deal stipulates he will not challenge a sentence between 46 and 63 months.

MICHAEL COHEN'S CASE, FROM STANDING BY TRUMP TO IMPLICATING HIM IN PLEA DEAL: A TIMELINE

McDougal has said she had a “consensual, loving relationship” with Trump in 2006. While this was prior to his presidency, Trump was married to Melania Trump at that point. McDougal was paid $150,000 to squelch her story of the relationship.

The White House has denied the allegations of an affair.

Cohen also arranged a $130,000 payment to Daniels in 2016 for her silence regarding an alleged sexual encounter with Trump in 2006 while he was married. Trump has denied an affair took place.

Lying to Congress

Cohen pleaded guilty on Nov. 29 to making false statements regarding a real estate project in Moscow before the Senate Intelligence Committee in 2017.

CAN EX-PLAYBOY MODEL KAREN MCDOUGAL TALK ABOUT ALLEGED AFFAIR WITH TRUMP? A LOOK AT HER RECENT SETTLEMENT

Cohen said he told lawmakers the Trump Tower project ended in January 2016 when it continued until June 2016. He also said he lied about never discussing traveling to Russia with Trump, although the pair did not go.

Fox News’ Samuel Chamberlain, Alex Pappas, John Roberts, Adam Shaw, Brooke Singman and The Associated Press contributed to this report.