Since the early 2000s, Spanish Muslims have lobbied the Roman Catholic Church to allow them to pray in the Cathedral of Córdoba. The Muslim campaign has been rejected on multiple occasions, by both Spanish Catholic authorities, and the Vatican.
In 2010 police arrested two Muslim Austrian nationals at the site for a violent incident.
The building was begun around the year 500 as the Arian Christian Visigothic church of St. Vincent. After the Islamic conquest of the Visigothic kingdom, the church was divided between the Muslims and Christians. When the exiled Umayyad prince Abd ar-Rahman I escaped to Spain and defeated the Andalusian governor Yusuf al-Fihri, he allowed the Christians to rebuild their ruined churches, and purchased the Christian half of the church of St. Vincent.
Abd ar-Rahman I and his descendants reworked it over two centuries to refashion it as a mosque, starting in 784. Additionally, Abd ar-Rahman I used the mosque (originally called Aljama Mosque) as an adjunct to his palace and named it to honor his wife. Traditionally, the mihrab of a mosque faces in the direction of Mecca; by facing the mihrab, worshipers pray towards Mecca. Mecca is east-southeast of the mosque, but the mihrab points south.
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.