 During the taifa period, the Aftasid dynasty based in Badajoz controlled a large territory centered on the Guadiana River valley.The area of Aftasid control was very large, stretching from the Sierra Morena and the taifas of Mertola and Silves to the south, to the Campo de Calatrava in the west and the Montes de Toledo in the northwest and nearly as far as Oporto in the northeast.According to Bernard Reilly, during the taifa period genealogy continued to be an obsession of the upper classes in al-Andalus.