The Maryland Court of Appeals yesterday struck down a section of a law that allows the Burning Tree Club in Bethesda to bar women while keeping its tax-exempt status. But in overturning the entire section, the court in effect left a larger loophole for the legislature to close.

The high court's two-part ruling means the exclusive 63-year-old all-male club will continue to enjoy a tax break worth more than $150,000 a year -- unless the General Assembly passes new legislation banning sex discrimination in country clubs.

State Sen. Stewart Bainum Jr. (D-Montgomery), who with his sister Barbara Bainum Renschler brought suit against the club, demanding that it either admit women or forgo its tax break, vowed yesterday to introduce such legislation next month when lawmakers convene in Annapolis.

Bainum confidently predicted that his bill will pass. But House Speaker Benjamin Cardin was less emphatic.

Both Bainum and Benjamin Civiletti, the lawyer representing Burning Tree, claimed victory in yesterday's high court decision, which both men also characterized as confusing.

"We've won the moral victory. The court agrees that the Burning Tree loophole is clearly unconstitutional, and we've mostly won the legal victory," Bainum said.

"The final step will be for the General Assembly to insert a sex discrimination provision back into the country club antidiscrimination statutes . . . ," the Montgomery Democrat declared.

Civiletti, who was attorney general under President Carter, said, "Burning Tree won the case. The court found that it could keep its tax deferment." In 1974, the General Assembly barred sex discrimination by country clubs that received special tax breaks but then made an exception for clubs whose "primary purpose" is to serve only one sex. Critics said the exception was tailored for Burning Tree's benefit. The court yesterday said the legislature's actions were contradictory.

But in its complex decision, the court voided the entire section banning sex discrimination by private clubs -- not just the Burning Tree exemption. In doing so, the court may have left the door open to such discrimination by some country clubs unless the General Assembly acts.

The judges left intact provisions of the law prohibiting discrimination on the basis of race, creed or national origin.

Civiletti said yesterday's decision is a narrow one, affecting only about 20 country clubs that have negotiated an agreement with the state that allows them to defer much of their tax bill if they agree to maintain their land as "open space" instead of converting it to another use, such as development.

Under a 1965 law, country clubs were given an economic shield against spiraling property taxes that might force them to convert "open space" such as greens to "more intensive or different uses" such as commercial or residential development. The law gave Burning Tree a tax break on most of its 225 acres at River Road and the Beltway.

The 1974 amendment to the law banned discrimination because of race, creed, sex or national origin. But it said the sex discrimination ban did not apply to "any club whose facilities are operated with the primary purpose of, as determined by the attorney general, to serve or benefit members of a particular sex."

Women's groups and others complained that the so-called "Burning Tree loophole," named for the state's only country club that publicly excludes women as members and from the grounds -- except for one day a year for shopping at the club's store -- made taxpayers in effect subsidize discrimination. Since 1981, various bills, most introduced by Bainum, have addressed the issue, but none has passed.

Yesterday Civiletti said the Burning Tree issue -- and the complexity of the Court of Appeals decision -- illustrates a deeper conflict.

"What I think it means is that it's a very close question as to whether private acts, the freedom of people to do what they want to do and to receive some indirect tax benefit, can be found unconstitutional," he said. "A great many people . . . believe . . . in your home, garden club or whatever, people ought to be free to do what they want to do without the government dictating."

Bainum said, "It wasn't a total victory. The one regret I have is that Burning Tree won't have to start paying taxes until after the General Assembly acts."

In September 1984, Montgomery County Circuit Court Judge Irma Raker ruled that the law's loophole was unconstitutional and said the club was not entitled to the favored tax status because it discriminates against women. She ordered the state not to grant the tax exemption, but she did not require the club to admit women, as Bainum and Renschler had requested.

Yesterday's 4-to-3 ruling on the tax break's constitutionality upheld Raker. But in a second decision, four of the high court judges found that the exemption could not be severed from the sex discrimination statute as a whole. Cardin, the House speaker, said yesterday that "there is no sympathy in the legislature at all for the exemption of Burning Tree," but that he needed to see the ruling before deciding what action the General Assembly should take.