The justices ruled 5-4, in a decision written by Chief Justice John Roberts, that limits on the total amount of money donors can give to all candidates, committees and political parties are unconstitutional. The decision frees the nation's wealthiest donors to have greater influence in federal elections.

"The government has a strong interest, no less critical to our democratic system, in combatting corruption and its appearance," Roberts wrote. "We have, however, held that this interest must be limited to a specific kind of corruption — quid pro quo corruption — in order to ensure that the government's efforts do not have the effect of restricting the First Amendment right of citizens to choose who shall govern them."

The decision in McCutcheon v. Federal Election Commission marks the latest round in the bitter national debate over the role of money in American politics. It's the most important campaign-finance ruling since the high court's 2010 Citizens United v. Federal Election Commission ruling allowed corporations and unions to spend unlimited amounts independently to influence elections.

The case pitted the First Amendment's guarantee of free speech – which the justices previously have equated with spending money in elections – against the government's interest in preventing political corruption.

"Today, the court made clear that restraints on the political speech of those whose views you don't like must fail," said Dan Backer, the lawyer who brought the case. "Free speech is the right of all Americans, and not a revocable grant from the government of the day."

The decision was a victory for the Republican National Committee and Alabama businessman Shaun McCutcheon, who challenged the $123,200 cap on contributions an individual can give to all federal candidates, parties and political action committees in a two-year election cycle.

McCutcheon's challenge did not extend to the $2,600 limit a donor can give to a federal candidate in each primary and general election or the $32,400 limit that can go to a national party committee, because of concerns about corruption that are at the root of the federal law.

Under the court's ruling, donors will have to stick to that $2,600 limit but can give to as many campaigns as they want without worrying about the previous $123,200 ceiling. The decision also could jeopardize separate contribution caps in at least a dozen states, from Arizona to Wyoming.

"While I understand some base limits on the dollar amount of single contributions, limits to the overall number of candidates, parties and committees are nothing more than unnecessary limits to First Amendment freedom," McCutcheon said in reaction to the ruling. "The Supreme Court has reaffirmed the unconstitutionality of aggregate limits."

The limits on campaign contributions had stood for nearly 40 years. The high court drew a distinction between those contributions, which it said could lead to corruption, and money spent independently in its landmark 1976 Buckley v. Valeo ruling. Independent spending was expanded in the Citizens United case to include unlimited spending by corporations and labor unions.

While four of the court's conservative justices joined the Roberts ruling, the fifth, Justice Clarence Thomas, went even further and said he would have voted to strike down Buckley.

Defenders of government limits have warned that so-called "joint fundraising committees" now will be able to funnel up to $3.6 million from one donor to any vulnerable candidates.

"With its Citizens United and McCutcheon decisions, the Supreme Court has turned our representative system of government into a sandbox for America's billionaires and millionaires to play in," said Fred Wertheimer, president of the public interest group Democracy 21. "The court's decisions have empowered a new class of American political oligarchs."

But opponents of government limits contended few if any donors or committees would bother to concoct such a system.

Nearly 1.3 million people donated more than $200 to federal candidates, party committees and PACs last year, according to an analysis by the non-partisan Center for Responsive Politics, which tracks political money. Only about 600 hit the maximum donation limit to federal candidates in the 2012 elections, the center found.

McCutcheon and his allies also argued that lifting the cumulative cap on contributions might help candidates and national parties counter the rising influence of new "super PACs." Those entities, ushered in partly by Citizens United and a separate lower court decision in 2010, can raise and spend unlimited amounts of money independent of particular candidates.