NEW YORK — President Donald Trump’s former lawyer has been sentenced to three years in prison.

U.S. District Judge William H. Pauley III said today that Michael Cohen deserved a harsh punishment for crimes including tax evasion, lying to Congress and arranging illicit payments to silence women who posed a risk to Trump’s presidential campaign.

The judge rejected arguments by Cohen’s lawyers that he should be spared prison time because he cooperated in multiple federal investigations involving Trump.

Cohen said his “blind loyalty” to Trump made him feel a duty to “cover up” the president’s “dirty deeds.”

Cohen’s crimes included evading $1.4 million in taxes and misleading Congress about his talks with Russians about a Trump skyscraper project in Moscow.

Cohen said at his sentencing Wednesday that he takes “full responsibility” for the crimes he admitted committing. But he went on to say his allegiance to Trump led him “to take a path of darkness instead of light.”

Cohen has pleaded guilty to dodging taxes, lying to Congress and violating campaign finance laws.

Cohen, who used to be the president’s self-described fixer, could get about four to five years in prison.

His lawyer is arguing for leniency, noting Cohen’s cooperation with prosecutors investigating whether Russians attempted to influence Trump’s campaign.

But a prosecutor on the case against Cohen says Cohen’s crimes showed a pattern of deceit, brazenness and greed.

A prosecutor with special counsel Robert Mueller’s office says Trump’s ex-lawyer Cohen “has provided consistent and credible information about core Russia-related issues under investigation.”