The Alcazaba is a Moorish fortification in Málaga, southern Spain. Created from the 8th century, much of it was built around the middle of the 11th century for King Badis, the Zirid ruler of Granada, to serve as the palace of the governors of the city. It is the best-preserved alcazaba (from the Arabic al-qasbah, قصبة, meaning “citadel”) in Spain. Next to the entrance to the Alcazaba are the ruins of a Roman theatre dating to the 2nd century which is undergoing restoration. Some of the Roman materials were used in the construction of the Alcazaba. It is built on a hill in the centre of the city, overlooking the port, and comprises two walled enclosures.