District officials contracted yesterday with a private western Pennsylvania prison to take 55 inmates to help keep the D.C. Jail under a court-ordered population cap, but before two buses carrying the inmates reached the facility, Pennsylvania Gov. Richard Thornburgh obtained a court order blocking the prison from admitting the inmates.

Commonwealth Judge David W. Craig of Pittsburgh, who issued the order, said early today that he had later amended the order to permit the prisoners to stay overnight at the 268 Center Inc., the privately-owned prison about 50 miles from Pittsburgh.

State officials at first had said that the buses would have to turn around last night and return, under police escort, to the District. The bus reached 268 Center in Cowansville, Pa., about 1 a.m. today.

"You can't have a bus full of prisoners adrift like a Flying Dutchman," Craig said of his late-night decision to permit the prisoners to stay only for the night. He said a hearing on whether to allow D.C. prisoners to be housed at the private prison in the future will be held Tuesday.

"The governor does not see how any other government has the right to place prisoners in Pennsylvania in a private facility that to the best of our knowledge is licensed by no one," said David Runkel, Thornburgh's press secretary.

Pennsylvania's action blocking the inmates followed by hours a D.C. Superior Court judge's decision to prohibit occupancy until at least next week of a new emergency temporary inmate facility near Capitol Hill. The city's decision to place inmates in the two facilities marked its first commitments to find space for D.C. inmates who cannot be housed in existing D.C. Corrections Department facilities because of crowding and court-ordered inmate-population ceilings.

Although the latest inmate cap -- 1,694 at the D.C. Jail -- was imposed last summer, the city's problems have grown to crisis proportions during the past week as inmates arriving at the jail from D.C. Superior Court and to serve weekends-only sentences were forced to sit on buses for hours until spaces could be freed up inside the jail.

Because space must be reserved at the jail on Fridays to accommodate new prisoners taken there during the weekend, Friday nights have become the critical period for ensuring that the population does not exceed the court's cap.

On March 7, prisoners arriving at the jail for weekends-only sentences had to be processed into the jail in small groups before they were put on buses for other institutions. Some of the inmates sat on buses as long as 10 hours.

Anticipating more than 100 weekends-only prisoners yesterday, D.C. officials spent the past two days scrambling to find spaces for all the expected inmates.

Late Thursday, when it appeared they would not be able to open the new temporary facility in the old 9th Precinct Police station at 525 Ninth St. NE, Corrections Department officials flew to Pennsylvania to inspect the private prison.

By midday yesterday, Justice Department officials had decided the private jail could be used to house the prisoners, and by late afternoon, buses carrying the inmates began the eight-hour journey to 268 Center.

The Justice Department had to approve the facility because the attorney general is responsible for designating the facility in which a D.C. inmate is to serve a sentence.

City officials working on the jail emergency could not be reached for comment last night.

With the 55 inmates on their way to Pennsylvania -- and therefore not included in the jail population -- the count last night was between 1,650 and 1,660.

It was unclear early today if inmates and officials aboard the two buses had been told of the legal battle that their journey prompted. There were conflicting reports of whether the state police had intercepted the buses to tell them of their plight.

Judge Craig said, "It's unfortunate that the District of Columbia did not make arrangements with Pennsylvania authorities" before sending the inmates to 268 Center.

Earlier in the day, a spokesman for Sen. Arlen Specter (R-Pa.), chairman of the Senate Approproation's subcommittee on the District, said he had no comment on the planned transfer to his state of District inmates.

Earlier yesterday, D.C. Superior Court Judge Curtis E. von Kann blocked the city from opening the emergency Ninth Street jail for another week and hinted that the facility may not be necessary if the delay provided a "window of time" for "some political solution to be worked out" between the city and angry neighbors of the proposed facility.

"It is not immediately necessary," von Kann said in explaining why he was continuing until next Friday a hearing on a request for a preliminary injunction to bar the District from using the the facility. "And it is possible it may not be necessary at all if some things happen . . . which I won't address," he added.

Von Kann issued his order after meeting privately with District and neighborhood lawyers for several hours in his chambers.

Following the private session, Assistant Deputy Corporation Counsel Michael Zielinski, apparently believing that the transfer of inmates to the private Pennsylvania prison would go through as planned, told the judge in open court that a number of developments had arisen in the past couple of days that altered the District's need for an immediate opening of the facility. Zielinski said that as a result, no prisoners would be transferred there before next Friday's hearing.

Martin McMahon, a lawyer representing neighborhood residents, called the efforts to renovate the abandoned police station into a jail "an experiment in terror" and a lesson in "how to mug a neighborhood."

Lawyers for the residents have argued that the city violated zoning regulations and Advisory Neighborhood Commission rules by not giving the neighbors 30 days to respond to the jail proposal.

Bob Gentzel, a spokesman for Pennsylvania Attorney General LeRoy Zimmerman, said the decision to try to bar the city's inmates from Pennsylvania was made because of concerns about whether the 268 Center was secure enough to house persons sentenced for misdemeanors. He said that previously the facility was used to house inmates sentenced to 72 hours in jail under the state's mandatory drunk driving laws, who he said were "not a major security risk."

Other state officials, noting that Pennsylvania is facing severe crowding in its prison and some court-ordered population levels, noted that the Pennsylvania House and Senate have bills before them that would prevent the incarceration of out-of-state prisoners in Pennsylvania's private prisons. Staff writer Elsa Walsh contributed to this report.