A federal judge here yesterday threw out a lawsuit by 17 former and current inmates of the D.C. Jail who had charged that District and corrections officials were at fault when the inmates were injured in a 1984 fire set by other prisoners at the overcrowded facility.

U.S. District Judge Harold H. Greene ruled that "prison officials responded as best they could to an unexpected, rapidly developing situation" and thus did not violate the inmates' constitutional rights.

"While prison officials certainly have a duty to protect inmates from threats to their safety inside the institution, they are not required to subordinate their own security or the security of the institution as a whole to the needs of particular inmates," Greene wrote in his opinion, adding: "The court will not second-guess decisions made by prison officials during a crisis situation . . . . "

On July 22, 1984, jail inmates set fire to scores of mattresses, sending clouds of thick smoke through several of the jail's 18 cell blocks and injuring four guards, a D.C. firefighter and a number of inmates.

The inmates who filed suit argued that the jail was overcrowded on that date in violation of a court order and the Constitution, and that this caused the other inmates to set the fire.