Rick Gatesa former adviser on President Donald Trump‘s 2016 campaign, was sentenced to 45 days in jail and three years probation on Tuesday after pleading guilty to charges of conspiracy and lying to federal investigators.

A federal judge also said 47-year-old Gates — a key witness in former special counsel Robert Mueller‘s Russia probe — will have to pay a $20,000 fine and complete 300 hours of community service as part of his sentence.

Gates previously served as right-hand man to Trump’s former campaign chairman Paul ManafortGates admitted to Judge Amy Berman Jackson that he and Manafort were involved in an effort to hide $75 million in foreign bank accounts tied to their longtime lobbying campaign for pro-Russia political candidates in Ukraine. A prison term lasting between 46 and 57 months had been recommended for Gates.

SLIDESHOW: TOP DEMOCRATS RUNNING FOR PRESIDENT IN 2020

“I accept complete responsibility for my actions,” Gates told Jackson.

Gates ultimately became one of Mueller’s key witnesses, as the former political consultant testified at the trials of Manafort, Roger Stone and Greg Craig, a well-known Washington attorney and another former business associate with ties to lobbying in Ukraine. Stone and Manafort were both convicted, while Craig was ultimately acquitted.

“He came across to me as extremely candid,” Jackson said of Gates, per the Times. “He doesn’t come across as some kind of prosecution puppet.”

Prosecutors and Gates both told Jackson that his financial crimes did not merit a lengthy prison sentence because he spent more than 500 hours cooperating with the FBI via interviews. Assistant U.S. Attorney Molly Gaston also noted to the judge that Gates is the primary caregiver to his four children, as his wife is severely ill.