In the waning days of Montana’s hotly contested Senate race, a small outfit called Montana Hunters and Anglers, launched by liberal activists, tried something drastic.

It didn’t buy ads supporting the incumbent Democrat, Sen. Jon Tester. Instead, it put up radio and TV commercials that urged voters to choose the third-party candidate, libertarian Dan Cox, describing Cox as the “real conservative” or the “true conservative.”

Where did the group’s money come from? Nobody knows.

The pro-Cox ads were part of a national pattern in which groups that did not disclose their donors, including social welfare nonprofits and trade associations, played a larger role than ever before in trying to sway U.S. elections. Throughout the 2012 election, ProPublica has focused on the growing importance of this so-called dark money in national and local races.

Such spending played a greater role in the Montana Senate race than almost any other. With control of the U.S. Senate potentially at stake, candidates, parties and independent groups spent more than $51 million on this contest, all to win over fewer than 500,000 voters. That’s twice as much as was spent when Tester was elected in 2006.