Corporations would be permitted to donate directly to political candidates for the first time in more than a century under a ruling issued late Thursday by a federal district judge in Virginia.

The ruling is almost certain to be appealed, and it isn't expected to have a big impact on the 2012 elections for president and Congress. But it is the latest in a string of court decisions that loosen restrictions on spending by companies and unions in elections.

The Virginia court decision draws from a 2010 Supreme Court ruling that allows companies to fund campaign commercials. In the ruling, known as Citizens United, the Supreme Court said corporations and unions should have the same right as individuals to pay for election ads and other electioneering.

At the time, the court didn't directly address whether corporations also have the same right as individuals to donate money directly to candidates for Congress or the White House.

In the latest decision, Judge James C. Cacheris of the Eastern District of Virginia said he was applying the high court's logic in the Citizens United case. "[F]or better or worse, Citizens United held that there is no distinction between an individual and a corporation with respect to political speech," Judge Cacheris wrote. "Thus, if an individual can make direct contributions within [campaign-finance] limits, a corporation cannot be banned from doing the same thing."