NEW YORK -- Michael Cohen, U.S. President Donald Trump's one-time fixer, was sentenced Wednesday to three years in prison for crimes that included arranging the payment of hush money to conceal his boss' alleged sexual affairs, telling a judge that he agreed time and again to cover up Trump's "dirty deeds" out of "blind loyalty."

Separately, the legal and political peril surrounding Trump appeared to deepen when prosecutors announced that another major piece of the investigation had fallen into place: The parent company of the National Enquirer acknowledged dispensing some of the hush money in concert with the Trump campaign to fend off a scandal that could have damaged his bid for the White House.

Cohen, 52, shook his head slightly and closed his eyes as a judge pronounced his sentence for evading $1.4 million in taxes, lying about Trump's business dealings in Russia and violating campaign-finance laws in buying the silence of porn star Stormy Daniels and Playboy centerfold Karen McDougal, who claimed they had sex with the candidate. Cohen and federal prosecutors have said the payments were made at Trump's direction to influence the election.

"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," said a choked-up Cohen, a lawyer who once boasted he would "take a bullet" for Trump. "My weakness can be characterized as a blind loyalty to Donald Trump, and I was weak for not having the strength to question and to refuse his demands."

The twin developments represented a double dose of bad news for the president, who ignored reporters' questions about Cohen during an appearance at the White House later in the day.

Cohen is the first and, so far, only member of Trump's circle during two years of investigations to go into open court and implicate him in a crime, though whether a president can be prosecuted under the Constitution is an open question.

In a possible sign of further trouble for the president, Cohen said he will continue co-operating with prosecutors, and one of his legal advisers said Cohen is also prepared to tell "all he knows" to Congress if asked.

At the sentencing, defence attorney Guy Petrillo pleaded for leniency for Cohen, saying, "He came forward to offer evidence against the most powerful person in our country."

U.S. District Judge William H. Pauley III said the defendant deserved modest credit, but his assistance "does not wipe the slate clean."

"Somewhere along the way Mr. Cohen appears to have lost his moral compass," the judge said.

The judge also ordered Cohen to pay $1.39 million in restitution to the IRS, forfeit $500,000 and pay $100,000 in fines. He was ordered to report to prison March 6 and left court without comment.

The prison sentence was in line with what prosecutors asked for. Sentencing guidelines called for around four to five years, and the government asked in court papers that Cohen be given only a slight break.

The sentence was the culmination of a spectacular rise and fast fall of a lawyer who attached himself to the fortunes of his biggest client, helped him get elected president, then turned on him, co-operating with two interconnected investigations: one run by federal prosecutors in New York, the other by special counsel Robert Mueller, who is looking into Russia's efforts to influence the presidential election.

Beyond the guilty pleas, it is unclear what Cohen has told prosecutors or what he has left to say, though one of Mueller's prosecutors, Jeannie Rhee, said in court that Cohen has "provided consistent and credible information about core Russia-related issues under investigation." Legal experts said Cohen could get his sentence reduced by co-operating.

In the hush-money case, Cohen arranged for American Media Inc., parent of the pro-Trump National Enquirer, to pay $150,000 to McDougal to buy and bury her story, according to prosecutors. Cohen also said he paid $130,000 to Daniels and was reimbursed by Trump's business empire. Both payments were made during the heat of the 2016 campaign.

Prosecutors said those secret payouts were not reported as campaign contributions and violated the ban on corporate contributions and the $2,700 limit on donations by an individual.

Shortly after Cohen's sentencing, federal authorities announced a deal not to prosecute AMI. As part of the deal, prosecutors said, AMI admitted making the payment to McDougal "in concert" with the Trump campaign to protect him from a story that could have hurt his candidacy. An AMI representative had no comment.

Trump has denied any sexual relationship with the women and argued on Twitter earlier this week that the payments to the women were "a simple private transaction," not a campaign contribution. And if it was a prohibited contribution, Trump said, Cohen is the one who should be held responsible.

"Lawyer's liability if he made a mistake, not me," Trump wrote, adding, "Cohen just trying to get his sentence reduced. WITCH HUNT!"

Trump's legal culpability could hinge on whether the payments to the women were, in fact, made at his direction, and whether he intended them to influence the election.

In a case with some parallels, prosecutors in 2011 charged former Sen. John Edwards with funneling nearly $1 million in under-the-table campaign contributions to hide his pregnant lover during his 2008 run for president. Edwards had argued that the payments were a personal matter -- intended to keep things secret from his wife -- and had nothing to do with the election.

A jury acquitted the Democrat on one charge and deadlocked on other counts. He wasn't retried.

In addition to pleading guilty to the campaign-finance and tax charges, Cohen admitted lying to Congress to conceal that he was negotiating a proposal to build a Trump skyscraper in Moscow well into the presidential campaign season. He said he lied out of devotion to Trump, who insisted during the campaign that he had no business ties whatsoever to Russia.

Daniels' lawyer, Michael Avenatti, who played a major role in exposing the hush-money discussions, said outside the courthouse: "We will not stop until the truth is known relating to the conduct of Donald Trump."

But he added: "Let me be clear, Michael Cohen is neither a hero nor a patriot" and "deserves every day of the 36-month sentence he will serve."

------

Associated Press writer Jim Mustian contributed to this report.