Michael Cohen, US president Donald Trump's personal lawyer, was sentenced to a total of three years in prison on Wednesday for illegal hush payments to two women during the 2016 presidential election.
Cohen was also sentenced to two months for lying to US congress about a proposed Trump Tower project in Russia.
US District Judge William Pauley said 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 Mr Trump's presidential campaign.
Both sentences will run simultaneously.
The judge rejected arguments by Cohen's lawyers that he should be spared jail time because he co-operated in multiple federal investigations involving Trump.
At his sentencing, Cohen said his "blind loyalty" to Trump led him to "cover up his dirty deeds".
Cohen said at his sentencing 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 pleaded guilty to the campaign finance charge in August and to making false statements in November.
The judge set March 6 the date which Cohen must present himself for prison.
Cohen, 52, had walked into court on Wednesday morning with his wife, son and daughter, amid a crowd of photographers and reporters.
Federal prosecutors in New York charged that Cohen, just before the November 2016 election, paid adult film actress Stormy Daniels $130,000 and helped arrange a $150,000 payment to former Playboy model Karen McDougal so the women would keep quiet about their past relationships with Mr Trump. Trump denies having the affairs.
Prosecutors have said the payments violated campaign finance laws. Cohen told prosecutors the payments were directed by Mr Trump, implicating the president in a possible campaign finance law violation.
Federal law requires that the contribution of "anything of value" to a campaign must be disclosed, and an individual donation cannot exceed $2,700.
Cohen faced sentencing on a separate charge of lying to Congress brought by Special Counsel Robert Mueller, who is investigating Russia's role in the 2016 election and possible coordination between Trump's campaign and Moscow. Cohenpleaded guilty to that charge last month.
"He came forward to offer evidence against the most powerful person in the country," one of Cohen's lawyers, Guy Petrillo, told the court on Wednesday, arguing for leniency. Cohen cooperated knowing "the president might shut down" Mueller's investigation, Petrillo said.