WASHINGTON — Rick Gates, the former Trump campaign aide who helped bring down two former advisers to President Trump, was sentenced on Tuesday to 45 days in jail and a $20,000 fine for his part in a criminal financial scheme and for lying to federal investigators.

Despite his extraordinary cooperation with the government, Mr. Gates’s crimes were simply too serious to grant his request for probation, said Judge Amy Berman Jackson of the United States District Court for the District of Columbia. She said he can serve his time behind bars intermittently, including on weekends, during a three-year term of probation.

The judge, who has overseen the bulk of criminal cases that arose from the special counsel’s investigation of Russia’s interference in the 2016 election, said that she struggled with her decision because Mr. Gates had done much to merit leniency.

He provided evidence against powerful people, including Mr. Trump’s onetime campaign chairman, Paul Manafort, and Roger J. Stone Jr., Mr. Trump’s longtime friend and former campaign adviser. Mr. Gates withstood pressure from Mr. Manafort not to cooperate with prosecutors, including offers of financial assistance. He also endured what Judge Jackson called “humiliating” cross-examination during three separate criminal trials.