When news broke that Virginia Gov. Terry McAuliffe was under investigation by the Justice Department and that his campaign had taken $120,000 directly from a Chinese-owned business, it may have seemed like an open-and-shut case.

But federal law doesn’t preclude foreign-owned businesses from making political donations, and Virginia law doesn’t limit their size. So amazingly enough, if there was something illegal here, that wasn’t it.

Here’s what happened and why, at least by the peculiar standards of our campaign finance system, McAuliffe did nothing wrong — that we know of.

McAuliffe ran and won the governorship as a Democrat in 2013. He received $120,000 in donations — $70,000 for his campaign and $50,000 for his inaugural — from West Legend Corp., a New Jersey construction materials company controlled by Chinese billionaire Wang Wenliang.

The sheer size seems improper. Yet Virginia permits unlimited, direct contributions by both individuals and corporations to candidates for state offices — e.g., governor, the state senate and general assembly.

That’s why West Legend, with its $120,000 contribution, was only the 57th biggest donor to McAuliffe during his two campaigns for governor. (He also ran and lost in the Democratic primary in 2009.) Coming in first at $6.7 million was the Democratic Governors Association PAC. Next was Independence USA, a Super PAC funded by Michael Bloomberg to promote gun control, with $1.7 million. Notable individual donors include longtime Clinton supporter Haim Saban ($572,636), Facebook’s first president Sean Parker ($500,000), BET founder Robert Johnson ($495,000), and Bill Clinton ($110,000). Among the other corporations that gave to McAuliffe are tobacco giant Altria ($243,667), Hospital Corporation of America ($177,500), and Genentech ($150,000). All this helped McAuliffe outraise his 2013 Republican opponent nearly 2-to-1.

Most Americans might guess this has something to do with the 2010 Citizens United decision by the Supreme Court, but in fact it doesn’t. Citizens United and related cases declared it unconstitutional for the federal government and states to limit corporate and individual spending in ways formally “uncoordinated” with campaigns. The decisions did not affect federal restrictions on direct donations to campaigns in federal elections: Individuals can still only give $2,700 per election to any candidate for federal office, and corporations still cannot donate to federal candidates directly.

But states have always been free to make their own laws about direct contributions to candidates in state races, and they do so in a huge variety of ways. Kentucky limits donations by individuals to $1,000 per state candidate per election and prohibits donations by corporations. Indiana allows unlimited donations by individuals, but corporations can only give up to $5,000 for statewide races.

Virginia is one of six states that allow direct, unlimited contributions by anyone. (The others are Alabama, Missouri, Nebraska, Oregon, and Utah.) In other words, for Virginia state elections, the fact that Citizens United made it possible for corporations to spend an unlimited amount in ways uncoordinated with candidates was largely irrelevant. Corporations could already just cut checks directly to candidates for as much as they wanted.

Then there’s the issue of West Legend’s foreign ownership.

According to U.S. law, it’s illegal for a “foreign national” — meaning a foreign individual, corporation, or government — to make any donation in connection with a federal, state, or local election.

However, the legal definition of a foreign national specifically excludes any “corporation … organized under or created by the laws of the United States.”

So, since West Legend Corp. is incorporated in the U.S., it’s not a foreign national and can take part in U.S. elections like any other American company.

Both Wang’s and McAuliffe’s representatives have been eager to assert that Wang is a permanent resident of the U.S. and therefore legally permitted to participate in U.S. elections under the same rules as American citizens. But in fact, as far as the status of West Legend goes, that’s irrelevant; the company would be a U.S. national whether or not Wang is a permanent resident. (If you find this bizarre and unacceptable, Ellen Weintraub, one of the six members of the Federal Election Commission, agrees.) West Legend did not respond to questions about its ownership structure.

Where Wang’s permanent residency would be legally significant is under Federal Election Commission regulations that forbid any foreign national from engaging in the “decision-making process of any person, such as a corporation,” regarding political expenditures. As long as everyone participating was a U.S. citizen or permanent resident, then Wang and McAuliffe are legally in the clear. FEC advisory opinions also suggest that to be legal, the $120,000 donation must have been generated by business activity in the U.S.

So you can say the way politicians harvest money from donors is appalling. You can say it’s particularly gruesome in Virginia. But as of now, if there’s evidence that McAuliffe broke any of the rules of an ugly game, we haven’t seen it yet.

Related: