The Taifa of Badajoz (from Arabic: طائفة بطليوس) was a medieval Islamic Moorish kingdom located in what is now parts of Portugal and Spain.
[2] The taifa's control extended over most of ancient Lusitania, including Mérida and Lisbon.
Sabur was succeeded in 1022 by his vizier, Abdallah ibn al-Aftas, who founded the Aftasid dynasty.
His troops fought alongside the Almoravid dynasty against the Christian army in the Battle of Sagrajas (1086), which occurred not far from Badajoz.
However, after the Almoravid victory, Yahya, who feared their increasing power, allied with Alfonso VI of Castile.