Abu Aamir Muhammad bin Abdullah ibn Abi Aamir, al-Hajib al-Mansur (Arabic: أبو عامر محمد بن عبد الله بن أبي عامر الحاجب المنصور) (c. 938 – August 8, 1002), better known as Almanzor, was the de facto ruler of Muslim Iberia (al-Andalus) in the late 10th to early 11th centuries. His rule marked the peak of power for al-Andalus.
Almanzor was born Muhammad ibn Abi Aamir, into a noble family of Yemeni origin in Algeciras. He arrived at the Court of Córdoba as a student studying law and literature. He subsequently became manager of the estates of Prince Hisham II.
In a few years Almanzor had worked his way from this humble position to considerable heights of influence, eliminating his political rivals in the process. Caliph al-Hakam II died in 976 and Ibn Abi Amir was instrumental in securing the succession of Hisham II, now aged twelve, to the throne. Almanzor exercised strong influence over Subh, the mother and regent of the young Hisham II. Two years later he became hajib (a title similar to that of vizier in the Muslim East or Chancellor in Western Europe). During the following three years Almanzor consolidated his power with the expansion of Medina Azahara on the outskirts of Córdoba, while at the same time completely isolating the young Caliph, who became a virtual prisoner in Medina Azahara. Following al-Hakam's death, Almanzor had al-Hakam's library of "ancient science" books destroyed.
In 981, upon his return to Córdoba from the Battle of Torrevicente, in which he crushed his last remaining rival (and father-in-law), Ghalib al-Nasiri, he assumed the title of al-Mansur bi-llah, [the] Victorious by God. In Christian Spain he was referred to as Almanzor.
Almanzor's hold on power within al-Andalus was now absolute. Purportedly in order to conceal his usurpation of the Caliph's authority, Almanzor dedicated himself to annual military invasions of the Christian states of the peninsula. He organized and took part in 57 campaigns, and was victorious in all of them. To wage warfare on this scale against the Christian states, he brought in many Berber mercenaries, which upset the political order over time.