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.