WASHINGTON - The Supreme Court agreed yesterday to referee a challenge to limits on preelection ads, a key provision of the campaign-finance law that the court upheld in 2003.

The justices will hear an appeal of a lower-court decision that relaxed restrictions on mentioning candidates by name in issue ads run by corporations, labor unions, and other special-interest groups near the climax of a campaign.

The court will hear the case in April and will almost certainly decide it by July - well before the first presidential voting takes place in the January 2008 Iowa caucuses.

Issue ads do not purport to influence an election, but rather focus attention on an issue their sponsors find important. A provision in the McCain-Feingold campaign-finance law bars mentioning a candidate in issue ads in the 60 days before a general election and 30 days before a primary.

The provision aimed to end the practice of circumventing limits on contributions in federal elections by running ads that avoided expressly advocating a vote for or against someone while making clear a preference for - or, more often, disapproval of - one candidate.

Wisconsin Right to Life, an antiabortion group, has been fighting the law since 2004, when it sought to run ads urging voters to contact Wisconsin Democratic Sens. Russell Feingold, who was up for reelection that year, and Herb Kohl, who was not, and ask them not to hold up President Bush's judicial nominees.

Because Feingold was running, the ad was prohibited. Wisconsin Right to Life argued that it was not trying to influence an election and said the law restricted its constitutional right to petition the government.

The administration will be in the unusual position of defending the law against an attack from a group that backed the president's nominees.

Like pending cases on abortion and race in public schools, the campaign-finance dispute is a high-profile case in which the court could depart from earlier 5-4 rulings based mainly upon a change in its personnel. Now-retired Justice Sandra Day O'Connor joined the four more liberal justices in upholding large portions of McCain-Feingold in 2003. Her successor, Justice Samuel A. Alito Jr., is considered more conservative.

The consolidated case is Federal Election Commission v. Wisconsin Right to Life and McCain v. Wisconsin Right to Life.

The court added six other cases yesterday, in all likelihood filling its calendar for this term. Among them, it said it would review a lower-court ruling that allowed New York City to sue foreign countries that own property near the United Nations over millions in unpaid taxes.