(CNN) President Donald Trump's former lawyer, Michael Cohen, was sentenced to three years in prison Wednesday for crimes that included arranging payments during the 2016 election to silence women who claimed affairs with Trump after the President's onetime "fixer" attributed his offenses to "my duty to cover up his dirty deeds."

Cohen's sentence is the longest imposed to date on anyone connected to the President or stemming from special counsel Robert Mueller's investigation into Russian interference in the election -- a probe that has consumed much of Trump's presidency and is poised to continue into the coming year.

Before a packed Manhattan courtroom, Cohen, who once pledged to "take a bullet" for Trump, professed to accept blame for his actions.

"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," he said.

But Cohen also articulated a fateful trajectory that took him from the day he accepted a job with a "famous real-estate mogul whose business acumen I truly admired" to a period of "personal and mental incarceration" and finally to an actual prison sentence resulting from "blind loyalty to this man that led me to choose a path of darkness over light."

"Recently, the President tweeted a statement calling me 'weak,' and he was correct, but for a much different reason than he was implying," Cohen said. "It was because time and time again I felt it was my duty to cover up his dirty deeds rather than to listen to my own inner voice and my moral compass."

Trump, who for months has lashed out at Cohen for implicating him in the campaign finance crimes and speaking to prosecutors, declined to respond to questions from reporters at the White House following the sentencing.

Trump's attorney, Rudy Giuliani, disputed the notion that Cohen was ever faithful to his former boss. "It's not true he was blindly loyal to President," Giuliani said. "He was aggressively disloyal."

'Veritable smorgasbord of fraudulent conduct'

Cohen's sentence resulted from two cases. In August, he pleaded guilty in a Manhattan US attorney's case to two campaign-finance violations tied to payments he made or orchestrated to women during the campaign -- adult-film star Stormy Daniels and former Playboy model Karen McDougal -- to stay silent about alleged sexual encounters with Trump.

Prosecutors have said that in executing the payments, Cohen "acted in coordination with and at the direction of" Trump, who has denied having the affairs with the two women. Cohen also pleaded guilty to five counts of tax fraud and one count of making false statements to a bank.

In late November, Cohen was charged in a separate case from the special counsel's office with one count of lying to Congress about how long discussions involving a proposed Trump Tower in Moscow had extended into the 2016 campaign.

On Wednesday, US District Judge William Pauley III sentenced Cohen to 36 months in prison for the case from New York federal prosecutors and two months for the special counsel's matter; the sentences will be served concurrently.

"Mr. Cohen pled guilty to a veritable smorgasbord of fraudulent conduct," Pauley told the courtroom. "Each of the crimes involved deception and each appears to have been motivated by personal greed and ambition."

While the judge agreed with the special counsel's office that Cohen should receive some leniency for his efforts to provide information that was valuable to its investigation, Pauley criticized Cohen for his crimes, his lies and his willingness to commit both in his capacity as an attorney.

"Our democratic institutions depend on the honesty of our citizenry in dealing with the government," Pauley said.

Pauley also ordered Cohen to pay $1.39 million in restitution, $500,000 in forfeiture and $100,000 in fines. He must report to prison on March 6.

As he addressed the court, Cohen was visibly emotional, pausing several times to collect himself. His wife, son and daughter, who appeared in court alongside his elderly parents and in-laws, sobbed through much of the remarks. His father, in a wheelchair, observed the events with his hands clasped at his mouth.

'Eroded faith in the electoral process'

The cases against Cohen have emerged as one of the most significant threats to date for Trump. Both Cohen and prosecutors pinned Cohen's crimes on Trump's orders, and the judge on Wednesday said Cohen's election violations "implicate a far more insidious harm" to democracy. Cohen's attorney compared the special counsel probe to the inquiry that ultimately toppled President Richard Nixon.

In seeking a lighter sentence for his client, Cohen's attorney, Guy Petrillo, said that the special counsel's office "investigation is of utmost national significance, no less than seen 40-plus years ago in the days of Watergate."

Petrillo also sought to convey the stakes of Cohen's efforts to aid investigators, saying that when Cohen attempted to help the special counsel, "he knew the President might shut down the investigation."

"He came forward to offer evidence against the most powerful person in our country," Petrillo said.

But Assistant US Attorney Nicholas Roos told the courtroom that Cohen's campaign finance crimes carried a "tremendous societal cost."

"Together, these crimes implicate core defining parts of our democracy: Government funded by the people, free and transparent elections," Roos said. "And in committing these crimes, Mr. Cohen has eroded faith in the electoral process and compromised the rule of law."

National Enquirer parent makes deal

Wednesday's events also introduced even further potential peril for the President.

Moments after Cohen's sentencing, the Manhattan US Attorney's office revealed that in September it had reached an agreement with American Media Inc., the parent company of the National Enquirer tabloid, in which it will not prosecute the company in exchange for its admission that it participated in the $150,000 payment Cohen arranged to silence McDougal "in concert with a candidate's presidential campaign."

Prosecutors noted that the agreement also requires the company -- whose chairman and CEO, longtime Trump ally David Pecker, received immunity from prosecutors in their investigation of Cohen -- to "provide cooperation in the future."

Cooperation with Mueller

Though the Manhattan US Attorney's office had described Cohen in court filings as minimally helpful to its investigations, the special counsel's office again stressed to the court on Wednesday that Cohen had provided "helpful" and "valuable" information to its investigation.

"Mr. Cohen has sought to tell us the truth," special counsel prosecutor Jeannie Rhee told the judge, after acknowledging that Cohen initially lied to her office. "He has provided our office with credible and reliable information about core Russia-related issues under investigation and within the purview of the special counsel's office."

The special counsel said in a filing last week that Cohen had told investigators about a set of efforts to communicate between Trump, his associates and the Russian government during the 2016 campaign.

For his part, Cohen vowed on Wednesday that he could continue to try to assist investigators, and Cohen adviser Lanny Davis said in a statement after the sentencing that "after Mr. Mueller completes his investigation and issues his final report, I look forward to assisting Michael to state publicly all he knows about Mr. Trump."

In court, Cohen vowed that what he described as his efforts to cooperate against the President wouldn't be in vain. "Despite being vilified by the press and inundated with character assassinations over the past almost two years, I still stand today, and I am committed to proving my integrity and ensuring that history will not remember me as the villain of his story."

Several senior Trump officials have pleaded guilty in the special counsel's investigation, including Trump's former national security adviser Michael Flynn, former campaign chairman Paul Manafort and former campaign adviser George Papadopoulos, but none were as close to the President for as long as Cohen.