henry ii visited york castle four times during his reign. the royal chambers at the time were inside the keep for safety, and henry paid £15 for repairs to the keep. during his 1175 visit, henry used the castle as the base for receiving the homage of william the lion of scotland. castle mills were built close by to support the garrison, and the military order of the knights templar was granted ownership of the mills in the mid-12th century. the mills proved to be vulnerable to the flooding of the two rivers and had to be repeatedly repaired.