Officials declared the situation under control at 10 p.m.
"I think it was the fact it started getting dark and cold," prison Superintendent Robert M. Freeman said of the end of the crisis. "They could see a number of police officers. They could see the helicopters."
He said all prisoners had been placed in a lockdown, meaning they would be confined to their cells.
Freeman said the hostages were released in small groups after the inmates had begun negotiations with prison officials.
He would not say what demands were conveyed by the inmates, but he said he planned to meet with five prisoners today to discuss their concerns.
He indicated that one inmate complaint could be recent restrictions against family members' bringing food into the prison due to concerns about contraband.
Freeman said the prison sustained extensive fire damage, with inmates starting fires in the prison's furniture factory, a food-service area, the E Gatehouse and the commissary. Though smoke was still drifting from the prison at 8 p.m., the fires were being brought under control, officials said.
The officials said guards had conducted a building-to-building search at the overcrowded prison, where as many as 1,200 inmates at one point were unsecured.
Officials said no prisoners are believed to have escaped, although at one point several inmates forced guards to exchange clothes with them.
The surrounding community was not endangered, officials said. Still, 300 local police and shotgun-toting state troopers patrolled the grounds of the 52-acre complex while police helicopters searched the roofs of the prison's brick cellblocks.
John A. Palakovich, assistant to the prison superintendent, said the incident began with an assault on a staff member at the E Gatehouse, a prisoner checkpoint, and "carried over" to two cellblocks.
Palakovich was unable to provide details of how the hostages were taken.
During the disturbance, a parade of ambulances streamed in and out of the medium-security prison, which houses 2,607 inmates although its capacity is 1,826. Inmates range from those serving five years on assault convictions to those serving life terms for murder.
One guard suffered multiple injuries and was in guarded condition in the intensive-care unit at Community General Osteopathic Hospital. Another guard sustained blows to the face and chest and was in fair condition. One inmate was stabbed in the shoulder and was reported in fair condition at Milton S. Hershey Medical Center.
Most of the other injuries sustained by guards appeared to be minor, with several treated and released at hospitals in Camp Hill and Harrisburg.
Freeman said inmates had used chair rungs and kitchen utensils as weapons during the disturbance.
One guard, Larry Arnold, was flown by helicopter to the Hershey hospital after he was overtaken by a number of inmates in a cellblock, said Arnold's brother-in-law, Mike Kennedy.
"He was attacked in the cell," Kennedy said in a telephone interview. ''He was held by other prisoners and beaten and then he was stomped. All he can indicate at this time is that he was rushed. He was not able to get the door closed in time to prevent them from jumping him."
He said that Arnold, 37, suffered multiple fractures and facial injuries.
Palakovich said that at 3 p.m., the time of the uprising, inmates normally are moving from work assignments, educational programs and visiting areas.
Officials did not confirm a report that some inmates tried unsuccessfully to crash a truck through a rear gate.
The outburst at Camp Hill - which opened in 1941 as a youth detention center and was converted to an adult population in 1976 - came two days after a disturbance injured 29 staff members and 19 prisoners at the maximum- security state prison at Huntingdon.