A federal judge ordered yesterday that an independent "special master" be appointed to oversee operation of Lorton Reformatory's Central facility, which lawyers for inmates described as vermin-infested and plagued by fire code violations.

Under the order by U.S. District Judge June L. Green, the special master will report only to the court and will have sweeping powers, with authority to ask the court to remove any D.C. Department of Corrections employe or official -- including the department head.

The facility, the largest of eight at Lorton with 1,250 inmates and accomodations for 400 more beds under construction, has been the site of a number of violent disturbances, including a riot Sept. 23 during which 14 inmates were shot when D.C. corrections officers armed with shotguns fired on prisoners.

"The key point is . . . for the first time in any District of Columbia institution, an outsider will respond to the court and not the politicians," said Peter J. Nickles, attorney for Central inmates in the six-year-old suit.

The ruling marks a major defeat for the District government, which for 15 years has been the target of ongoing legal battles over the operation of its prison system -- a system that Mayor Marion Barry on Wednesday called "one of the best in the nation."

Corrections Director James F. Palmer and an attorney for the city declined to comment on Green's ruling.

City Administrator Thomas Downs said last night the city will try to persuade Green that its own officials can carry out the same role as a special master, but that if that fails they would "accept the notion" of an outside expert to monitor compliance with the "maintenance of environmental safety and health conditions."

Green's ruling could lead to requests for similar oversight of other parts of the District's troubled prison system. Steven Ney, one of the attorneys for inmates at the D.C. Jail, said he is considering asking for a special master to run that institution, which is under a court-imposed inmate population cap of 1,694.

Attorneys for inmates and the city are to submit names of possible experts by April 25.

One person mentioned by attorneys involved in other suits against the city was Sean McConville, a prison expert who recently wrote a scathing report on the city's prison system. McConville could not be reached for comment yesterday.

Green also held the city, Barry and Palmer in contempt of court for failing to meet deadlines for renovating dormitories at Central. She fined the city $7,500.

In a last-ditch attempt to avoid Green's action, an attorney for the city announced in court that the District was naming a senior official to monitor compliance with the four-year-old consent decree that covers virtually every aspect of the prison's operation, from plumbing standards to medical treatment.

"I'm a little leery about having the fox watching the henhouse," replied Green, suggesting that "perhaps that should be the one the master is checking with."

When Michael Zielinski, an assistant corporation counsel, told the judge that the official, Hal Williams, recently had tended to prison matters for Mayor Marion Barry, Green inquired: "He's been doing things like riding people around in buses?"

Fairfax County Board of Supervisors Chairman John F. Herrity, who has battled Lorton throughout his political career, was quick to praise the judge's action.

"If she names an independent, competent person who is a seasoned administrator and is not politically tied in with the gang that's in there now, it's got to be a plus," said Herrity.

The lawsuit that resulted in Green's order yesterday was filed in 1980 by inmates who complained of unchecked violence, overcrowding and unhealthy living conditions. The city signed a consent decree four years ago in which it agreed to correct the conditions.

Nickles told the court that there has been a recent increase in assaults at Central, rising from an average of four or five a month to nine in January and 14 in February. He also cited a recent environmental inspection of the facility that found improper handling of infectious wastes in the infirmary, scalding water in the showers and 154 fire code violations including not enough fire extinguishers.

The inspection was monitored by an independent expert who also found that it was unsafe for inmates to work in the auto painting shop because of the lack of ventilation.

Nickles said the city's decision to continue to house inmates with AIDS-Related Complex in Central's infirmary has curtailed medical treatment to other prisoners.

Zielinski replied that the city was not segregating inmates recently found to have the condition, and that the number of inmates in the infirmary had dropped from 24 to 17.

Nickles pointed out that when the city signed the consent decree in 1982 it had been considered a "model for the nation." But since that time, he said, the District had failed repeatedly to carry out the promises it made, and so it was time for Green to appoint a special master, a procedure that was agreed to in the decree. Under Green's order, the city must pay for the special master and any other experts who are needed.

Zielinski asked Green to delay appointing an outside expert until Williams had a chance to work on compliance.

"I don't see anything that's going to happen in the next 30 days that hasn't happened in the last four years," Green said.

Then she said, "If the Millennium happens in the next 30 days, I'll be happy to put it on the back burner."