WASHINGTON (CNN) -- The Supreme Court on Monday swept aside part of a campaign finance law dealing with "issue ads."

The ruling could mean a greater role in the 2008 presidential campaign for advocacy groups, corporations and labor unions, which air the commercials in the weeks before voters go to the polls.

In a 5-4 ruling upholding an appeals court decision, the high court's majority concluded the specific guidelines for the issue ads -- aired mainly on television -- were overly restrictive.

Under the current law, such ads can be banned 60 days before a general election, and 30 days before a primary. That provision was a key part of the 2002 McCain-Feingold bill setting strict limits on political spending and the message behind it.

"When it comes to defining what speech qualifies as the functional equivalent of express advocacy subject to such a ban -- the issue we do have to decide -- we give the benefit of the doubt to speech, not censorship," Chief Justice John Roberts wrote for the majority. (Read the opinion)

The decision was a defeat for the Bush administration and congressional supporters of the campaign reform legislation.

Court conservatives split

But the court's conservative majority was itself split on the issue. Roberts and Justice Samuel Alito took a narrow approach, saying only the issue ads in question were not subject to restrictions based on the high court's 2003 ruling upholding the broader McCain-Feingold law. Three other conservatives -- Justices Antonin Scalia, Anthony Kennedy and Clarence Thomas -- said they supported throwing out entirely the issue ad restriction contained in McCain-Feingold.

The overall effect, however, is that such ads will almost certainly play a role in next year's federal elections, in the critical days before voters go to the polls.

In dissent, Justice David Souter warned that problems lie ahead when these ads become more prevalent.

"The understanding of voters and the Congress that this kind of corporate and union spending seriously jeopardizes the integrity of democratic government will remain," he said. "The facts are too powerful to ignore, and further efforts at campaign finance reform will come. It is only the legal landscape that now is altered."

Souter took the unusual step of reading portions of the dissent in an oral presentation from the bench. He was supported by Justices John Paul Stevens, Ruth Bader Ginsburg and Stephen Breyer.

Ads widely used before 2002

Until they were banned in 2002, these issue ads were widely used to promote particular causes, such as environmental protection or tax reform, but the law specifically said they could not endorse, oppose -- or even mention by name -- any particular federal candidate.

The restrictions apply only to money from a corporation or union's "general treasury" funds.

The ads often had the effect of either helping or hurting at-risk candidates fighting for their political lives.

"These ads did not have some random distribution," Solicitor General of the United States Paul Clement said in defense of the restrictions during oral arguments in April. "These ads were were really concentrated in close districts."

But an anti-abortion group claimed they were prevented from airing what they call "grass-roots lobbying ads" aimed at focusing attention on a particular issue, not a candidate or office holder.

Corporate groups -- including special interest non-profits -- said preventing their messages from airing close to elections was an unconstitutional restriction of their First Amendment rights.

The federal government countered that the ads can influence an election, and argued such restrictions are necessary because their big-money corporate sponsors had always found legal ways to sidestep earlier laws on issue ads.

Wisconsin Right to Life (WRTL) had filed a lawsuit in 2004, demanding the right to air ads that urged viewers to contact their Democratic U.S. senators -- Herb Kohl and Russ Feingold -- and "tell them to oppose the filibuster" of President Bush's conservative judicial nominees. Feingold was running for re-election in 2004, and both men serve on the Senate Judiciary Committee that confirms federal judges.

The ads mentioned the senators by name, but did not provide their contact numbers. Instead, the ads showed a link to a Web site on which WRTL posted critical information about Feingold.

He was not participating in the latest appeal, but the bill's co-sponsor, Sen. John McCain, R-Arizona, is a party to the case.

"It is regrettable that a split Supreme Court has carved out a narrow exception by which some corporate and labor expenditures can be used to target a federal candidate in the days and weeks before an election," McCain said in a statement.

Effect on 2008 vote expected

Political and legal experts say the ruling could greatly influence next year's elections.

"McCain-Feingold clearly has an impact on every candidate and everyone that raises or spends campaign dollars," said Edward Lazarus, author of "Closed Chambers," an inside look at the Supreme Court. "And the court has mediated that line between trying to allow Congress to protect against electoral corruption, but at the same time, protect the right of expression of corporations and individuals."

The high court, in a series of rulings in recent years, has in general upheld the constitutionality of federal campaign finance reform laws. But a federal court last month allowed the Wisconsin group's lawsuit to go forward. They are supported by a large number of groups, including the ACLU, the National Rifle Association, the American Federation of Labor and the U.S. Chamber of Commerce.

Money is central to this case, specifically the source used to pay for issue ads. Federal law prevents corporate general funds from being used, but the ads airing close to an election could still be paid for by a group's political action committee, or PAC. Those groups say such PAC revenue is generally limited compared to general treasury money, and subject to great restriction, such as the disclosure of donor names and amounts.

The justices in 2003 upheld the overall legality of McCain-Feingold. Then-Justice Sandra Day O'Connor wrote an opinion upholding Congress' justification and power to enact sweeping campaign finance reform. But Alito has since replaced her on the bench, and signed onto a more restrictive view of the law's power. He and Roberts, by having the controlling opinion, proved to be the swing vote in these appeals. Neither was on the bench when the high court first considered the issue in 2003.

The consolidated cases are FEC [Federal Election Commission] v. Wisconsin Right to Life (06-969) and McCain v. Wisconsin Right to Life (06-970).