This is one of the churches built by order of King Ferdinand III in the middle of the thirteenth century, after the conquest of the city. Due to its progressive deterioration, several restoration projects were carried out during the 20th century in order to consolidate the building and restore its original appearance. One of these projects, financed by the Department of Culture of the Junta de Andalucía, is the one drawn up by the architect José Antonio Gómez-Luengo and focused on the restoration of the coffered ceiling of the central nave, reconstructing all the lost elements, as well as on the repair of the coffered ceiling of the aisles.