(CNN) -- Rick Gates, one of the most significant former Trump campaign advisers who flipped on President Donald Trump in the Mueller investigation, was sentenced to 45 days in jail and three years probation by a federal judge Tuesday morning.
But the judge veered from simply giving him his sentence to acknowledge the significant role he had played as a witness in the Mueller investigation.
Gates, a longtime deputy to 2016 Trump campaign chairman Paul Manafort who shared searing details about Trump's efforts in 2016 with special counsel Robert Mueller, admitted to helping Manafort conceal $75 million in foreign bank accounts from their years of Ukraine lobbying work.
The judge's words, and Gates' final moments in court, pointed to the tremendous split in recent weeks between investigators and Trump and Attorney General William Barr, who've attempted to undercut the Russia investigation. Judge Amy Berman Jackson's comments on Tuesday emphasized how "this administration" had rightfully investigated multiple contacts between Trump campaign officials and Russians, and how witnesses like Gates, under enormous political pressure, chose to share the truth.
What Gates told prosecutors about the Trump campaign and Manafort has since been corroborated by extensive documentation, the judge noted Tuesday.
Jackson also said that Gates' information prompted the Justice Department to appropriately authorize the investigation into Russian interference and the Trump campaign.
"Gates' decision to be honest about what he did know and to decline to make assumptions or guess what he didn't know," Jackson said, "is an important public service."
As part of his plea deal, Gates agreed to plead guilty to related charges of conspiracy and lying to investigators in February 2018. He also signed up to cooperate, giving Mueller's team key insights into Manafort and Trump's actions in 2016 during the height of the Russia investigations.
"I accept complete responsibility for my actions," Gates told Jackson on Tuesday. He only spoke about three sentences to the judge, asking for leniency before receiving his sentence. But the prosecutor on his case and his defense attorney emphasized just how sincere he had been in his cooperation and how much he had reformed his life since his work with Manafort.
Molly Gaston, the prosecutor, called Gates' cooperation "extraordinary." She also noted that even Manafort had pressured him not to plead guilty, telling him that a legal defense fund would continue to help them fight their charges in 2018.
"He never second guessed whether he was doing the right thing," his defense attorney, Thomas Green, told the judge. "I admire him for all of that effort."
Green also spoke about several prosecutors who had worked with the special counsel's office and came to court Tuesday, including lead Manafort prosecutors Andrew Weissmann and Greg Andres, who've since left the Justice Department.
"I'm quite certain they're here to acknowledge the genuine contributions" Gates made "to their continuing investigations," Green said.
Gates will also pay a $20,000 fine and fulfill 300 hours of community service. He will be allowed to serve his jail sentence on weekends or intermittently during his three years of probation.
Jackson made clear that the failure of Gates, and his former boss Manafort, to disclose they were lobbying on behalf of Ukrainian clients, and hiding their income from the work, was a significant wrong.
"When people don't have the facts, democracy fails to work," Jackson said. The judge said she believed that Gates was motivated by greed, and rejected one letter of support that suggested politics was a factor.
"Politics don't corrupt people, people corrupt politics," she added.
But the judge said Gates' significant cooperation was important to consider as well for the role it played in the investigation of Russian interference and the Trump campaign.
"Gates' information alone warranted, indeed demanded, further investigation" for the sake of national security and the integrity of elections, Jackson observed.
At times, political opponents are "demonized" for being on the opposite side, Jackson noted, yet Gates "was seen as being on his own side."
In the end, Gates' decision to come clean and change his life was "just the right thing to do," she said.
How Gates helped Mueller
Manafort and Stone were convicted, while Craig was acquitted by a jury.
At Stone's trial, Gates testified that he overheard a phone call between then-candidate Trump and Stone, who was pursuing details from WikiLeaks about hacked Democratic emails the organization was releasing that could help Trump. Trump told him he expected more information to come. The public revelation, kept confidential in the Mueller report until last month, has prompted House Democrats who are pursuing impeaching the President to question whether Trump lied in written answers to the special counsel. The President had written that he didn't recall discussing WikiLeaks with Stone during the campaign.
Prosecutors and Gates both had told the judge the former campaign No. 2 deserves to avoid a prison sentence, largely because of pressure on him not to speak to investigators about the President and because of the amount of time he spent helping investigations -- more than 500 hours.
Prosecutors said he would pledge to continue helping them if needed. Gates has asked for a sentence of probation and community service, so he may continue supporting his wife and four children at home in Richmond, Virginia.
Even with the prosecutors' and Gates' own requests for leniency, Jackson said Tuesday she needed to give him at least some incarceration to deter others from committing crimes and to create respect for the law.
Manafort, his longtime boss alongside whom Gates was indicted in late October 2017, is serving seven years in prison after he was convicted of financial and other crimes.