Córdoba’s domination of Moorish Spain began thirty years after its conquest – in 756, when the city was placed under the control of Abd ar-Rahman I, the sole survivor of the Umayyad dynasty, which had been bloodily expelled from the eastern caliphate of Damascus. He proved a firm but moderate ruler, and a remarkable military campaigner, establishing control over all but the north of Spain and proclaiming himself emir, a title meaning both “king” and “son of the caliph”. It was Abd ar-Rahman who commenced the building of the Great Mosque (La Mezquita, in Spanish), purchasing from the Christians the site of the cathedral of St Vincent (which, divided by a partition wall, had previously served both communities). This original mosque was completed by his son Hisham in 796 and comprises about one-fifth of the present building, the first dozen aisles adjacent to the Patio de los Naranjos.
The Cordoban emirate, maintaining independence from the eastern caliphate, soon began to rival Damascus both in power and in the brilliance of its civilization. Abd ar-Rahman II (822–52) initiated sophisticated irrigation programmes, minted his own coinage and received embassies from Byzantium. He in turn substantially enlarged the mosque. A focal point within the culture of al-Andalus, this was by now being consciously directed and enriched as an alternative to Mecca; it possessed an original script of the Koran and a bone from the arm of Mohammed and, for the Spanish Muslim who could not get to Mecca, it became the most sacred place of pilgrimage. In the broader Islamic world, it ranked third in sanctity after the Kaaba of Mecca and the al-Alqsa mosque of Jerusalem.
In the tenth century, Córdoba reached its zenith under a new emir, Abd ar-Rahman III (912–61), one of the great rulers of Islamic history. He assumed power after a period of internal strife and, according to a contemporary historian, “subdued rebels, built palaces, gave impetus to agriculture, immortalized ancient deeds and monuments, and inflicted great damage on infidels to a point where no opponent or contender remained in al-Andalus. People obeyed en masse and wished to live with him in peace.” In 929, with Muslim Spain and part of North Africa firmly under his control, Abd ar-Rahman III adopted the title of “caliph”. It was a supremely confident move and was reflected in the growing splendour of Córdoba, which had become the largest, most prosperous city of Europe, outshining Byzantium and Baghdad (the new capital of the eastern caliphate) in science, culture and scholarship. At the turn of the tenth century, Moorish sources boast of the city’s 27 schools, 50 hospitals (with the first separate clinics for the leprous and insane), 900 public baths, 60,300 noble mansions, 80,455 shops and 213,077 houses.