The Alcazaba was founded in AD 955 by Abd al Rhahman 111 to defend the coast. Subsequently it was enlarged into a Moorish palace and in 1489 it was taken by the Catholic Monarchs. Little remains of this impressive fortress apart from the massive walls and towers, but gardens consisting of flowerbeds and fountains have been laid out in the lower enclosure. Remains of the royal palace can be seen in the second enclosure, whilst in the third there is a keep built by the Catholic Monarchs.