 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.