A federal judge ruled yesterday that because of overcrowding, no new prisoners sentenced in D.C. Superior Court can be sent to the District's Lorton Reformatory, a move that could send as many as 300 D.C. inmates a month into federal prisons beginning as early as next week.

In a sweeping oral order, U.S. District Judge June L. Green also held the District in contempt of court for exceeding inmate population ceilings at Lorton's Central facility and refused to delay imposition of a new inmate limit of 1,281, set to begin today, on Lorton's three Occoquan facilities, which now hold 2,000 prisoners.

In addition, Green ordered the District to trim the number of inmates held at Occoquan by 100 each month, mandating the first reduction for Aug. 31, and at the same time ordered lawyers in the Occoquan and Central lawsuits to renegotiate the inmate limits.

Green's decision marks the first time that the federal government, which under a 1932 law has responsibility for designating where inmates will be confined, has been ordered to step in and help the city house its prisoners. Officials estimated that about 300 people a month are sentenced at D.C. Superior Court.

But it was unclear last night when the first D.C. prisoners might be sent to federal prisons, and lawyers for the inmates, the city and the federal government said they were confused about exactly what Green had ordered.

Green issued written orders on the Central facility and Occoquan population limits, but not on inmate transfers. She also has not ruled on a federal government request to delay the transfers for at least seven days so it can be appealed.

"We're in kind of an iffy world now. I am not sure how it's going to work out," retired D.C. Superior Court judge John D. Fauntleroy Jr., Green's special officer on prison issues, said late yesterday.

"Obviously we are waiting to get all her orders and piece them all together," said Acting D.C. Corporation Counsel Frederick D. Cooke Jr. "And I'm not real clear what her ultimate direction will be."

But D.C. Corrections Director Hallem H. Williams Jr. said he was "encouraged that the judge recognizes that it's very difficult for the District . . . to comply with her order, and the attorney general has a role to play in this whole process."

Green's actions were the latest attempt to grapple with the District's long-term prison problems, which have been at near-crisis proportions since August 1985, when another federal judge ordered the number of inmates held at the D.C. Jail reduced by about 1,000, saying he would shut down the jail if more than 1,694 inmates were housed there.

The D.C. prison system now holds 7,947 prisoners, an increase of about 1,200 since Jan. 1, and only two of the city's 10 prisons do not have court-ordered population limits. The city is to begin construction soon on a new 700-bed drug and alcohol treatment center, but no other major additions are planned.

"The entire system is unable to take care of anyone else," Green said during yesterday's hearing.

But her order barring inmates from Lorton came only in the lawsuit brought by Central inmates, prompting federal officials and at least one area member of Congress to challenge Green's authority to issue such a broad order affecting all the city's prisons.

"I don't believe the court can overreach and take over the whole criminal corrections system" through the suit brought by Central inmates, Assistant U.S. Attorney Royce C. Lamberth argued at the hearing.

Rep. Stan Parris (R-Va.) said Green's decision was "totally outrageous and represents an action clearly in excess of her legitimate judicial authority. This action is the most blatant exercise of judicial activism unsupported by the rule of law that I have ever witnessed."

Green's order for the federal government to begin taking all newly sentenced D.C. prisoners came two weeks after she made Attorney General Edwin Meese III a defendant in the suit brought in 1980 by Central inmates, reversing her own decision that same year that dismissed the federal government as a party. Central is the District's main medium-security facility and now holds 1,238 prisoners, compared with its limit of 1,166.

The federal government has argued that Green lacks the authority to add the attorney general to the suit years after the District and inmates settled the lawsuit through a consent decree. All recent actions in the Central inmates' case have been to enforce the consent decree.

"In essence, the District is inviting the attorney general to dinner after the meal has been eaten, but before the dishes have been washed," Lamberth said in court papers.

Meese's addition came on the motion of Peter J. Nickles, the inmates' attorney, who then persuaded Green to order the federal and city governments to seek a voluntary solution to the prison crowding problem. But after a meeting on Tuesday, Fauntleroy declared an impasse, which led to yesterday's action.

Nickles has asked Green to require that D.C. inmates held in federal prisons be sent to nearby institutions, that the District's own parole and good-time-credit provisions be extended to city inmates in federal prisons, and that the transfers continue until 1989.

"I don't think there is a constitutional right to be incarcerated near your friends and relatives," Lamberth argued in court, adding that federal prisons are now 56 percent above capacity and D.C. prisoners would have to be sent to the least crowded institutions.

According to court documents, the only federal prison now operating under capacity is the penitentiary at Marion, Ill., which is reserved for the nation's most violent prisoners.

A total of 2,305 D.C. inmates are now held in federal prisons, most of them transferred to federal authority in the four months after U.S. District Judge William B. Bryant imposed the inmate ceiling on the city jail.

The federal government stopped taking prisoners voluntarily in January 1986, saying that the District government was not doing enough to increase its prison capacity. Three hundred more D.C. prisoners were accepted by the federal government after last July's disturbance at Occoquan I and II.

Under her contempt order for violating the inmate limits at Central, Green ruled that the District must pay $250 a day for each of the 25 dormitories that exceeds its limit, beginning yesterday. A city corrections official said yesterday that 21 of Central's dormitories were above their limits, meaning that the city's fine was $5,250 for yesterday.

Green first ordered the District to reduce crowding at the Occoquan prisons last August, then withdrew her decision when the city challenged its legality. She then held a full trial, and in December ruled that the conditions of confinement at Occoquan were unconstitutional.

She imposed an inmate population ceiling of 1,281, effective June 1, but then delayed it twice.