	Henry III extended the castle's role as a jail for holding a wide range of prisoners. The sheriff was responsible for the jail at this time, and his deputy usually took the role of a full-time jailer. Up to three hundred and ten prisoners were held in the castle at any one time. The conditions in which prisoners were held were "appalling", and led to the widespread loss of life amongst detainees. Prison escapes were relatively common, and many of them, such as the break-out by 28 prisoners in 1298, were successful. When the Military Order of the Knights Templar was dissolved in England in 1307, York Castle was used to hold many of the arrested knights. The castle mills, as former Templar property, returned to royal control at the same time. Edward II also used the castle as a jail in his campaign against his rebellious barons in 1322, and after the battle of Boroughbridge many of the defeated rebel leaders were executed at York Castle.