It was built in the thirteenth century and restored by Florence V., who was subsequently incarcerated there.
As the Noord-Holland guide-book sardonically remarks, "He will never have thought that he built his own prison by it"..