It was a mosque consecrated by the Catholic Monarchs after the conquest of the city on June 11, 1485, made by common knowledge not proven.
The conditions of the mosque must not have been ideal for worship or perhaps Its poor state of conservation forced it to be removed. to a new construction or major renovation between 1517 and 1518.
Temple built in the XVIII and rebuilt after the Civil War, trying to maintain the style of that time. The building currently maintains its structure with small contemporary modifications. Its structure has a basilica plan with three naves.
The main altarpiece, in baroque style, houses in its center the image of the Patron Saint of the city, Saint Barnabas. The Sol Mayor Organ, from 1975, is notable, considered one of the most important built in Spain in the 20th century. At the main door we find a doorway, made of ocher stone, in the Rococo style, a work from the second half of the 18th century.
A tombstone with its heraldic shield mentions that Bishop Ludovico built the tower above this place in the year 1618.