The Supreme Court yesterday substantially weakened restrictions on the kinds of television ads that corporations and unions can finance in the days before an election, providing special interest groups with the opportunity for a far more expansive role in the 2008 elections.

Chief Justice John G. Roberts Jr. wrote the 5 to 4 decision, saying the McCain-Feingold campaign finance act's prohibition against the use of a candidate's name in such ads in the days before an election was an unconstitutional infringement on the groups' rights to advocate on issues.

"Discussion of issues cannot be suppressed simply because the issues may also be pertinent in an election," Roberts wrote. "Where the First Amendment is implicated, the tie goes to the speaker, not the censor."

It was a rare decision that united the U.S. Chamber of Commerce and the AFL-CIO in praise -- it is unlikely that the groups will use the court's more lenient standards to advocate for the same causes.

"This could reorder the advertising strategies of corporate America and labor unions in the 2008 elections," said former Federal Election Commission chairman Michael E. Toner.

Critics said the decision will encourage a financial arms race between well-heeled special interest groups.

"This is a big win for big money," League of Women Voters President Mary G. Wilson said in a statement. "Chief Justice Roberts has reopened the door to corruption."

The decision clearly illustrated how the addition of Roberts and Justice Samuel A. Alito Jr. has shifted the balance of a court closely divided on social issues. The five-member majority that also includes Justices Antonin Scalia, Clarence Thomas and Anthony M. Kennedy prevailed in each of the closely divided rulings handed down yesterday.

The court in two other cases restricted student rights to free speech and ruled that a suit brought by taxpayers against President Bush's office of faith-based initiatives could not go forward.

Roberts took a different view of First Amendment protections in the student speech decision, which he also wrote. He said a principal was right to take a student's banner proclaiming "Bong Hits 4 Jesus." Roberts said that schools do not have to tolerate speech advocating illegal drug use and that the question "hardly justifies sounding the First Amendment bugle."

The campaign finance case brought the fourth dissent read from the bench this year by a member of the court's liberal wing, which is eager to draw attention to what it says is a majority too willing to jettison the court's past rulings.

"The court (and, I think, the country) loses when important precedent is overruled without good reason, and there is no justification for departure from our usual rule of staredecisis here," Justice David H. Souter wrote for the other dissenters in the case, Justices John Paul Stevens, Ruth Bader Ginsburg and Stephen G. Breyer.

The portion of the law in question says corporate entities cannot use money from their general treasuries to broadcast ads that run 30 days before a primary or 60 days before a general election, are aimed at a relevant electorate and mention a federal candidate by name. The law -- formally named the Bipartisan Campaign Reform Act of 2002 -- includes labor unions and groups such as the National Rifle Association.

Forbidding the naming of candidates was important in the law. Congress was looking for a "bright line" restriction to do away with "sham" issue ads that purport to be about a controversy but amount to an attack on a candidate. The groups are free to run such ads if a separate political action committee pays for them.

In 2003, the court said the "vast majority" of such issue ads fell into the category of electioneering, and it upheld the restriction as constitutional. But the justices ruled last year that groups could challenge the law based on specific applications.

The case at hand involves an antiabortion group called Wisconsin Right to Life, which was restricted from running ads in 2004 that urged listeners to call the state's two senators and tell them not to filibuster Bush's judicial nominees. One of the senators -- coincidentally or not, Sen. Russell Feingold (D), a sponsor of the law -- was up for reelection and had been targeted for defeat by the group.

The majority rejected the argument of the law's defenders that the intent of the organization should be considered and said that the important aspect of the ad was whether it advocated the election or defeat of a candidate.

Roberts established a new rule: "A court should find that an ad is the functional equivalent of express advocacy only if the ad is susceptible of no reasonable interpretation other than as an appeal to vote for or against a specific candidate."

While they agreed with the outcome, Scalia, Kennedy and Thomas called that test "impermissibly vague" and said the entire provision should be declared unconstitutional. Alito said he would be sympathetic to that if this test proved unworkable.

But Souter and others said that Roberts might as well have taken the next step.

"After today, the ban on contributions by corporations and unions and the limitation on their corrosive spending when they enter the political arena are open to easy circumvention, and the possibilities for regulating corporate and union campaign money are unclear," Souter wrote.

James Bopp Jr., who represented the antiabortion group and has actively battled the provision of McCain-Feingold since its passage, said the court's decision was "broader and more protective of issue advocacy than we argued for."

AFL-CIO President John J. Sweeney cheered that "a majority of the court has finally and emphatically embraced the simple truth, that the First Amendment abides no law that suppresses independent speech about legislators and candidates, at least absent an explicit call for their election or defeat."

Steven J. Law, chief legal officer for the U.S. Chamber of Commerce, said the court sent a clear message that "regulating speech advertising in the name of reform may have gone too far."

The ruling was more unwelcome news for the presidential campaign of Sen. John McCain (R-Ariz.), who is falling in the polls and is struggling to keep pace with his rivals in fundraising. The senator's support of campaign finance regulations has been a sore point among conservatives, and rival Mitt Romney, the former Massachusetts governor, was quick to chime in that the court's decision showed "McCain-Feingold was a poorly crafted bill."

McCain noted that the decision "does not affect the principal provision of the Bipartisan Campaign Reform Act, which bans federal officeholders from soliciting soft-money contributions for their parties to spend on their campaigns."

Asked if such a challenge would be forthcoming, Bopp said, "I have no client with that interest -- yet."

The combined cases decided yesterday are FEC v. Wisconsin Right to Life and McCain et al. v. Wisconsin Right to Life.