Almanzor was a ruler of Muslims in Al-Andalus who descended from an Arab family established in Algeciras after the Muslim conquest of Iberia. He studied law and held important administrative positions, such as director of the mint and army intendant. In 976, with the young and inexperienced Caliph Al-Hakam II succeeding to the throne, Almanzor seized power and was appointed tutor and prime minister, allowing him absolute authority over Iberian territory.