 The first church was built between 1798 and 1803.The building suffered some serious damage as a result of a strong earthquake on 21 November 1877.In 1880 the architect Francisco Martínez was employed to repair the cathedral, partially reconstructing it while maintaining the baroque style.