For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

A federal judge on Wednesday sentenced Michael Cohen, President Donald Trump’s former personal lawyer, to 36 months in prison.

Cohen’s cooperation with prosecutors “does not wipe the slate clean,” US District Court Judge William Pauley said Wednesday before sentencing Cohen, according to reporters present. “As a lawyer, Mr. Cohen should have known better,” Pauley said. He also ordered Cohen to pay about $2 million in fines, forfeitures, and restitution.

In remarks to the court earlier, Cohen expressed contrition and responded directly to Trump’s attacks on him.

“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 of America,” Cohen said. Cohen accused Trump of trying to influence the proceeding and noted that Trump called him a rat and a weak person. Cohen said his real “weakness was a blind loyalty to Donald Trump.”

“Time and time again, I felt it was my duty to cover up his dirty deeds” Cohen said.

Cohen has shared information on his work for Trump with special counsel Robert Mueller and with the office of the US Attorney for the Southern District of New York. But those two offices had different views on how helpful Cohen has been. The US attorney’s office had said Cohen should be sentenced to substantial prison time, arguing that Cohen “repeatedly declined to provide full information” to prosecutors and to the special counsel “about the scope of any additional criminal conduct in which he may have engaged or had knowledge.” Mueller’s team, however, had said Cohen went “to significant lengths to assist” its investigation and that he provided “credible” information. Mueller didn’t offer a specific recommendation on Cohen’s sentencing.

Both prosecutors’ offices offered major new revelations in memos outlining information offered by Cohen. Southern District prosecutors said that “at the direction of” Trump prior to the 2016 election, Cohen had paid hush money to two women who claimed they’d had sexual relationships with the future president. This means federal prosecutors believe Trump told Cohen to break the law. In August, Cohen pleaded guilty to violating campaign finance laws with those payments. He has also pleaded guilty to tax evasion and bank fraud. The sentencing memo also said Cohen shared information on the role of Trump’s company in the payments, another potential legal problem for the president.

Mueller’s team said Cohen admitted he kept Trump up to speed on his aggressive efforts to win Kremlin support for Trump’s company’s effort to build a Trump Tower in Moscow. Mueller’s memo indicated that the Kremlin used the prospect of help with the tower to try to build ties with Trump. Cohen’s efforts to seal the Moscow deal “came at a time of sustained efforts by the Russian government to interfere with the US presidential election,” Mueller said.

Cohen pleaded guilty last month to lying to Congress about the proposed Moscow Trump Tower project in an effort to cover up the fact that Trump had ongoing business with Russia during the 2016 presidential election. Trump falsely claimed during the campaign that he did not have business interests in Russia.

The Mueller memo also noted that Cohen shared with investigators useful information about “discrete Russia-related matters” that Cohen had gleaned by way of regular conversations with Trump Organization executives during the election.