A U.S. District Court judge, citing "serious defects" in the D.C. Fire Department's controversial affirmative action plan, yesterday ruled that the plan's promotion policies are illegal but found permissible its use of strict numerical goals for hiring minorities.

Judge Charles R. Richey said that because part of the plan is invalid, the court "must disapprove the entire proposed plan," and he ordered the District to submit a revised plan in 45 days.

Mayor Marion Barry yesterday hailed the judge's ruling on the hiring policies, but said, "We are disappointed and disagree with the judge's decision regarding promotions . . . and his decision to invalidate the entire plan solely on the basis of his conclusion about one aspect of the promotional plan. We will do all that is legally within our power to get this decision turned around."

Barry said the city will go to court on Friday, seeking an order to delay the effects of Richey's ruling and permit the hiring of additional firefighters "needed to fill 114 vacancies . . . vital to the safety of our firefighters and citizens."

Hiring and promotions in the fire department have been frozen because of the controversy. Five black firefighters were promoted last month, in the first action taken under the plan. Yesterday, Richey declared those promotions "void" and ordered that no other promotions be made under the plan.

The case has been viewed as part of a nationwide battle between the Justice Department and civil rights advocates. Justice had filed suit, attacking the plan's use of "racial quotas" in hiring and promotions as reverse discrimination, while civil rights attorneys defended them as legal "goals" to redress past employment discrimination.

While upholding Justice's contention that the promotional "quotas" violate civil rights law, Richey dealt a blow to Justice's broad attack on race-conscious affirmative action plans. Richey said numerous court decisions demonstrate that "contrary to the contention of the United States, such relief is not prohibited."

The D.C. plan at issue calls for strict numerical goals for hiring and promoting minorities and women in an effort to correct imbalances revealed in a study that found both groups were underrepresented and underpaid at almost every level of the department.

Its long-range goal is hiring women and minorities in proportions equal to their representation in the D.C. work force. Currently, blacks account for about 64 percent of the D.C. population and make up about 38 percent of the department's uniformed work force.

Yesterday Richey asserted that in this case under the Fire Department's plan "race becomes the key to admission into the upper echelons" of the department, and therefore the plan "unnecessarily trammels" the rights of white firefighters.

"The white firefighters have earned the right to expect to be able to reap the rewards of their many years of service and dedication, without having those rewards stripped away solely on the basis of race," he wrote. "Black firefighters have also worked hard, having to overcome a long history of racial prejudice. However, the fact of past discrimination alone is not enough to deprive innocent whites of their legitimate expectation of advancement."

The hiring policies, however, were another story. They are "minimally acceptable" both under civil rights law and the Constitution, the judge wrote.

Those provisions do not involve the discharge of any whites, nor do they prohibit the hiring of white firefighters, he said. Indeed, the plan provides that the "same proportion of whites will be hired as" the proportion that pass an entry-level exam, according to the opinion.

Also, white test-takers are merely applicants for positions, according to the opinion, and as such, they "have little in the way of protectible interests in terms of getting a job in the first place."

Richey also made clear in his opinion and in remarks from the bench yesterday that he is "not comfortable with racially based distinctions." He chastised the District for failing to consider alternatives and said "the revised plan should be drawn after a thorough investigation into viable alternatives."

The plan that created the controversy is an outgrowth of a complaint filed in 1980 by black firefighters, who charged a "pattern and practice of discrimination" in the department. In his opinion, Richey said that the record indicates that "in the past, the department's companies were officially segregated. Moreover, a review of the salary ranges indicates that a racial hierarchy still prevails."

The complicated legal battle pitted several different players against one another. Black firefighters had sued in 1984, seeking to force the department to issue an affirmative action plan. When the District issued its plan and ordered the five promotions last month, the union representing firefighters and the Justice Department sued to block its imposition.

Local 36 of the International Association of Fire Fighters attacked the promotion aspects of the plan, and Justice challenged the plan in its entirety -- both charging that it was "discriminatory because it grants preferences based on race and sex."

Two groups of civil rights lawyers entered the battle, filing "friend-of-the court" documents, to defend the plan.

Yesterday, everyone found something to applaud.

Thomas Tippett, president of Local 36, hailed the decision as upholding the union's belief "that race and sex should never be considerations in promotions. They should be on merit."

William Bradford Reynolds, Assistant Attorney General for the Civil Rights Division, said he was "gratified that the court recognized the unlawfulness of the promotions part of the plan."

"We of course continue to believe that the Constitution forbids a municipality from making hiring or promotion decisions based on gender or skin color," he said. "There is nothing in the opinion that suggests a reason for us to alter that view."

Richard Seymour, of the Lawyers Committee for Civil Rights Under Law, responded: "That's absolute nonsense. The judge upheld the hiring provisions of the plan."

Seymour said the decision "squarely rejects the overbroad proposition that Justice was urging," that quotas or goals are not permissible in affirmative action plans unless they are aimed at specific, proven victims of discrimination.

Lt. Theodore Holmes, the black firefighter who filed the original 1980 complaint that led to the plan, said, "My reaction is, the decision is just another plateau. We're no further ahead and no further behind."