Those donations, called "soft money," had become a mainstay of modern political campaigns, used to rally voters to the polls and to pay for sharply worded television ads.
Supporters of the new law said the donations from corporations, unions and wealthy individuals capitalized on a loophole in the existing, Watergate-era campaign money system.
The court also upheld restrictions on political ads in the weeks before an election. The television and radio ads often feature harsh attacks by one politician against another or by groups running commercials against candidates.
The ruling creates "some legal certainty for the 2004 election that did not exist before," says CBSNews.com Legal Analyst Andrew Cohen.
"At least now the candidates and political parties and contributors know what the rules are going forward and I think it will take until the 2006 election cycle for the lawyers to figure out ways around this ruling," Cohen says.
The so-called "soft money" is a catchall term for money that is not subject to existing federal caps on the amount individuals may give and which is outside the old law prohibiting corporations and labor unions from making direct campaign donations.
Federal election regulators had allowed soft money donations outside those restrictions so long as the money went to pay for get-out-the-vote activities and other party building programs run by the political parties.
Supporters of the new law, called the Bipartisan Campaign Reform Act, said that in practice, soft money was funneled to influence specific races for the House, Senate or the White House, and that donors, parties and candidates all knew it.
The court was divided on the complex issue; five of the nine justices voted to substantially uphold the soft money ban and the ad restrictions, which were the most significant features of the vast new law.
Justices John Paul Stevens, Sandra Day O'Connor, David Souter, Ruth Bader Ginsburg and Stephen Breyer signed the main opinion barring candidates for federal office, including incumbent members of Congress or an incumbent president, from raising soft money.
The majority also barred the national political parties from raising this kind of money, and said their affiliates in the individual states may not serve as conduits for soft money.
Without soft money, politicians and political parties may only take in donations that are already allowed in limited amounts, such as a private individual's small re-election donation to his or her local member of Congress.
That means no more huge checks from wealthy donors, and no contributions from the treasuries of corporations or labor unions.
The Supreme Court's 300-page ruling on the 2002 campaign finance overhaul settles legal and constitutional challenges from both the political right and the left. Although the reform effort was passed by Congress and signed into law by President Bush, many politicians and others in the business of politics were leery of it.
The law is often known as "McCain-Feingold" — named for its chief Senate sponsors, Sens. John McCain, R-Ariz., and Russ Feingold, D-Wis. McCain built his maverick 2000 presidential campaign largely around the assertion that the old system of political money laws was full of holes.
The new rules have been in force during the early stages of preparation for the 2004 elections for president and Congress. The high court ruling means those rules remain largely untouched as the political seasons heats up. The first delegate-selection contests are just weeks away, in January.
A lower court panel of federal judges had issued its own, fractured ruling on the new law earlier this year, but the Supreme Court got the last word.
The justices cut short their summer vacation to hear an extraordinary four hours of oral arguments on the issue in early September. The court's regular term began a month later.
The case marked the court's most detailed look in a generation at the complicated relationships among those who give and receive campaign cash. The case also presented a basic question about the wisdom of the government policing political give and take.
The court has given government an extensive role in the area on grounds that there is a fundamental national interest in rooting out corruption or even the appearance of it. That concern justifies limitations on the freedom of speech, the court has said.