The head of non-profit that has sought to limit the influence of money in politics praised a federal judge’s decision on Tuesday to uphold a ban on campaign donations by contractors.

Fred Wertheimer, the president of Democracy 21, said that a decision against the ban “could have undermined the constitutional rationale for the ban on corporate contributions to federal candidates.”

Democracy 21, alongside other public interest organizations, had filed an amicus backing the Federal Election Commission and the law.

In justifying his decision, Chief Judge Merrick Garland, a federal appellate judge in Washington, cited recent pay-to-play scandals involving contractors and United States Representatives.

“In 2005, for example, Representative Randy “Duke” Cunningham pled guilty to accepting millions of dollars in bribes in exchange for influencing Defense Department contract awards,” Garland wrote. “In 2006, Representative Bob Ney similarly pled guilty to a series of quid pro quos with the lobbyist Jack Abramoff, including steering a ‘multi-million dollar’ contract for a House of Representatives infrastructure project to one of Abramoff’s clients.” The pair of lawmakers are both Republicans. Ney represented a congressional district in Ohio, and Cunningham’s constituents were in California.

The FEC and the ban had been challenged by a law professor–who had at one point won a $12,000 contract–and two US Agency for International Development contractors who started to work for the organization in their retirement.

The plaintiffs had argued that the anti-corruption measure violated the equal protection cause of the US Constitution since it only applied to individual contractors, and not executives from corporations that do significant business with the US government.

“Only when a regulation cannot ‘fairly be said to advance any genuinely substantial governmental interest’ because it provides only ‘ineffective or remote’ support for the asserted goals will it be deemed underinclusive,” the groups, including Democracy 21, had countered in their amicus.

Garland agreed. “We see no basis for overturning Congress’ decision about how to calibrate these different restriction,” he said, of the statutory difference between corporate executives and individual contractors.