Mayor Marion Barry nominated a compromise candidate yesterday to be the new chief of the racially troubled D.C. Fire Department, but his selection was immediately criticized as a potential blow to department morale by leaders of both black and white firefighters' groups.

The mayor chose Deputy Chief Norman Richardson, 45, a black native Washingtonian to replace Jefferson W. Lewis, who retired as head of the 1,307-person city firefighting force last month. Richardson told reporters he had never encountered discrimination "either on or off the job."

William Hoyle, president of the predominantly white union that is the bargaining agent for the firemen, Local 36 of the International Association of Firefighters, said Barry appeared to have passed over a more qualified candidate who was white. That could dampen the career prospects of whites in the department, Hoyle said. The last two chiefs before Richardson were also black.

"I think the (other, lower ranking) chiefs are concerned. Has the fire chief's job been reserved for a black person?" Hoyle said. "I think the mayor owes it to all the officers in the department, especially the other chiefs, to explain what his procedures are."

Theodore Holmes, president of the predominantly black Progressive Firefighters Association, said he was concerned because Richardson appeared to have been chosen because he was a black man with no record of association with militant blacks in the department. Holmes said that would discourage blacks in the department from standing up for affirmative action.

Barry, who made the announcement at a firehouse on New Jersey Avenue NW where a fire alarm sounded just as the news conference was about to begin, said race was not the overriding issue in his decision.

"Some people and a few members of the press are putting too much emphasis on race," the mayor said. "I'm not oblivious to the fact that this is a predominantly black city . . . and we have a responsibility for our work force to reflect the population in general. But we ought to not put as much emphasis on race as we do on competency."

Richardson lives in Northeast Washington near the middle-income River Terrace neighborhood directly across the Anacostia River from Robert F. Kennedy, Stadium. He attended the old Mott Elementary School in LeDroit Park, Randall Junior High School in Southwest and was graduated from the old Armstrong Senior High School in 1953.

After working first as a mail clerk and later mailroom supervisor at a printing company, Richardson joined the fire department in 1957 and moved up through the ranks. Before his nomination yesterday as chief, he was deputy chief in charge of training, a post he has held since July 1979.

Barry said yesterday that the decision had boiled down to a choice between three candidates, all of whom, he said, were well-qualified, but none of whom he would name.

Other sources have said, however, that besides Richardson, the finalists were Assistant Chief John P. Devine, a white who was the preferred candidate of the firemen's union, and Battalion Chief Joseph A. Kitt, a black who was the top choice of the black firefighters group.

But Devine was cool to the idea of bypassing traditional promotional procedures to put more minorities in the upper echelon of the department, the sources said. Kitt, who was unacceptable to the union, had the reputation of being too much of an activist in his efforts to remove the vestiges of segregation and discrimination from the department.

Richardson's appointment will have to be confirmed by the City Council. A vote on his nomination is expected in about 30 days. Until confirmed, he will serve as acting chief.