Federal officials grudgingly agreed yesterday to accept 300 D.C. prison inmates uprooted by Thursday's uprising at Lorton Reformatory, giving badly needed relief to the city's clogged corrections system, but they ruled out any such assistance in the future.

Saying the "spigot has just been turned off" regarding any future needs the city may have for prison beds, U.S. Attorney Joseph E. diGenova said that the transfer of 300 offenders to federal facilities was the last such help the city will get and that District officials must act quickly to build another prison.

The federal action -- bringing to more than 2,500 the number of D.C. criminals in federal prisons -- was just part of a massive effort spanning three states to quickly put roofs over hundreds of inmates dislocated by the fires that ravaged four of 13 dormitories at Lorton's Occoquan I and II facilities.

Before Thursday's uprising, nearly 1,300 inmates were housed at Occoquan I and II. City Administrator Thomas M. Downs said Thursday that new long-term accommodations must be found for more than 400 inmates.

More than a dozen misdemeanor offenders from the District were being bused up to 400 miles to serve at least 30 days in the small Bristol city jail in Southwest Virginia. Out-of-state corrections officers clad in riot-gear drove through the night to deliver more serious felons to a prison in rural Delaware yesterday morning. Other inmates were dispatched to sites in Maryland.

At an afternoon news conference, Mayor Marion Barry said the complex redistribution of inmates had returned order to the city's corrections system and that the population ceiling at the D.C. Jail ordered by U.S. District Court Judge William B. Bryant would be met.

"We have total control of the situation," the mayor said. "By midnight tonight the jail will be down below 1,690, which means that we will have no problem with the Judge Bryant order."

Meanwhile, officials in the District and Fairfax County, where the prison is located, began feuding over who will provide future fire protection at Lorton. Lawyers who represent inmates also had their defenses up, keeping a watchful eye on the District's observance of limits on the population at the city's prison facilities imposed by U.S. District Court judges.

Barry, maintaining his upbeat appraisal of the city's handling of the incident despite mounting criticism, said yesterday that his administration will push forward with construction of a prison in the District despite possible election-year repercussions.

"We are vigorously working on the site preparation. I have told everybody where it is going to be," Barry told reporters at a news conference. But, he said, "You can't just snap your fingers and come up with a new facility."

Barry has said the city will build a prison and drug treatment facility in Southeast Washington near the D.C. Jail and the Congressional Cemetery. The facility will have 700 to 800 beds, Barry has said.

The mayor said it was too early to know how soon the damaged Occoquan living quarters could be fixed, or whether those that were destroyed would be replaced. Barry outlined plans pending zoning approval to open 132 beds for inmates at Hope Village, a privately run social services agency in Southeast Washington, and said the city was considering making room for 300 to 400 additional convicts in halfway houses.

As Barry defended his management of the growing prison crisis, the first of several buses carrying displaced inmates to the Federal Correctional Institution in Petersburg, Va., left the D.C. Jail.

There, staff members were planning to work overtime to begin processing the prisoners for trips to yet other facilities in the already-bloated federal corrections system around the country. There are already more D.C. prisoners in federal facilities than from all state prison systems combined.

The final destination of individual inmates was still unknown. Some could be sent as far away as California.

Yesterday, officials rolled out upward of 250 additional beds at Petersburg, where the inmate population had been 718.

"We're gonna handle it," said prison spokesman Jack Atherton, who said the D.C. inmates would be housed there probably for no more than a few days in a building normally reserved for "holdover" prisoners.

The inmate transfers prompted a hailstorm of apparently successful logistical undertakings, but still left the city inching toward a possible showdown in federal court over standing orders to maintain inmate population ceilings at the jail at other D.C. facilities.

In all, 466 prisoners were transferred to the D.C. Jail, driving the population there well over a limit of 1,694 imposed by a year ago by a Judge Bryant under an agreement that could trigger a shutdown of the jail and see the mayor held in contempt if the city fails to reduce the count within 48 hours.

At Lorton, about 80 additional felons were moved into the Central Facility and more than 70 into Maximum Security, exceeding population limits at both. District Judge June L. Green asked the city yesterday to report to her by Monday on the transfers and how inmates were being accommodated.

In all, more than 500 inmates were being shipped off to federal prisons and to state and local jails in Virginia, Maryland and Delaware. But whether that relief was to be permanent or only short-lived was unclear.

Mayor Barry said yesterday that those inmates would serve out their sentences there and would not return to the District as prisoners. But officials in other jurisdictions said that is not what they agreed to when they accepted the D.C. offenders, and they planned to hold the prisoners for only weeks or a few months at most.

On Thursday, corrections officials in Virginia hurriedly convened after receiving a call for help from the District. They could find no room in their own crowded prisons, but the state finally agreed to take approximately 60 inmates -- 30 yesterday and 30 more on Monday -- after enlisting help from local sheriffs.

John Jones, executive director of the Virginia State Sheriffs Association, said he called about 25 sheriffs around the state until he found the beds the state had agreed to commit. In all, 12 jails from Arlington to Bristol are involved, some taking as few as three prisoners.

Jones said Virginia officials stipulated that only misdemeanor offenders would be accepted and only for 30 days, with the city to pay $55 a day for each inmate. "We don't want to get the troublemakers," Jones said.

David Cross, spokesman for prisons in Delaware, said officials there plan to hold the D.C. prisoners for a few months at their facility in Smyrna, north of Dover. But, he said, 'it would cause a problem if it went on too long."

A spokesman for Maryland's prisons said the "length of stay has not been determined" for 76 prisoners transported to two separate facilities in Jessup, about 30 miles northeast of the District