The Afṭasids were an Arabised Berber dynasty of the fifth/eleventh century, which reigned during the period of the mulūk al-ṭawāʾif ("the party kings," or the Taifa kings) in al-Andalus, over a territory called the Northern March (al-thaghr al-jawfī) or the Western March (thaghr al-gharb) , consisting of the central valley of the river Guadiana (Wādī Ānā) and the central portion of present-day Portugal, with the city of Badajoz (Baṭalyaws) as its capital. This territory came, after 399/1009, into the possession of the ʿĀmirid