A federal judge has ruled that the campaign finance law banning corporations from making contributions to federal candidates is unconstitutional, saying that a recent Supreme Court decision gives companies the same right to donate as individual citizens enjoy.

In a ruling issued late Thursday, U.S. District Judge James Cacheris tossed out part of an indictment against two people charged with illegally reimbursing donors to Hillary Clinton’s 2006 Senate and 2008 presidential campaigns.