CAMP HILL, Pa. (AP) _ As firefighters doused smoldering buildings, a caravan of buses ferried 960 inmates from the scorched Camp Hill prison to other crowded facilities in the state today after two nights of rioting.

The siege left more than 100 people injured, numerous buildings razed or damaged by fire and hundreds of inmates without cells. Five hostages were released Friday morning after state police stormed the prison and retook it building by building.

''It looks like a riot-torn city in there,'' said firefighter George Smith.

With large areas of the prison gutted or damaged, officials had little choice but to begin shuttling busloads of inmates to other state prisons - all of which are already full beyond capacity.

Prison officials said overcrowding at Camp Hill may have been a cause for the riots.

There were no deaths and no escapes during the uprising at the prison in south-central Pennsylvania, about 100 miles west of Philadelphia, officials said.

The violence was sparked Wednesday by an inmate's assault on a prison worker. That led to a seven-hour rampage during which eight hostages were taken and 47 injured.

Officials regained control of the prison and the hostages were released, but by 7 p.m. Thursday the inmates managed to free themselves from lockdown and began the second night of rioting.

Ken Robinson, spokesman for the state Department of Corrections, said officials are unsure how the inmates freed themselves. There has been speculation inmates still had keys gained in the first night of rioting or took advantage of locks damaged the first night.

The siege's end came Friday morning, when state police, firing guns, stormed a kitchen building, wounding at least one inmate as they began taking control of the prison.

Robinson announced about 9:30 a.m. that officials were ''again in control of the institution,'' nearly 15 hours after the second wave of rioting began.

Fourteen of 31 buildings on the grounds were burned out, including eight modular housing units, the education building, greenhouse, laundry building and furniture factory, Robinson said.

During their storming of the prison, state police in riot gear and armed with shotguns pushed surrendering or captured prisoners to the ground, holding them face-down in the grass of a prison courtyard.

Troopers who spoke on the condition of anonymity detailed hand-to-hand scuffles and counterattacks by inmates.

''They were throwing Molotov cocktails at us and pieces of blocks,'' said one trooper.

Robinson said 76 people were injured Thursday, and 46 were taken to hospitals. They included 34 prison employees, 32 inmates and 10 state police or firefighters.

All five hostages taken Thursday night were injured. One was in serious condition with a stab wound, three were in stable condition with head injuries or, in one case, broken ribs, and one was in good condition with a head injury, he said.

An 18-year-old inmate was in critical condition, a 24-year-old inmate was in serious condition and a third inmate of undetermined age was in fair condition, all with gunshot wounds, area hospital officials said.

A 41-year-old guard was listed in serious condition at the medical center after undergoing surgery for multiple stab wounds to the back, Hershey Medical Center spokeswoman Marybeth Bruchwalski said.

Friday afternoon, the Corrections Department said 960 inmates from Camp Hill would be moved to the Graterford, Mercer, Pittsburgh, Smithfield and Waymart state prisons.

Overcrowding and a shortage of guards may have contributed to the disturbance, officials said. Camp Hill, with 2,600 inmates, was about 45 percent over capacity and the entire state prison system is about 48 percent over capacity.

Robinson said both a prison administrative and a criminal investigation have begun to determine what happened during the outburst. The state's Senate Judiciary Committee plans a hearing next week.

State Department of Corrections Superintendent Robert M. Freeman had said the first night's problems may have been linked to a decision to prohibit families from bringing food to inmates during extended visits. He also said inmates were upset by a change in the way they received medical care.