The District of Columbia government asked a federal judge yesterday to permit the immediate hiring of 127 firefighters under an affirmative action plan that requires that almost two-thirds of the jobs go to blacks.

The move was vigorously opposed by lawyers for the federal government and by a group of black firefighters.

At a two-hour hearing, D.C. Corporation Counsel Inez Smith Reid urged U.S. District Judge Charles R. Richey to lift part of his order of April 1 that barred use of the plan, which also governs promotions.

Reid said a program of quick hiring was necessary to protect the public safety because the D.C. fire department is under strength and its members are "fatigued" by compulsory overtime work.

However, in papers filed last week, the District appealed Richey's order to the U.S. Court of Appeals, and the judge said that move might make it impossible for him to take any further action. Richey asked the District to withdraw the appeal, but Reid gave no indication whether it would do so.

"I want the department brought up to full force and to stop paying excessive overtime," Richey declared. But he added, "What this appeal has done is just bollix up the whole works. We could just go ahead with what I originally set out."

Richey's April 1 order directed the District to submit a new affirmative action plan by May 15 that would weigh "viable alternatives to race-conscious numerical goals or quotas."

In the ruling, Richey said he "reluctantly approved the hiring aspects" of the plan as being "minimally acceptable" under federal civil rights laws and the Constitution as a means of overcoming past discriminatory practices.

The plan specifies that the racial composition of the fire department should reflect the proportion of blacks in the working-age population of the city, which is about two-thirds black.

But he rejected its promotion provisions, which also set racial quotas, because these "deprive innocent whites of their legitimate expectation of advancement."

Then the judge ruled that "since a portion of the plan is invalid, the entire plan is invalid."

Reid argued yesterday that since Richey had approved the hiring part of the plan, the city should be allowed to carry it out.

However, Richard S. Ugelow, a Justice Department lawyer, said the fire department should do all its hiring as well as its promoting without racial preferences or discrimination.

Joan A. Burt, attorney for the group of black firefighters who originally filed suit against the District government, said her clients also opposed the affirmative action plan. She said the District had not taken steps to develop a new entrance exam for the department that would be fair and properly job related.

At several points in the hearing, Richey suggested that the District might consider using a physical agility test for new firefighters, patterned after similar validated tests in other cities.

When Reid said it would be hard to use another city's test in Washington, Richey retorted, "Why is that so difficult? . . . . The fires are the same."

In its court papers, the District government said it did not want to hire new firefighters in the order of their scores on a written exam, which has been its traditional system, because that would "result in a substantially larger number of white candidates" being hired.

It said a physical agility test would discriminate against women.

Richey asked all the lawyers to file more written arguments today and said he hopes to rule on the case shortly.