MIDDLETON, Wis. — The irony was lost on no one. Senator Russ Feingold, a liberal with a fierce streak of independence who crusaded against the influence of money in politics, was toppled Tuesday in a campaign awash in the kind of unregulated cash he had struggled to keep out of the system.

And in a poignant twist, the loss came, in part, because independents flocked to his opponent, despite Mr. Feingold’s record of one maverick vote after another.

He was the sole senator to oppose the USA Patriot Act after the terrorist attacks on Sept. 11, 2001. He also broke with President Obama on several occasions, opposing the expansion of the war in Afghanistan, the bailing out of financial institutions in 2008 and the regulation of Wall Street this year, saying the restrictions did not go far enough.

Most prominently, he battled his colleagues to overhaul the campaign finance system; the resulting law, passed in 2002, bore his name and that of Senator John McCain, the Arizona Republican (who won re-election Tuesday).