President Donald Trump’s longtime personal attorney/fixer Michael Cohen has been sentenced to 36 months in federal prison on 9 counts — six of them having nothing to do with Trump. Even so, as he pleaded for leniency, Cohen took huge swings at POTUS.

On the charge of lying to Congress about Trump’s Moscow project, Cohen has been sentenced to two months, to be served concurrently. He will begin his jail time on March 6.

Arguing for leniency in U.S. District Courthouse in Manhattan, Cohen this morning said his biggest crime was “blind loyalty” to Trump.

“Recently the President tweeted a statement calling me weak and it was correct, but for a much different reason than he was implying, ” Cohen said in an emotional courtroom scene. “It was because, time and again, I felt it was my duty to cover up his dirty deeds.”

History will not judge him to be the villain of this story, Cohen forecast, as he continued taking swings at Trump. Those swings included telling the court “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.”

Previously in Cohen’s legal storyline, Trump had been referenced as “Individual 1.”

Cohen teared up as he apologized to the country, saying, “You deserve to know the truth and lying to you was unjust.”

As Cohen wrapped up his plea, he referred to a Trump tweet calling Cohen a “rat” and “liar.”

“Not only is it improper, it creates a false sense that the President can weigh in on judicial proceedings that implicate him,” Cohen scolded.

U.S. District Judge William Pauley countered that each charge to which Cohen pled guilty is a “serious crime against the United States,” advising Cohen he cannot paint himself as a victim and a hero, having been an enthusiastic participant in Trump’s moves.

Cohen, the judge described in sentencing, “thrived on his access to wealthy and powerful people, and he became one himself.”

“Somewhere along the way, Mr. Cohen appears to have lost his moral compass,” Pauley added.

Cohen was sentenced to slightly less time than he might have received. Before the sentencing, a member of special counsel Robert Mueller’s team said Cohen had told the truth, but little more, not elaborating as to what was Cohen’s participation in Mueller’s probe of Russian election meddling. He’s likely to serve about 2.5 years.

Among the charges to which Cohen pled guilty, one alleged campaign finance violations. Earlier this year it was reported Cohen paid six-figure sums to adult film star Stormy Daniels and former Playboy model Karen McDougal. Both women claim they had a sexual relationship with Trump years before he ran for office. Trump has denied the affairs, but did acknowledge that he repaid Cohen for the $130,000 that he paid to Daniels. That after first claiming he didn’t know anything about the payments.

Cohen said he made payments so the two women would not discuss their alleged affairs with the former NBC reality-TV star in the final weeks of Trump’s campaign. Trump insists that the payments were not illegal and did not violate campaign finance laws, and were private transactions.

Late last month, Cohen also pleaded guilty to giving false information to Congress about Trump’s efforts to build a Trump Tower in Moscow.

Responding to that admission of guilt, Trump told reporters “What he is trying to do, because he is a weak person, he’s got himself a big prison sentence and he’s trying to get a lesser prison sentence by making up a story.”

“I decided not to do” the project, Trump insisted, in remarks to reporters on the White House lawn, as he prepared to go to the G20 summit in Argentina, where he was scheduled to meet with Russian ruler Vladimir Putin.

“The primary reason: I was focused on running for President,” Trump explained. But he added, “There would be nothing wrong if I did do it. I was running my business while I was campaigning. There was a good chance I would not have won, in which case I would have gone back into the business,” asking rhetorically why he should have been penalized financially while campaigning.

“There was nothing wrong if I did do it,” Trump said of Cohen’s new claims he kept Trump apprised of Trump Tower Moscow talks into summer of ’16. Simultaneously, Trump insisted Cohen “is lying to get a reduced sentence, okay?”

But, after ending that pop-up presser on the White House lawn, and leaving for G20 in Argentina, Trump tweeted he’d pulled the plug on his Putin meeting – insisting it was because of recent Russian aggression against Ukraine.