A sharply divided panel of U.S. judges, in an apparently unprecedented decision, has ordered the Virginia Supreme Court to pay the legal fees of a consumer group that successfully challenged the court's ban on lawyer advertising.

In a 2-to-1 ruling, issued Tuesday, the judges struck down the Virginia State Bar's rules prohibiting such advertising as unconstitutional and ordered the state's highest court to pay Consumers Union of the United States for legal fees incurred in its four-year court battle.

In Virginia, the state supreme court approves the rules that govern the approximately 9,000 lawyers practicing under state bar regulation.

"It's precedent-setting," said Consumers Union attorney Ellen Broadman. Broadman said the decision carved out "an exception to the judicial immunity theory," which previously was thought to protect state courts from having to pay legal fees.

Court sources said yesterday that an appeal of the decision is likely.

If upheld by the U.S. Supreme Court, the consumer group's legal costs-estimated at about $100,000-would be paid out of the Virginia Supreme Court's budget or by appropriation by the General Assembly, according to Walter H. Ryland, chief deputy attorney general for Virginia. The attorney general's office represents both the state court and the bar in the case.

Tuesday's ruling by the special panel of federal judges followed a 1977 decision by the U.S. Supreme Court that declared such bans unconstitutional because they violate the First Amendment protection of free speech.

That decision rendered Virginia's ban unenforceable, but the rule remained on the books and tended to inhibit Virginia lawyers from advertising, according to James W. Benton Jr., a Richmond attorney who represented the consumer group.

In contrast, both Maryland and the District of Columbia adopted liberal rules within a year of the U.S. Supreme Court's finding.

In the 12-page majority opinion, written by U.S. District Judge Robert R. Merhige Jr. and joined in by Albert B. Bryan Sr. of the U.S. Circuit Court of Appeals, the panel said it was not "unjust" to demand the state's Supreme Court to pay legal fees "in light of their continued failure and apparent refusal to amend [the ban] to conform with constitutional requirements."

U.S. District Judge D. Dortch Warriner, in a strongly worded dissent, said it was "highly unseemly for this court to award attorneys' fees against the Supreme Court of Virginia, a court of greater dignity."

Consumers Union began its legal fight in 1975 because it wanted to publish a directory of Northern Virginia lawyers listing individual attorneys' fields of practice, the size of their firms, and most controversiat at the time, the fees charged.

The immediate impact of Tuesday's decision, according to Benton, is that Consumers Union will be able to go forward with the booklet. Consumers in the Northern Virginia area will be able to "seek legal services at a better price" as a result, Benton said.

Deputy Attorney General Ryland said yesterday that the state bar already is drafting new regulations that are more liberal than those mandated by the U.S. Supreme Court. The proposed regulations would prohibit only advertising that tended to be false, misleading or deceptive.

Ellen Broadman yesterday criticized the Virginia bar, considered to be among the more conservative in the nation.

"I think it's outrageous that the Virginia Supreme Court hasn't changed its Code of Professional Responisibility in the two years since Bates [the U.S. Supreme Court case striking down the ban on lawyer advertising] was decided," Broadman said.

Last December a Virginia Beach lawyer who advertised his services was indicted under two Virginia statutes, but the cases later was dropped.