The Alcazaba is a Moorish fortification in Málaga, southern Spain. Built around the middle of the 11th century during the rule of 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.