Rick Gates—the former right-hand man of Paul Manafort and key witness in Special Counsel Robert Mueller’s Russia probe—was sentenced to three years of probation, 45 days in jail, and 300 hours of community service on Tuesday morning in federal court in Washington.

“I believe he has in a very real way accepted responsibility for his actions,” Judge Amy Berman Jackson said in the courtroom. “He’s been at this long enough and under such onerous circumstances that one can believe in the transformation.”

He was also ordered to pay a $20,000 fine.

The lobbyist pleaded guilty in February 2018 to lying to the FBI and conspiring to hide tens of millions of dollars earned from work he and Manafort had carried out for Ukraine.

Ahead of his sentence, federal prosecutors said they wouldn’t oppose his request for no prison time because of his “extraordinary assistance” in the special counsel investigation. Gates’s original plea deal called for a possible five- or six-year prison term.

“Under exceedingly difficult circumstances and under intense public scrutiny, Gates has worked earnestly to provide the government with everything it has asked of him and has fulfilled all obligations under his plea agreement,” Assistant U.S. Attorney Molly Gaston wrote this month. He has also agreed to continue cooperating with the government after the sentencing.

Gates delivered a very short statement to the judge before the sentencing Tuesday, and asked for probation. “I accept complete responsibility for my actions,” he said, adding “I hope and pray that you will grant that to me.”

Gates testified in two trials that originated with Mueller’s inquiry: the case against Manafort, Trump’s former campaign chairman who is now serving a prison term of more than seven years for fraud; and Roger Stone, who is awaiting sentencing on a conviction of lying to Congress.

Gates’ decision to turn against Paul Manafort, his former boss and mentor, wasn’t easy and produced some of the most dramatic and emotionally charged testimony in the Manafort trial. Gates was charged with lobbying violations and tax and bank fraud alongside his boss, but chose to cooperate with the Special Counsel’s Office rather than fight the charges. Under cross examination in Manafort’s Virginia tax and bank fraud trial, Gates stared at his former mentor under cross examination and explained his decision. “Mr. Manafort had the same path. I’m here,” he said, as his voice shook. “I am trying to change. I am taking responsibility.”

Since his decision to flip on Trump world, Gates proved to be among the most valuable witnesses in the special counsel’s Russia investigation. His testimony against Manafort helped convince a Virginia jury that the former Trump campaign chairman had skipped out on millions of dollars in taxes on money he earned from political consulting work for Ukraine’s ousted pro-Russian political party and lied on real-estate loan applications. Gates detailed a sprawling network of offshore bank accounts set up by Manafort to hide his money and support a lavish lifestyle.

FBI interview notes obtained by BuzzFeed through the Freedom of Information Act show that Gates also walked prosecutors through the Trump campaign’s reaction to WikiLeaks publication of hacked DNC emails and its attempts to gain inside information about further leaks.

He told the special counsel about how Manafort had instructed him to periodically contact one person—the name is redacted in FBI documents—and ask for news on when a new release of hacked Democratic emails would be published. In addition to the hacked Clinton and DNC emails, Gates also detailed the Trump campaign’s long-running quest to obtain 30,000 emails deleted by Clinton from her private server while she served as secretary of state.

Gates also testified in the November trial of Roger Stone on charges that the former Trump political adviser had lied to Congress about his interactions with WikiLeaks surrounding the leak of Democratic campaign materials. Gates told a Florida jury that Stone had suggested as early as April 2016 that the DNC had been hacked and that in a July 2016 phone call with Trump, Stone “indicated more information would be coming” from the group.

As Gates’ sentencing hearing ended Tuesday, Judge Jackson showed a flash of compassion and admiration for the defendant. Jackson said she was “100 percent certain that this criminal justice system is not going to see you again” and asked him to “convey my concern to your wife,” who was recently diagnosed with breast cancer.