The City Council unanimously passed an emergency measure yesterday to save the District's drinking establishments from a recent court ruling that could have voided many of the establishments' liquor licenses.

At issue is a city law, circumvented for the last 30 years, that requires an establishment receiving a liquor license to derive most of its income from the sale of food rather than liquor.

Since a 1956 opinion by the corporation counsel, the city's Alcoholic Beverage Control Board has interpreted the law to mean that establishments must intend to make meals their primary source of income but do not have to prove that is occurring.

But in November, the D.C. Court of Appeals ruled that the board must determine that restaurants actually received more money from the sale of meals than the sale of alcoholic beverages.

Under the council legislation, which will be in effect for six months, the ABC Board will determine whether a restaurant is "intended for use primarily as a place for preparing, cooking and serving meals."

Marlene L. Johnson, chairman of the ABC Board, told the council yesterday that all 611 of the District restaurants that hold liquor licenses could face challenges if the court ruling was allowed to stand.

Before voting, the council debated the politically sensitive licensing issue for two hours. For years, the powerful restaurant industry has been pitted against community groups challenging liquor license renewals on the basis that some establishments serve more liquor than food and have become centers of noise, traffic problems and crime in neighborhoods.

The council's action delighted restaurant owners and angered the group whose lawsuit led to the court ruling.

Stuart Long, a District restaurateur and an attorney representing the Washington D.C. Restaurant and Beverage Association, said the emergency legislation meant "life or death" to the District's restaurants. Long estimated that at least 70 percent of the city's restaurants would be unable to meet the court-mandated test and that restaurants have never been required to keep records of meal sales.

But Juanita Harris, a spokesman for the Upper Georgia Avenue Planning Committee, which won the court decision after challenging the liquor license of the Shepherd Park Restaurant at 7815 Georgia Ave. NW, said the City Council has ignored the wishes of community groups. Harris also said her organization was not notified that the council planned to consider emegency legislation.

"I think this is a real slap in the face of the community," Harris said. "We've been trying to upgrade community establishments. We've been fighting this for four years and we won the court decision. We plan to protest."

Council member Charlene Drew Jarvis (D-Ward 4), who voted for the emergency legislation after trying unsuccessfully to get the council to delay action for two weeks, said, "This is not a setback if there are other persuasive arguments community groups can present before the ABC Board."

The liquor licenses for all District restaurants expire each September, at which time anyone may file a protest with the Alcoholic Beverage Control Board challenging renewal.