In 2010, Minnesota Republican Chip Cravaack benefitted from last-minute six-figure spending by independent nonprofit groups, fueling his long-shot victory over incumbent Rep. James L. Oberstar (D), who scrambled in vain to save a seat he had held for 36 years.

This year, independent spending in Cravaack’s northern Minnesota district totaled more than $8.7 million for both sides, overwhelming what the candidates themselves raised. Political ads jammed airwaves in Duluth and the smaller towns of the Mesabi Iron Range. But unlike the last election, the late spending tilted toward the Democrat, Richard M. Nolan, helping him win the hotly contested race.

The drama in northern Minnesota was mirrored in dozens of races across the country in the final days of the campaign. Much of the money came from anonymous donors. Republican-leaning groups generally outspent Democratic groups, but not by much as Democrats had feared early in the election cycle.

American Action Network, a GOP-oriented group led by former Sen. Norm Coleman (R-Minn.), spent $1.7 million this fall on television ads against Nolan, a former congressman seeking a return to the House. A week ago, Nolan got help from the House Majority PAC, which launched a new round of attack ads, part of a $1.4 million expenditure the Democratic-allied super PAC made on behalf of Nolan.

The executive director of the House Majority PAC, Alixandria Lapp, had been watching races like this one closely, trying to make sure viable Democratic candidates did not suffer a repeat of the 2010 onslaught from groups like American Action Network and Crossroads GPS. In 2010, she estimates that Republican candidates received three times as much outside money as Democrats.

“This year things are better,” she said in a recent interview. “We are outspent one and a half to one.”

Lapp and her allies are still stunned at times by the Republican money advantage.

More than $1.7 million poured into an Illinois congressional district in just one day last week to help Rep. Joe Walsh, a first-term Republican facing a tough race in a redrawn district against Democrat Tammy Duckworth.

The money was insufficient to save Walsh, who lost to Duckworth by nearly 10 points. The source of the funds remains a mystery. Records show that it came from FreedomWorks for America, a conservative super PAC, but the exact source is unknown. During October, FreedomWorks received the largest corporate contribution reported to any group this election season: $5.3 million from Specialty Group Inc., a private company that had been formed just a few weeks previously in Tennessee.

An influential super PAC linked to House Speaker John A. Boehner (R-Ohio), the Congressional Leadership Fund, spent heavily in the final week of the campaign thanks in part to a $2.5 million donation from Chevron. That was the largest contribution this cycle from a publicly traded company. The group spent $3.1 million to help Rep. Jim Renacci (R-Ohio) defeat Rep. Betty Sutton (D) in the state’s redrawn 13th Congressional District, where outside groups spent close to $10 million.

An analysis by the Center for Responsive Politics and the Center for Public Integrity found that 11 percent of the $660 million raised by all super PACs through mid-October had come from corporate treasuries — mostly privately held companies or limited partnerships. Unions also spent heavily: The public employees union AFSCME had a political budget in excess of $100 million.

Direct corporate spending in campaigns had been prohibited since the era of Teddy Roosevelt until a 2010 Supreme Court decision, Citizens United v. Federal Election Commission. But the donors for much of the big money that flowed into the 2012 election were not disclosed, and those that were disclosed were largely wealthy individuals and unions. Corporations that gave to groups that disclosed their donors tended to be privately held firms such as Specialty.

Campaign finance lawyer Brett Kappel, who represents activists in both parties at the Arent Fox law firm, says the paucity of visible brand-name corporate contributions is understandable.

“Shareholders in publicly traded companies would hold corporate executives accountable for such a large expenditure of company resources, especially if the company failed to achieve its political objectives,” he said.