At least we need no longer dread that potential explosion at Lorton Reformatory; the fiery uprising has come to the grimy, overcrowded prison with flames so high and bright the entire nation saw them.

Following sporadic serious outbreaks between 1974 and 1983, Lorton for the past two years has been the scene of repeated unrest and inmate uprisings. Accompanying the disturbances were reports warning that the awful conditions created the potential for even greater explosions and calling for extraordinary judicial intervention to prod into action a foot-dragging Barry administration and D.C. Council.

When inmates Thursday burned the crowded dormitories where they lived, "tense and dangerous" was no longer simply a phrase in a consultant's report. It described a day of disorder that saw more than 30 persons injured and a half-dozen prison buildings smoldering. And the Barry administration was left with considerable egg on its face.

Marion Barry initially tried to clean the yolk from his moustache by blaming the uprising on press accounts of a report by consultant Kathryn Monaco, which said Lorton was ripe for a riot. "You can't tell me that had nothing to do with the riot," he said.

But saying the prison uprising resulted from the truth being been told about conditions there becomes simply a red herring, given the long history of problems at Lorton. The prisoners' reasons were more to the point: "They made us sleep eight inches apart," one inmate yelled from a bus waiting to enter the D.C. Jail. "Lord, it is hot. That's why we did it."

Barry has turned aside the mounting criticisms of his management of the prisons that has come from such quarters as Fairfax County Board Chairman John F. Herrity, U.S. Attorney Joseph E. diGenova and Barry's mayoral opponents. Barry has played down the significance of an investigation of the uprising to be done by a U.S. Justice Department special permanent task force.

"The Department of Corrections is in charge of Lorton," he said at a Friday news conference. "Those who say we are not making progress don't know what they are talking about. We are working vigorously on the site preparation. You can't just snap your fingers and come up with a new facility."

But serious questions about the corrections department's ability to manage the city's prisons can't be so easily dismissed. While Barry and the council must bear the ultimate responsibility for the prison mess, one question the mayor must ask himself concerns D.C. corrections chief James Palmer: At what point does a personal friend and crony become a liability?

Since Palmer, a former high-ranking officer in the U.S. Marshals Service, took over the 2,868-person department in January 1983, his agency has been hit by a report charging "chronic managerial ineptitude," political interference and official inaction and recommending the appointment of an outside manager to run the department; a strongly worded federal court order deploring conditions at the D.C. Jail and ordering a cap on the inmate population there, and serious morale problems among guards.

Vigorously defending his administration's handling of a court order requiring prisoner transfer, and noting other improvements, Palmer told a reporter earlier this year that his job is "the hot seat day and night."

But it is becoming increasingly clear that Palmer, who has no background in corrections, just isn't the man to turn the prison system around. While he would doubtlessly perform quite capably in another government capacity, what's needed to pull the department from its morass of longtime problems is a person with wide practical exposure to the criminal justice system, plus educational credentials.

That profile is fit perfectly by a man such as Lee Brown, the former Howard University criminology professor who headed Atlanta's police force during its wave of child murders and who is now chief of police in Houston. There are others as well. "You can't be a political appointee and handle Lorton successfully," says Gwynne Pierson, head of Howard University's administration of justice program, adding, "Once you get a person with the right credentials, that person must be given the power, authority and budget to get the job done."

No matter how this unfortunate and politically embarrassing crisis is ultimately settled, the city has a constitutional and moral obligation to be a humane jailer. Thursday's fiery uprising was a grim reminder that it's an obligation that has not been met.