A federal judge added the U.S. government yesterday as a defendant in a lawsuit brought by Lorton inmates, clearing the way for her to rule on whether federal prisons must begin accepting all newly sentenced D.C. inmates to ease crowding in the city's prisons.

U.S. District Judge June L. Green's order reversed her own decision of seven years ago. Green set a Wednesday hearing on whether the federal government will be made to take all newly sentenced D.C. prisoners until she decides that District prisons are "available, suitable and appropriate institutions."

The judge took the action without allowing the government the usual 10 days to respond to the motion by an attorney for inmates of Lorton's Central facility and over the strident objections of federal attorneys and lawyers representing inmates at other Lorton facilities.

"It is just plain not possible to cope with this situation," said Green, who made her decision during a surprise hearing. "We can't stand the overcrowding getting worse every month."

Jere Krakoff of the American Civil Liberties Union's National Prison Project, which represents inmates at Lorton's three Occoquan prisons, said during the hearing that sending D.C. prisoners to distant federal prisons would be "counterproductive, misguided and potentially extremely injurious to inmates."

"Hundreds of thousands of inmates may be scattered to the four corners of our nation, removed from their families and lawyers," Krakoff said.

A federal official said late yesterday that adding a defendant years after the other parties in a case have entered into a consent decree has never been upheld in the federal courts.

The federal government was originally named as a defendant when the suit was filed by Central inmates in 1980, but Green dismissed it from the suit that year. Neither the inmates nor the city challenged her ruling at the time.

Last year, U.S. District Judge William B. Bryant turned down a similar request by the District government to add the federal government as a defendant in the suit brought by inmates of the D.C. Jail. At that time, the city was also trying to force the federal Bureau of Prisons to accept D.C. prisoners.

The city has traced its current prison crowding crisis to the federal government's refusal to accept D.C. prisoners. About 1,800 D.C. prisoners were accepted by the federal government between August 1985 and January 1986 under a special agreement that allowed the city to comply with Bryant's imposition of a population limit at the jail.

But the federal government ended the arrangement, saying the District had not done enough to increase prison capacity.

A total of 300 inmates were accepted by federal prisons last summer after the fires and disturbances at Lorton's Occoquan I and II facilities.

The federal government's prisons are now 48 percent above capacity, officials said yesterday, adding that any D.C. prisoners might have to be housed in trailers. One source said that if the federal government has to add trailers, they might be placed on federal land in the District.

The motion to add the federal government was made by Peter Nickles on behalf of Central inmates after he was notified by Corrections Director Hallem H. Williams Jr. that the prison has been over its court-ordered capacity by about 50 prisoners for two weeks. Nickles also asked Green to hold the city in contempt for exceeding the limit.

"Despite all efforts made by the city -- including an increase in halfway house space, the new {Lorton} modular facility, the enactment of good faith credits and the emergency prison overcrowding legislation -- the District has reached the point where they must violate the consent decree," Nickles told the court.

Assistant Corporation Counsel Michael Zielinski told Green that the city supports the move to add the federal government to the suit.

"The District has done its part. We've done all we could do," Zielinski said.

Each attempt to add the federal government as a defendant has been based on a 1932 D.C. law that makes the U.S. attorney general responsible for designating places of confinement for persons convicted in the District.

Federal officials have maintained that the law was enacted to permit D.C. prisoners arrested in other jurisdictions to be housed in federal prisons while awaiting return to the District. Nickles and attorneys for the District argue that the law makes the attorney general responsible for prisoners sentenced in D.C. Superior Court.

"It's the District's responsibility to house its own prisoners," said Assistant U.S. Attorney Royce C. Lamberth. "Trying to shift responsibility to the attorney general is not fair."