Police have questioned a teenager after a fire damaged part of the Wetherby Young Offender Institution.
No one was injured in the fire which started in the Benbow Unit just after 0100 BST on Saturday.
A member of staff spotted flames coming from a top floor cell and all 57 inmates on the wing were taken to cells elsewhere in the the building.
About 40 of the institution's 340 trainees have now been moved from Wetherby because of the fire.
West Yorkshire Police said a 16-year-old youth has been questioned at a police station in Leeds on suspicion of arson with intent to endanger life and has been returned to the Wetherby institution.
A Prison Service spokeswoman said: "There is extensive damage to Benbow Unit and the cells will remain out of use for the foreseeable future."