In the 12th century the lands on the banks of the Liffey belonged to the Knights Templars. Strongbow built a castle for them, about a mile away from the Danish wall of old Dublin. Here the Templars lived for nearly a century and a half. In 1308, Edward II ruled that they were no longer allowed to practice their religion. Thirty members of the Templars were imprisoned in Dublin. Their lands and rights were given to the priory of the Knights of St. John of Jerusalem. They were there until the monasteries were closed in the 16th century. 