A federal judge in Virginia has declared unconstitutional a century-old law banning political contributions from corporations, a ruling that, if upheld, could have major implications for the rules governing campaign fund-raising and spending.

But while the ruling addressed one of the biggest issues in the ideological and partisan battle over regulating campaign donations — a question likely to be taken up at some point by the Supreme Court — the circumstances of the case left unclear how much practical and legal effect it would have.

The decision, issued Thursday by Judge James C. Cacheris of Federal District Court for the Eastern District of Virginia, did not come in one of the many legal and regulatory challenges now being mounted by proponents of loosening campaign finance restrictions. Instead, it was from the criminal trial of two Virginia businessmen accused of circumventing the law to donate tens of thousands of dollars to the Senate and presidential campaigns of Hillary Rodham Clinton.

“This was definitely something that is almost incidental in terms of the case it was decided in,” said Sean Parnell, president of the Center for Competitive Politics, a group that supports efforts to ease campaign-finance regulations.