A prison roof was set on fire after an inmate is believed to have taken off his clothes and set them alight.
Firefighters were called to HMP Guys Marsh, near Shaftesbury, in Dorset, on Friday at around 8pm after the prisoner scaled the roof.
Around 60 inmates were taken to a secure area in the Category C prison while the blaze was being tackled into the early hours of Saturday morning.
A Prison Service spokesman said the incident involved one prisoner and that there was "no danger to the public".
The prisoner, who police believe deliberately started the blaze, was treated by paramedics as a precautionary measure and was not immediately arrested.
Superintendent Caroline Naughton from Dorset Police said: "This was an isolated incident. An investigation is now under way to establish the exact cause of the fire. These inquiries remain ongoing.
"We would like to reassure members of the community that there is no immediate risk to those living in the surrounding area and that the incident is under control."
The force said that no inmates escaped from the site during the disruption.
During the prison's last inspection in November 2014, investigators found it was in "crisis" and managers and staff had "all but lost control".
The unannounced inspection, triggered by "concerning intelligence", found gangs "operated openly" in the facility, which was overcrowded with 543 male inmates.
Violence, largely driven by the drug Spice and illicitly brewed alcohol, was "very high" and inmates lived in fear, the HM Inspectorate of Prisons wrote in its report.
The facility holds prisoners serving life sentences as well as those undergoing drug addiction treatment, according to the Ministry of Justice website.