Its construction as a mosque began in the year 785, with the appropriation and reutilization of the materials of the Basilica of San Vicente Martyr, which was in this place, by the Muslim conquerors. The resulting building was expanded during the Emirate of Cordoba and the Caliphate of Cordoba. With 23,400 square meters, it was the second largest mosque in the world on surface. One of its main characteristics is that its wall of the qibla was not oriented towards the Mecca, but 51 degrees more towards the south, something habitual in the mosques of Andalusia.
In 1238, after the Cristian conquest of the city, its consecration took place as a cathedral of the diocese. The building houses the cathedral chapter of the Diocese of Cordoba, being prohibited any collective worship or non-Catholic organized prayer. In 1523, under the direction of the architects Hernán Ruiz, el Viejo and his son, his cruciform Renaissance basilica of Plateresque style was built.
Today, the complex constitutes the most important monument in Cordoba, as well as all the Andalusian architecture, together with the Alhambra, as well as the most emblematic of the Umayyad Muslim art. Declared as a Site of Cultural Interest and Cultural Heritage of Humanity as part of the historic center of the city, it was included by the public among the 12 Treasures of Spain in 2007. It makes it one of the most visited monuments in Spain.