President Donald Trump's former longtime lawyer Michael Cohen has pleaded guilty.

It marked the climax of the Cohen controversy.

Here's the full timeline of events.

President Donald Trump's former longtime lawyer Michael Cohen has been sentenced to three years in prison after pleading guilty to a list of federal crimes he committed while employed by the president. Cohen's sentencing culminates a months-long controversy surrounding his fraudulent conduct during the 2016 election.

During his December 12 sentencing, Cohen apologized for his actions and said he acted out of "blind loyalty" to Trump. Days earlier, on November 29, he pleaded guilty to lying to Congress about his involvement with the construction of the Trump Tower in Moscow.

Earlier this year, on August 21, Cohen cut a deal with federal prosecutors and pleaded guilty to five counts of tax evasion, one count of making a false statement to a financial institution, and two counts related to campaign-finance violations. Cohen said under oath that Trump directed him to violate campaign-finance laws just before the 2016 presidential election to boost his candidacy.

The latter two charges were in connection to payments to the former Playboy model Karen McDougal and the porn actress Stormy Daniels to silence their allegations of affairs with Trump.

As Cohen said he committed the campaign-finance violations "at the direction of the candidate" and with the "purpose of influencing the election," there were audible gasps in the reporter-packed courtroom in lower Manhattan courtroom.

The federal prosecutors Cohen struck a deal with said they had evidence corroborating Cohen's admissions, stemming from records obtained from him that included audio tapes, texts, phone records, emails, witnesses with knowledge of the transactions, and records from The National Enquirer.

Later in the week, The Wall Street Journal reported, federal prosecutors investigating Cohen granted immunity to Trump Organization CFO Allen Weisselberg and American Media Inc. CEO David Pecker, who struck the deal with McDougal.

Cohen faced 65 years in prison, but the deal narrowed that sentence down to a much more palatable three years.

Lanny Davis, one of Cohen's attorneys, told Business Insider after Cohen pleaded guilty that Cohen felt "pain for his family" that he could go to prison but relief that the plea deal was done. Cohen's also not done opening up on what he knows about Trump, Davis said.

"This is the time he knows he's going to jail, and he feels liberated that he can finally speak his mind about his concerns about Donald Trump without a criminal lawyer telling him to 'be quiet' because 'you'll upset the prosecutors,'" he said.

Moving forward, all eyes are on what happens next, particularly for Trump.

"The plea, under oath, establishes that the president was a co-conspirator in the campaign violations to which Cohen pleaded guilty," Philip Allen Lacovara, who served as counsel to the special prosecutors investigating President Richard Nixon's role in the Watergate scandal, told The New York Times.

Before Nixon resigned from office, a grand jury named him an unindicted coconspirator. Lacovara said Trump had "technically" become that as well.

Though Cohen implicated Trump in multiple felonies, it appears highly unlikely Trump will be indicted in this instance — at least while he is still in office.

Here's the full timeline of events in the Cohen investigation: