الحكم المستنصر بالله
The mosque underwent numerous subsequent changes: Abd ar-Rahman III ordered a new minaret, while Al-Hakam II, in 961, enlarged the building and enriched the mihrab. The last of the reforms was carried out by Al-Mansur Ibn Abi Aamir in 987. It was connected to the Caliph's palace by a raised walk-way, mosques within the palaces being the tradition for the Islamic rulers of all times. The Mezquita reached its current dimensions in 987 with the completion of the outer naves and courtyard.