	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.