District of Columbia Mayor Marion Barry, angering many of the city's black firemen, has imposed a month's delay in fire department promotions in order to investigate allegations that some black firemen cheated on a promotional examination to get the highest scores.

Barry ordered the delay following complaints from the predominantly white firefighters' union in the city, Local 36 of the International Association of Fire Fighters.

Sources said the 12 firemen scoring highest on the examination for persons seeking promotion to sergeant were black.

This was the first time that this had ever happened and leaders of local 36 charged that it was because there had been cheating.

Matthew F. Shannon, the mayor's special assistant for labor relations, said he investigated every allegation made by the firemen's union and found "no hard evidence" to substantiate the charges or justify a delay in promoting the black firemen, the first three of whom were to be elevated next week.

But Shannon said he also recommended that the city's chief auditor, acting Inspector General David Legge, conduct a more exhaustive investigation to last no longer than two weeks.

The controversy over the examination is nearly identical to one that developed early last summer in the city's police department, when there were pervasive rumors that some high ranking black police officials who helped prepare a promotional exam had given advance copies to black officers who took the exam.

For years, blacks have complained that the city's fire and police departments have been among the most segregated agencies in the city government. Now, black firemen contend that the basis of alleged cheating are motivated by racism.

"I feel insulted because the mayor is entertaining this thing But I understand his position," said Lt. Ray Alfred, a spokesmen for the predominantly black Progressive Fire Fighters Association. "Everybody and his dog and his grandmother has done an investigation.

"To black firefighters, it's an insult. We say if there were any facts, do the investigation and clear the air, but there are no facts. It's a situation where you have a racist segment in the union that dictates everything that goes on."

William Hoyle, president of the predominantly white firemen's group, which had endorsed and supported Barry in last year's elections, declined to comment on the controversy. According to several city hall sources who asked not to be named, the firemen's union had at one point offered a $10,000 reward for any information that would help substantiate allegations of irregularities in the administration of the test.

The test included about 100 questions and was administered to 285 firefighters on June 17 by the then-U.S. Civil Service Commission.

The test, along with promotional exams for eligibility to become lieutenants and captains is given every two years and is considered by firefighters to be a coveted chance to increase their ranks as well as their salary. Sergeants receive nearly $1,000 a year more than most rank-and-file firefighters.

Lieutenants make $3,000 a year more than sergeants and captains make $4,200 a year more than lieutenants. Of the 243 sergeants, lieutenants and captains now in the fire department only 35 are black and one is an Asian-American.

Those persons taking the test are placed on a promotional list developed from the test score, years of service in the department and educational background, with ranking on the examination given the most weight. Each time a promotion becomes available the top three persons on the list are nominated and a special department promotions board chooses the person who is to be elevated in rank.

Shannon said that the allegations of the firemen's union "center around personal relations between firefighters and people at the Civil Service Commission that were charged with the responsibility of administering the exam."

According to Shannon and other sources, the allegations center on the fact that a firefighter who took the examination in 1976 had a "social relationship" with a woman employe of the Civil Service Commission "who was in a position to have access to the test."

According to city fire department personnel officials, a six-person panel of district fire captains developed the initial questions for the examination and then forwarded the material to the Civil Service Commission. Each captain is responsible for preparing questions in certain areas and the chances of any one question actually being on the exam are "one in ten" because the number of questions submitted to the Civil Service Commission far exceeds the number actually on the test.

In the past, acording to several veteran black firemen, blacks have finished much lower on the promotional exam. This year, one black firefighter said privately, there was more of an effort to make a good showing.

"I don't believe anyone cheated," he said. "I just believe the brothers decided that for whatever it was worth, you were just going to have to study."

The blacks who took tests for promotion to higher ranks did not finish as well and the results of those tests, which were not immediately available yesterday, have not been challenged by the union.But black firefighters believe that the union is concerned about the results of the lower level exam because only by becoming a sergeant can persons expect to become higher ranking officers in the department.

About one-third of the 1,476 members of the city department are black, including two black women.

Although Shannon recommended no more than two weeks to complete the investigation, Florence Tate, the mayor's press secretary, said yesterday that Barry had extended the period to as much as one month to allow greater latitude. "It could be completed in one week," Tate said, adding that any persons whose promotions were delayed would receive back pay.

Fire Chief Jefferson W. Lewis said he had discussed the delay with Barry. "In view of the innuendo that's been said, I talked to the mayor and we agreed it might be in the best interests of these things if we help it up," Lewis said. "As far as I know it's the mayor's decision to hold it up and the mayor's the boss."