A federal judge here has ruled that the promotion of 24 D.C. police detectives in 1978 did not discriminate against 21 "exceptionally well qualified" applicants even though five of those promoted were selected after the normal process.

"There is simply no evidence in this case that the plaintiffs would have been promoted except for the affirmative action plan," U.S. District Judge John Garrett Penn said in a ruling made public yesterday.

The ruling came more than 2 1/2 years after the trial of the suit, which was filed by the 21 detectives in 1982. The promotion involved the rank of detective, grade 1. Since the suit was filed, all promotions to the rank, which is authorized to have 100 persons, have been held in abeyance, police spokesman Lt. William White said.

"My reaction is one of disappointment, and my comment is that we are considering an appeal," said Joel Bennett, an attorney for one detective.

Assistant Corporation Counsel Cary Pollock said Penn's ruling showed that "what was done here was allowed by law."

According to court documents, a committee of high-ranking police officials recommended 19 persons for promotion from a list of 51 "exceptionally well qualified" applicants.

But Chief Burtell Jefferson "believed that the promotion of only eight (out of 19) blacks and no women did not satisfy the affirmative action goals for the department" and that it was not balanced across all divisions of the department.

Five persons were then added to the list -- three black males, one white male and a white female.

"Simply stated," Penn said in his ruling, "the plaintiffs were not selected for promotion and that determination had nothing to do with their race or sex . . . . Clearly while they were not promoted, they were never denied promotion." The word "denied" was underlined in the ruling.