WASHINGTON — Rick Gates, the former deputy campaign manager for Donald Trump and ex-business-partner of Paul Manafort, was sentenced Tuesday to 45 days in jail and three years' probation.

"I greatly regret the mistakes I've made, and I have worked hard to honor my commitment to make amends," he told the court. His lawyers urged Federal District Court Judge Amy Berman Jackson to impose a lenient sentence of probation only, with no time behind bars, because of Gates' extensive cooperation with federal prosecutors. The government did not oppose that request.

But the judge sentenced him to jail time and said he could serve it intermittently, on weekends. Under federal guidelines, he could have faced a sentence of nearly five years in prison. She also ordered him to pay a $20,000 fine, even though his lawyers said he is essentially broke, in addition to 300 hours of community service.

"Those are facts," Jackson said, reading through his charges. "Those are not alternative facts."

"He was drawn in and he benefited personally, too, and eventually joined Manafort in living as if the rules do not apply to him," she added.

Download the NBC News app for breaking news and politics

Although Gates made attempts to atone for his mistakes through his cooperation, Jackson said she hasn't been able to shake the feeling that some level of incarceration was necessary. But she closed by saying she was "100 percent certain that the criminal justice system will not see" Gates again.

Gates and Manafort, who served as President Donald Trump's campaign chairman, were the first former Trump campaign officials to be charged by former special counsel Robert Mueller's prosecutors, accused of evading taxes and violating federal lobbying laws by concealing millions of dollars they earned representing pro-Russian politicians in Ukraine. Manafort was convicted after a jury trial in Alexandria, Virginia, and pleaded guilty to related charges in a separate case in Washington. He is serving a seven-and-a-half-year sentence in federal prison.

"I wish to express to this court that I accept complete responsibility for my actions that have led me here," Gates said before his sentencing. "I greatly regret the mistakes I've made and I've worked hard to honor my commitment to make amends."

Instead of fighting the charges as Manafort did, Gates pleaded guilty. Federal prosecutor Molly Gaston disclosed during Tuesday's sentencing hearing that Manafort tried to talk him out of that decision. "Mr. Manafort assured him that there would be a defense fund if Mr. Gates decided not to plead."

As part of his guilty plea, Gates agreed to cooperate with Mueller's team and the U.S. Attorney's offices in Washington and Alexandria after the special counsel's office was disbanded. His lawyers and federal prosecutors said he did everything asked of him.

Rick Gates, standing with his lawyer Tom Green, is sentenced by judge Amy Berman Jackson. Art Lien

Gates said he spent more than 500 hours with government lawyers and federal agents. Gates testified as a prosecution witness during Manafort's trial and in the trials of longtime Trump friend Roger Stone and Washington lawyer Greg Craig, who did legal work for Manafort.

Gates provided "extraordinary assistance," federal prosecutors said in a memo informing the judge that they would not oppose his request for probation. "Gates has worked earnestly to provide the government with everything it has asked of him."

A longtime business consultant, Gates joined Manafort's lobbying firm in 2006 and worked closely with him for years. Their friendship made the Gates testimony against his former boss at Manafort's trial all the more dramatic.

Jackson, the judge in the case, noted Tuesday that Manafort would not have been as successful in his crimes if it were not for Gates.

Gates signed on to the Trump campaign in March 2016 as deputy campaign manager and later served as deputy chairman of the Trump inaugural. He and Manafort were indicted in October 2017. Gates pleaded guilty the following February.

His lawyer, Thomas Green, also urged Judge Jackson not to impose a fine, explaining that Gates has been unemployed since his indictment and has depleted his savings and investment accounts. His lawyers are representing him at no charge, Green said.

Gates has tried to turn his life around and has been "meeting with a psychologist to help him with issues relating to emotional well-being and life choices," his lawyers said.

All defendants charged by the Mueller team will have now been sentenced except Michael Flynn, who was briefly Trump's national security adviser, and Roger Stone. Flynn will be sentenced Jan. 28. Stone's sentencing is set for Feb. 6.

Pete Williams and Daniel Barnes reported from Washington, and Allan Smith from New York.