The Castle was an example of the extensive castle-building that took place during this period. Numerous fortifications were built on hilltops as the main means of defence against the constant incursions by the fearsome Saracen pirates, the later Norman invasions, and the frequent fighting between towns and villages over land and power.