About 60 inmates were evacuated after a “large fire” broke out at a prison near Shaftesbury in Dorset.
It is understood a prisoner clambered on to the pitched roof of one of the house blocks at HMP Guys Marsh, took off his clothes and set fire to them.
The blaze is believed to have damaged the roof and inmates in the block were taken to a secure area.
The prisoner was brought down from the roof and the Prison Service said there was no risk to the public.
BBC home affairs correspondent