US President Donald Trump’s former lawyer Michael Cohen has been sentenced to three years in prison for hush money payments to two women during the 2016 election campaign.

Cohen was also sentenced to two months for lying to the US Congress about a proposed Trump Tower project in Russia.

He pleaded guilty to the campaign finance charge in August and to making false statements in November.

The two terms will run simultaneously. The judge set 6 March for Cohen's voluntary surrender.

The 52-year-old had walked into court this morning with his wife, son and daughter, amid a crowd of photographers and reporters.

Michael Cohen arrives at court

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, who is married.

Mr 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 delivered a blistering attack on his former boss as he was sentenced.

"It was my duty to cover up his dirty deeds," he said as he pleaded for leniency before US District Judge William H Pauley III.

"It was my own weakness and a blind loyalty to this man that led me to choose a path of darkness over light."

Cohen said he was taking responsibility for his crimes "including those implicating the President of the United States of America".

Mr Trump this week sought to minimise the importance of the payments, saying they were a "simple private transaction" and that they were "wrongly" being called campaign contributions.

Cohen also faced sentencing on a separate charge of lying to Congress brought by Special Counsel Robert Mueller.

Mr Mueller is investigating Russia's role in the 2016 election and possible coordination between Mr Trump's campaign and Moscow.

Cohen pleaded guilty to that charge last month.

"He came forward to offer evidence against the most powerful person in the country," one of his lawyers, Guy Petrillo, told the court in arguing for leniency.

Cohen cooperated knowing "the president might shut down" Mr Mueller's investigation, Mr Petrillo said.

"While Mr Cohen pledges to help in further investigations that is not something the court can consider now," Judge Pauley said.

As part of the sentence, the judge ordered Cohen to forfeit $500,000 and pay restitution of nearly $1.4 million for the campaign finance law violations.

Mr Trump has denied any collusion with Russia and has accused Mr Mueller's team of pressuring his former aides to lie about him, his campaign and his business dealings.

Russia has denied US allegations of interfering in the election to help Mr Trump.