The ʿĀmirids were descendants of the chief minister (ḥājib) Abū ʿĀmir Muḥammad b. Abī ʿĀmir al-Maʿāfirī, entitled al-Manṣūr (Almanzor, "the Victorious," d. 392/1002). They held de facto power (al-mulk) in al-Andalus during two periods: as chief ministers in the regency in Córdoba (368-99/979-1009), and as rulers of the ṭāʾifa kingdom of Valencia during various periods from 411/1020 to 478/1085. The ʿĀmirids were of the lineage of the Maʿāfirī (a South Arabian tribe) and descendants of a Ḥimyarī who took part